-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle.kts
33 lines (28 loc) · 851 Bytes
/
build.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
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()
}
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")
}
}