-
-
Notifications
You must be signed in to change notification settings - Fork 12
/
build.gradle
72 lines (65 loc) · 2.71 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
// project-wide `build.gradle`
buildscript {
// conditional remote dependency, when directory `buildSrc` is absent.
if (! new File(getRootDir().absolutePath + "/buildSrc").exists()) {
dependencies {
//noinspection UseTomlInstead
classpath 'io.syslogic:google-cloud-kms-gradle-plugin:1.0.8'
}
}
}
plugins {
alias(libs.plugins.android.application) apply false
// alias(libs.plugins.android.library) apply false
alias(libs.plugins.androidx.navigation.safeargs) apply false
alias(libs.plugins.google.mobile.services) apply false
alias(libs.plugins.firebase.appdistribution) apply false
alias(libs.plugins.firebase.crashlytics) apply false
alias(libs.plugins.firebase.perf) apply false
}
// Keystore Settings, loaded from keystore.properties
if (rootProject.file('keystore.properties').exists()) {
def keystore = new Properties()
keystore.load(new FileInputStream(rootProject.file('keystore.properties')))
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'])
} else {
logger.error('> File keystore.properties is missing.')
}
/** Modules */
allprojects {
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) {
// cleanup Gradle logs
def gradle = project.getGradle()
new File("${gradle.getGradleUserHomeDir().getAbsolutePath()}/daemon/${gradle.getGradleVersion()}").listFiles().each {
if (it.getName().endsWith('.out.log')) {
println(":clean removed: $it")
it.delete()
}
}
// delete build directories
delete rootProject.fileTree('build')
delete project.fileTree('build')
}