-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
37 lines (30 loc) · 974 Bytes
/
build.gradle.kts
File metadata and controls
37 lines (30 loc) · 974 Bytes
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
plugins {
id("com.diffplug.spotless") version "6.20.0"
id("com.github.ben-manes.versions") version "0.49.0"
// Apply the java-library plugin to add support for Java Library
`java-library`
}
allprojects {
apply(plugin = "com.diffplug.spotless")
apply(plugin = "com.github.ben-manes.versions")
repositories {
mavenCentral()
}
spotless {
kotlinGradle {
ktlint()
// this code enables spotless:on,off tag for excluding to apply spotless on sources.
toggleOffOn()
}
project.plugins.withType(JavaPlugin::class) {
java {
licenseHeaderFile("$rootDir/gradle/spotless/license.java")
googleJavaFormat().aosp()
}
}
}
tasks.withType<JavaCompile>().configureEach {
options.encoding = "utf-8"
options.compilerArgs = listOf("-Xlint:all", "-Xlint:-path", "-Xlint:-options", "-Werror")
}
}