-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
47 lines (41 loc) · 1.83 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
// project-wide `build.gradle`
plugins {
alias(libs.plugins.android.application) apply false
// https://developers.google.com/maps/documentation/android-sdk/secrets-gradle-plugin
alias(libs.plugins.mapsplatform.secrets) apply false
}
// Build Configurations
project.ext.set('archiveBuildTypes', ['release', 'debug'])
// Version Settings, loaded from version.properties
def version = new Properties()
version.load(new FileInputStream(rootProject.file('version.properties')))
project.ext.set('applicationId', version['applicationId'])
project.ext.set('versionName', version['versionName'])
project.ext.set('versionCode', Integer.parseInt(version['versionCode']))
project.ext.set('compileSdk', Integer.parseInt(version['compileSdkVersion']))
project.ext.set('targetSdk', Integer.parseInt(version['targetSdkVersion']))
project.ext.set('minSdk', Integer.parseInt(version['minSdkVersion']))
allprojects {
/** Runtime JAR files in the classpath should have the same version. */
configurations.configureEach {
resolutionStrategy.eachDependency { 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.22"
}
}
}
}
// when projects were evaluated
gradle.projectsEvaluated {
tasks.withType(JavaCompile).tap {
configureEach {
options.compilerArgs << "-Xmaxerrs" << "2000" << "-Xmaxwarns" << "2000"
options.compilerArgs << "-Xlint:unchecked" << '-Xlint:deprecation'
// << "-Xlint:-cast" << "-Xlint:all"
}
}
}
}