forked from tome34/frameDemoMo2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
82 lines (69 loc) · 2.45 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
apply from: "${rootProject.rootDir}/config.gradle"
if (Boolean.valueOf(rootProject.ext.moduleShopMall)) {
apply plugin: 'com.android.application'
} else {
apply plugin: 'com.android.library'
apply plugin: 'me.tatarka.retrolambda' //lambda配置
}
apply plugin: 'com.jakewharton.butterknife'
apply plugin: 'org.greenrobot.greendao'
android {
project.ext.setDefaultConfig project
defaultConfig {
//Arouter路由配置
javaCompileOptions {
annotationProcessorOptions {
arguments = [moduleName: project.getName()]
}
}
//强制前缀
resourcePrefix "mall_"
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
//greendao配置
greendao {
//版本号,升级时可配置
schemaVersion 1
//自定义生成数据库文件的目录
targetGenDir 'src/main/java'
//通过gradle插件生成的数据库相关文件的包名,默认为你的entity所在的包名;
daoPackage 'com.example.tome.module_shop_mall.dao'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
/*java插件引入了一个概念叫做SourceSets,通过修改SourceSets中的属性,可以指定哪些源文件
(或文件夹下的源文件)要被编译,哪些源文件要被排除。*/
sourceSets {
main {
if (rootProject.ext.moduleShopMall) {
manifest.srcFile 'src/main/module/AndroidManifest.xml'
} else {
manifest.srcFile 'src/main/AndroidManifest.xml'
java {
//排除java/debug文件夹下的所有文件
exclude '*module'
}
}
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
//Arouter路由
annotationProcessor "com.alibaba:arouter-compiler:$rootProject.arouterCompilerVersion"
//黄油刀
annotationProcessor "com.jakewharton:butterknife-compiler:$rootProject.butterknifeVersion"
//垂直的tabLayout
implementation "q.rorbin:VerticalTabLayout:1.2.5"
//水平的tabLayout
implementation "com.flyco.tablayout:FlycoTabLayout_Lib:2.1.2@aar"
//公用依赖包
implementation project(':projectCore')
}