-
Notifications
You must be signed in to change notification settings - Fork 95
/
Copy pathbuild.gradle
45 lines (40 loc) · 1.61 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
plugins {
alias(libs.plugins.agp.application) apply false
alias(libs.plugins.agp.library) apply false
alias(libs.plugins.kotlin.android) apply false
}
allprojects {
ext {
if(!project.hasProperty('COMPILE_SDK')) COMPILE_SDK = 35
if(!project.hasProperty('MIN_SDK')) MIN_SDK = 21
if(!project.hasProperty('TARGET_SDK')) TARGET_SDK = 35
if(!project.hasProperty('JAVA_SOURCE_COMPATIBILITY')) JAVA_SOURCE_COMPATIBILITY = JavaVersion.VERSION_17
if(!project.hasProperty('JAVA_TARGET_COMPATIBILITY')) JAVA_TARGET_COMPATIBILITY = JavaVersion.VERSION_17
if(!project.hasProperty('KOTLIN_JVM_TARGET_COMPATIBILITY')) KOTLIN_JVM_TARGET_COMPATIBILITY = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17
if(!project.hasProperty('KOTLIN_COMPILER_ARGS')) KOTLIN_COMPILER_ARGS = [
"-Xbackend-threads=0", // =0 - threads = num of cpus
"-opt-in=kotlin.RequiresOptIn",
"-opt-in=kotlin.contracts.ExperimentalContracts",
"-Xjvm-default=all",
// Generate smaller bytecode by not generating runtime not-null assertions.
"-Xno-call-assertions",
"-Xno-param-assertions",
"-Xno-receiver-assertions",
"-Xcontext-receivers",
]
}
repositories {
google()
mavenCentral()
}
}
subprojects {
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
kotlin {
compilerOptions {
freeCompilerArgs = KOTLIN_COMPILER_ARGS
jvmTarget = KOTLIN_JVM_TARGET_COMPATIBILITY
}
}
}
}