-
Notifications
You must be signed in to change notification settings - Fork 41
/
build.gradle
74 lines (60 loc) · 1.82 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
buildscript {
apply from: rootProject.file("dependencies.gradle")
ext.kotlin_version = deps.versions.kotlin
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${deps.versions.kotlin}"
classpath "com.vanniktech:gradle-maven-publish-plugin:0.8.0"
}
}
allprojects { project ->
project.apply from: rootProject.file("dependencies.gradle")
repositories {
google()
jcenter()
}
}
allprojects {
task allDeps(type: DependencyReportTask) {}
}
subprojects { project ->
afterEvaluate {
if (isAndroidModule(project)) {
addCommonConfigurationForAndroidModules(project)
}
}
}
def addCommonConfigurationForAndroidModules(Project project) {
project.android {
compileSdkVersion deps.buildConfig.compileSdk
buildToolsVersion deps.buildConfig.buildTools
defaultConfig {
minSdkVersion deps.buildConfig.minSdk
targetSdkVersion deps.buildConfig.targetSdk
vectorDrawables.useSupportLibrary = true
versionCode 1
versionName "1.0"
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
}
def static isAndroidModule(Project project) {
def plugins = project.plugins
return plugins.hasPlugin("com.android.application") || plugins.hasPlugin("com.android.library")
}
task clean(type: Delete) {
delete rootProject.buildDir
}