-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
59 lines (52 loc) · 2.04 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
// root build.gradle
plugins {
alias(libs.plugins.android.application) apply false
alias(libs.plugins.android.library) apply false
alias(libs.plugins.androidx.navigation.safeargs) apply false
}
/* JitPack: use tag as versionName. */
if (System.env.JITPACK) {
project.ext.set('version_name', System.env.VERSION)
}
/** Build Configurations */
project.ext.set('archiveBuildTypes', ['debug', 'release'])
/** Keystore Settings, loaded from keystore.properties */
if (rootProject.file('keystore.properties').exists()) {
def keystore = new Properties()
def ins = new FileInputStream(rootProject.file('keystore.properties'))
keystore.load(ins)
project.ext.set('debugKeystorePass', keystore['debugKeystorePass'])
project.ext.set('debugKeyAlias', keystore['debugKeyAlias'])
project.ext.set('debugKeyPass', keystore['debugKeyPass'])
project.ext.set('releaseKeystorePass', keystore['releaseKeystorePass'])
project.ext.set('releaseKeyAlias', keystore['releaseKeyAlias'])
project.ext.set('releaseKeyPass', keystore['releaseKeyPass'])
ins.close()
}
/** 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 libs.versions.kotlin.get()
}
}
}
}
gradle.projectsEvaluated {
tasks.withType(JavaCompile).tap {
configureEach {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
}
}
}
// rootProject > clean
tasks.register('clean', Delete) {
delete rootProject.fileTree('build')
delete project.fileTree('build')
}