File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
build-tools/build-infra/src/main/groovy Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -173,6 +173,17 @@ if (verboseMode && !verboseModeHookInstalled) {
173173 }
174174}
175175
176+ Provider<Integer > minMajorVersion = upperJavaFeatureVersionOption. map { ver -> Integer . parseInt(JavaVersion . toVersion(ver). majorVersion) }
177+ JavaVersion runtimeJava = rootProject. ext. runtimeJavaVersion
178+ boolean incubatorJavaVersion = rootProject. ext. vectorIncubatorJavaVersions. contains(runtimeJava)
179+
180+ // if the vector module is in incubator, pass lint flags to suppress excessive warnings.
181+ if (incubatorJavaVersion) {
182+ tasks. withType(JavaCompile ). configureEach {
183+ it. options. compilerArgs + = [" -Xlint:-incubating" ]
184+ }
185+ }
186+
176187tasks. withType(Test ). configureEach {
177188 // Running any test task should first display the root randomization seed.
178189 dependsOn " :showTestsSeed"
@@ -225,9 +236,6 @@ tasks.withType(Test).configureEach {
225236
226237 // Enable the vector incubator module on supported Java versions:
227238
228- Provider<Integer > minMajorVersion = upperJavaFeatureVersionOption. map { ver -> Integer . parseInt(JavaVersion . toVersion(ver). majorVersion) }
229- JavaVersion runtimeJava = rootProject. ext. runtimeJavaVersion
230- boolean incubatorJavaVersion = rootProject. ext. vectorIncubatorJavaVersions. contains(runtimeJava)
231239 boolean manualMinMajorVersion = minMajorVersion. isPresent() &&
232240 Integer . parseInt(runtimeJava. majorVersion) <= minMajorVersion. get()
233241 if (incubatorJavaVersion || manualMinMajorVersion) {
You can’t perform that action at this time.
0 commit comments