-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommon_impl.gradle
50 lines (42 loc) · 1.63 KB
/
common_impl.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
// 项目(app/module)的通用gradle配置
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
android {
compileSdkVersion rootProject.ext.android["compileSdkVersion"]
buildToolsVersion rootProject.ext.android["buildToolsVersion"]
defaultConfig {
minSdkVersion rootProject.ext.android["minSdkVersion"]
targetSdkVersion rootProject.ext.android["targetSdkVersion"]
versionCode rootProject.ext.android["versionCode"]
versionName rootProject.ext.android["versionName"]
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
// viewBinding
buildFeatures {
dataBinding = true // for data binding
}
}
// arouter module name
kapt {
arguments {
arg("AROUTER_MODULE_NAME", project.getName())
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation "androidx.core:core-ktx:$rootProject.ext.version.coreKtx"
// test
testImplementation "junit:junit:$rootProject.ext.version.junit"
androidTestImplementation "androidx.test.ext:junit:$rootProject.ext.version.extJunit"
androidTestImplementation "androidx.test.espresso:espresso-core:$rootProject.ext.version.espressoCore"
// arouter-compiler 的注解依赖需要所有使用 ARouter 的 module 都添加依赖
kapt "com.alibaba:arouter-compiler:$rootProject.ext.version.arouterCompiler"
}