Skip to content

Commit b6197d7

Browse files
Merge branch 'main' into HIBERNATE-40-improve-executeUpdate
2 parents 564f8a1 + fa08db6 commit b6197d7

File tree

1 file changed

+10
-14
lines changed

1 file changed

+10
-14
lines changed

build.gradle.kts

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -144,19 +144,16 @@ class MultilineFormatter : Serializable {
144144
}
145145

146146
tasks.withType<JavaCompile>().configureEach {
147-
options.errorprone {
148-
disableWarningsInGeneratedCode.set(true)
149-
option("NullAway:AnnotatedPackages", "com.mongodb.hibernate")
150-
}
151-
}
152-
tasks.compileJava {
153-
// The check defaults to a warning, bump it up to an error for the main sources
154-
options.errorprone.error("NullAway")
155147
options.compilerArgs.addAll(listOf("-Xlint:deprecation", "-Werror"))
156-
}
157-
158-
tasks.compileTestJava {
159-
options.errorprone.isEnabled.set(false)
148+
if (name == "compileJava") {
149+
options.errorprone {
150+
disableWarningsInGeneratedCode.set(true)
151+
option("NullAway:AnnotatedPackages", "com.mongodb.hibernate")
152+
error("NullAway")
153+
}
154+
} else {
155+
options.errorprone.isEnabled.set(false)
156+
}
160157
}
161158

162159
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -189,5 +186,4 @@ dependencies {
189186
implementation(libs.hibernate.core)
190187
implementation(libs.mongo.java.driver.sync)
191188
implementation(libs.sl4j.api)
192-
}
193-
189+
}

0 commit comments

Comments
 (0)