-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
67 lines (52 loc) · 1.55 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
}
}
plugins {
alias libs.plugins.android.application apply false
alias libs.plugins.android.library apply false
alias libs.plugins.kotlin.android apply false
alias libs.plugins.kotlin.jvm apply false
alias libs.plugins.ksp apply false
alias libs.plugins.hilt.android apply false
alias libs.plugins.growingio.plugin apply false
alias libs.plugins.protobuf apply false
alias libs.plugins.spotless apply false
}
allprojects {
tasks.withType(KotlinCompile).configureEach {
kotlinOptions {
// Treat all Kotlin warnings as errors
// allWarningsAsErrors = true
// Set JVM target to 17
jvmTarget = JavaVersion.VERSION_17
}
}
}
//./gradlew spotlessCheck ==> check code
//./gradlew spotlessApply ==> format code
subprojects {
apply plugin: "com.diffplug.spotless"
spotless {
java {
target '**/*.java'
licenseHeaderFile rootProject.file('gradle/java.header')
removeUnusedImports()
}
kotlin {
target '**/*.kt'
targetExclude("$buildDir/**/*.kt")
licenseHeaderFile rootProject.file('gradle/java.header')
ktlint()
}
groovyGradle {
target '*.gradle'
greclipse()
}
format 'xml', {
target '**/*.xml'
}
}
}