-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
44 lines (38 loc) · 1.34 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
// Top-level build.gradle
// $BUILD_NUMBER exists when building with Jenkins
project.ext.set('jenkinsBuild', System.getenv("BUILD_NUMBER") ?: "0")
/** Modules */
allprojects {
/** Runtime JAR files in the classpath should have the same version. */
configurations.configureEach {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'org.jetbrains.kotlin') {
List<String> list = ['kotlin-stdlib', 'kotlin-stdlib-jdk7', 'kotlin-stdlib-jdk8', 'kotlin-stdlib-common']
if (list.contains(requested.name)) {
details.useVersion "1.9.0"
}
}
}
}
gradle.projectsEvaluated {
tasks.withType(JavaCompile).tap {
configureEach {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
}
}
}
// rootProject > clean
tasks.register('clean', Delete) {
// delete build directories
delete rootProject.buildDir
delete project.buildDir
// when task clean has finished
doLast {
// recreate APK output directories
mkdir("${project.buildDir}/outputs/apk")
mkdir("${project.buildDir}/outputs/apk/debug")
mkdir("${project.buildDir}/outputs/apk/release")
}
}