forked from zaproxy/zaproxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
61 lines (52 loc) · 1.58 KB
/
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
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
import net.ltgt.gradle.errorprone.errorprone
plugins {
id("com.diffplug.spotless")
id("org.sonarqube") version "3.3"
id("com.github.ben-manes.versions") version "0.42.0"
id("net.ltgt.errorprone") version "2.0.2"
}
apply(from = "$rootDir/gradle/ci.gradle.kts")
allprojects {
apply(plugin = "com.diffplug.spotless")
apply(plugin = "net.ltgt.errorprone")
repositories {
mavenCentral()
}
spotless {
project.plugins.withType(JavaPlugin::class) {
java {
licenseHeaderFile("$rootDir/gradle/spotless/license.java")
googleJavaFormat("1.7").aosp()
}
}
kotlinGradle {
ktlint()
}
}
project.plugins.withType(JavaPlugin::class) {
dependencies {
"errorprone"("com.google.errorprone:error_prone_core:2.9.0")
if (JavaVersion.current() == JavaVersion.VERSION_1_8) {
"errorproneJavac"("com.google.errorprone:javac:9+181-r4173-1")
}
}
}
tasks.withType<JavaCompile>().configureEach {
options.encoding = "utf-8"
options.compilerArgs = listOf("-Xlint:all", "-Xlint:-options", "-Werror", "-parameters")
options.errorprone {
disableAllChecks.set(true)
error(
"MissingOverride",
"WildcardImport"
)
}
}
}
sonarqube {
properties {
property("sonar.projectKey", "zaproxy_zaproxy")
property("sonar.organization", "zaproxy")
property("sonar.host.url", "https://sonarcloud.io")
}
}