-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathbuild.gradle
62 lines (49 loc) · 1.51 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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
apply from: "ext.gradle"
repositories {
jcenter()
}
dependencies {
classpath _android.plugin
classpath _kotlin.kotlin_gradle_plugin
classpath _kotlin.kotlin_android_extensions
}
}
allprojects {
repositories {
jcenter()
}
}
subprojects {
def isAppModule = it.name.equals('app') || it.name.equals('testapk')
apply plugin: isAppModule? 'com.android.application': 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions' // 拓展
android {
compileSdkVersion _android.compileSdkVersion as Integer
buildToolsVersion _android.buildToolsVersion as String
defaultConfig {
minSdkVersion _android.minSdkVersion as Integer
targetSdkVersion 22 // 未处理6.0权限,直接写死 22
versionCode _android.versionCode as Integer
versionName _android.versionName as String
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
}
dependencies {
// kotlin
compile _kotlin.kotlin_stdlib
// rxjava
compile rx.rxjava2
compile rx.rxandroid2
}
}