Partial sync of gradle conventions with sdk repo (#4836)
* Sync gradle conventions * oops
This commit is contained in:
parent
f5016109f2
commit
d52f62522d
|
@ -8,13 +8,16 @@ dependencies {
|
||||||
errorprone("com.google.errorprone:error_prone_core")
|
errorprone("com.google.errorprone:error_prone_core")
|
||||||
}
|
}
|
||||||
|
|
||||||
val disableErrorProne = gradle.startParameter.projectProperties.get("disableErrorProne")?.toBoolean()
|
val disableErrorProne = properties["disableErrorProne"]?.toString()?.toBoolean() ?: false
|
||||||
?: false
|
|
||||||
|
|
||||||
tasks {
|
tasks {
|
||||||
withType<JavaCompile>().configureEach {
|
withType<JavaCompile>().configureEach {
|
||||||
options.errorprone {
|
with(options) {
|
||||||
isEnabled.set(!disableErrorProne)
|
errorprone {
|
||||||
|
if (disableErrorProne) {
|
||||||
|
logger.warn("Errorprone has been disabled. Build may not result in a valid PR build.")
|
||||||
|
isEnabled.set(false)
|
||||||
|
}
|
||||||
|
|
||||||
disableWarningsInGeneratedCode.set(true)
|
disableWarningsInGeneratedCode.set(true)
|
||||||
allDisabledChecksAsWarnings.set(true)
|
allDisabledChecksAsWarnings.set(true)
|
||||||
|
@ -84,3 +87,4 @@ tasks {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -32,5 +32,7 @@ jmhReport {
|
||||||
tasks {
|
tasks {
|
||||||
named("jmh") {
|
named("jmh") {
|
||||||
finalizedBy(named("jmhReport"))
|
finalizedBy(named("jmhReport"))
|
||||||
|
|
||||||
|
outputs.cacheIf { false }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue