-
-
Notifications
You must be signed in to change notification settings - Fork 365
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
45 lines (39 loc) · 1.43 KB
/
build.gradle.kts
File metadata and controls
45 lines (39 loc) · 1.43 KB
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
// Top-level build.gradle.kts converted from Groovy
plugins {
alias(libs.plugins.androidApplication) apply false
alias(libs.plugins.androidLibrary) apply false
alias(libs.plugins.kotlinAndroid) apply false
alias(libs.plugins.kotlinKapt) apply false
alias(libs.plugins.ksp) apply false
alias(libs.plugins.kotlinCompose) apply false
}
// Project-wide version/SDK properties are now managed in the version catalog (gradle/libs.versions.toml)
tasks.register("clean", Delete::class) {
// delete(rootProject.buildDir)
delete(rootDir.toString() + File.separator + project.property("apkDir"))
delete(rootDir.toString() + File.separator + "repo")
}
subprojects {
beforeEvaluate {
println("#### Evaluate before of ${project.path}")
}
afterEvaluate {
println("#### Evaluate after of ${project.path}")
}
}
allprojects {
tasks.withType<Test>().configureEach {
// Kotlin arithmetic: integer division
val cpus = Runtime.getRuntime().availableProcessors().let { it / 2 }
maxParallelForks = if (cpus > 0) cpus else 1
if (!project.hasProperty("createReports")) {
reports.html.required = false
reports.junitXml.required = false
}
}
gradle.projectsEvaluated {
tasks.withType<JavaCompile>().configureEach {
options.compilerArgs = options.compilerArgs + listOf("-Xmaxerrs", "4000", "-Xmaxwarns", "4000")
}
}
}