-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsettings.gradle.kts
93 lines (78 loc) · 2.64 KB
/
settings.gradle.kts
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
pluginManagement {
apply(from = File(settingsDir, "gradle/build_requires_checker.gradle"))
apply(from = File(settingsDir, "gradle/repositories.gradle"))
val repos: java.util.Properties by settings.extra
// r8Version is declared in gradle.properties
val r8Version: String by settings
val androidGradlePluginVersion: String by settings
val gradleEnterprisePluginVersion: String by settings
buildscript {
if (!r8Version.isEmpty()) {
repositories {
(repos["r8"] as groovy.lang.Closure<*>).call(this, r8Version)
}
dependencies {
logger.warn("R8 $r8Version will be applied")
classpath("com.android.tools:r8:$r8Version") {
exclude(group = "com.google.guava", module = "guava")
}
}
}
}
repositories {
(repos["google"] as groovy.lang.Closure<*>).call(this)
(repos["gradlePluginPortal"] as groovy.lang.Closure<*>).call(this)
}
plugins {
id("com.android.settings") version androidGradlePluginVersion
id("com.gradle.enterprise") version gradleEnterprisePluginVersion
}
includeBuild("build-logic")
}
plugins {
id("com.gradle.enterprise")
id("com.android.settings")
}
android {
val minSdk: String by settings
val compileSdk : String by settings
val compileSdkPreview: String by settings
val compileSdkExtension: String by settings
val buildToolsVersion: String by settings
this.minSdk = minSdk.toInt()
this.compileSdk = compileSdk.toInt()
this.buildToolsVersion = buildToolsVersion
if (compileSdkExtension.isNotEmpty()) {
this.compileSdkExtension = compileSdkExtension.toInt()
}
if (compileSdkPreview.isNotEmpty()) {
this.compileSdkPreview = compileSdkPreview
}
"""
execution {
defaultProfile = "minimal"
profiles {
create("minimal") {
r8 {
// https://issuetracker.google.com/issues/283632726
runInSeparateProcess = false
jvmOptions.addAll(listOf("-Xmx2g", "-XX:+UseParallelGC"))
}
}
}
}
"""
}
dependencyResolutionManagement {
val repos: java.util.Properties by settings.extra
repositories {
(repos["google"] as groovy.lang.Closure<*>).call(this)
(repos["mavenCentral"] as groovy.lang.Closure<*>).call(this)
}
}
apply(from = File(settingsDir, "gradle/version_catalogs.gradle"))
include(":app")
include(":shared")
include(":lib:hostconfig")
include(":tests:baselineprofile")
rootProject.name = "My Application"