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")
|
||||
}
|
||||
|
||||
val disableErrorProne = gradle.startParameter.projectProperties.get("disableErrorProne")?.toBoolean()
|
||||
?: false
|
||||
val disableErrorProne = properties["disableErrorProne"]?.toString()?.toBoolean() ?: false
|
||||
|
||||
tasks {
|
||||
withType<JavaCompile>().configureEach {
|
||||
options.errorprone {
|
||||
isEnabled.set(!disableErrorProne)
|
||||
with(options) {
|
||||
errorprone {
|
||||
if (disableErrorProne) {
|
||||
logger.warn("Errorprone has been disabled. Build may not result in a valid PR build.")
|
||||
isEnabled.set(false)
|
||||
}
|
||||
|
||||
disableWarningsInGeneratedCode.set(true)
|
||||
allDisabledChecksAsWarnings.set(true)
|
||||
|
@ -83,4 +86,5 @@ tasks {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,5 +32,7 @@ jmhReport {
|
|||
tasks {
|
||||
named("jmh") {
|
||||
finalizedBy(named("jmhReport"))
|
||||
|
||||
outputs.cacheIf { false }
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue