-
Notifications
You must be signed in to change notification settings - Fork 81
/
build.gradle
executable file
·78 lines (71 loc) · 2.35 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
apply from: 'publish_root_config.gradle'
buildscript {
ext.kotlin_version = '1.2.71'
repositories {
maven {
url uri("${System.properties['user.home']}/.gradle/local_repo")
}
jcenter()
google()
}
dependencies {
classpath "com.android.tools.build:gradle:3.1.3"
classpath 'com.novoda:bintray-release:0.8.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "com.sankuai.waimai.router:plugin:1.1.0"
if (project.findProject(':buildSrc') == null) {
classpath "com.sankuai.erp.component:appinit-plugin:1.0.0"
}
}
}
subprojects { project ->
def libProjectList = ['common', 'api', 'compiler', 'buildSrc']
if (libProjectList.contains(project.name)) {
return
}
if (project.name == 'app') {
apply plugin: 'com.android.application'
} else {
apply plugin: 'com.android.library'
}
// 应用 Kotlin 插件,用于测试对 Kotlin 的支持
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
// 应用 AppInit 插件。如果有用到 Kotlin,需要放到 Kotlin 插件之后
apply plugin: 'appinit-plugin'
// 测试多 flavor 的情况
// android {
// /**
// * money 场景,免费版和收费版
// * channel 场景,不同的市场渠道
// */
// flavorDimensions 'money', 'channel'
//
// productFlavors {
// free {
// dimension 'money'
// }
// vip {
// dimension 'money'
// }
// baidu {
// dimension 'channel'
// }
// xiaomi {
// dimension 'channel'
// }
// }
// }
dependencies {
// android support
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
// 用于测试对 Kotlin 的支持
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
// 美团外卖 Router 相关,用于测试多模块
implementation 'com.sankuai.waimai.router:router:1.1.0'
annotationProcessor 'com.sankuai.waimai.router:compiler:1.1.0'
kapt 'com.sankuai.waimai.router:compiler:1.1.0'
}
}