build.gradle
3.43 KB
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
// Top-level build file where you can add configuration options common to all sub-projects/modules.
apply from: "config.gradle"
static void imput(String type, Project project, Object dependencyNotation) {
if (project != dependencyNotation) project.dependencies.add(type, dependencyNotation)
}
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath "com.alibaba:arouter-register:1.0.2"
classpath 'org.greenrobot:greendao-gradle-plugin:3.2.2'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
allprojects {
afterEvaluate {
if (project.parent == null || project.parent == rootProject) return
android {
compileSdkVersion 29
buildToolsVersion "29.0.0"
defaultConfig {
if (minSdkVersion == null) minSdkVersion 16
if (targetSdkVersion == null) targetSdkVersion 29
if (versionCode == null) versionCode 1
if (versionName == null) versionName "1.2"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
javaCompileOptions {
annotationProcessorOptions {
arguments = [
AROUTER_MODULE_NAME: project.getName()
// ,
// AROUTER_GENERATE_DOC: "enable"
]
}
}
ndk {
abiFilters(
"armeabi-v7a"
// , "x86"
)
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
dataBinding {
enabled true
}
dexOptions {
javaMaxHeapSize '4g'
}
signingConfigs {
debugConfig {
storeFile file("www.cnlive.com.key")
storePassword "www.cnlive.comPassw0rd"
keyAlias "strike-debug"
keyPassword "www.cnlive.com"
}
releaseConfig {
if (store_file != null) storeFile file(store_file)
if (store_password != null) storePassword store_password
if (key_alias != null) keyAlias key_alias
if (key_password != null) keyPassword key_password
}
}
}
//核心库
imput("implementation", project, moudle.core_base)
//Tripartite Base
for (String moudle : base_librarys) imput('implementation', project, moudle)
for (String moudle : base_compilers) imput('annotationProcessor', project, moudle)
}
repositories {
google()
jcenter()
maven {
url mixedUrl
credentials { username = mavenUsername; password = mavenPassword }
}
maven { url 'https://jitpack.io' }
maven { url 'http://developer.huawei.com/repo' }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}