File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
conventions/src/main/kotlin Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ dependencies {
1010}
1111
1212val disableErrorProne = properties[" disableErrorProne" ]?.toString()?.toBoolean() ? : false
13+ val testLatestDeps = gradle.startParameter.projectProperties[" testLatestDeps" ] == " true"
1314
1415tasks {
1516 withType<JavaCompile >().configureEach {
@@ -126,6 +127,13 @@ tasks {
126127 // We get this warning in modules that compile for old java versions
127128 disable(" StringConcatToTextBlock" )
128129
130+ if (testLatestDeps) {
131+ // Some latest dep tests are compiled for java 17 although the base version uses an older
132+ // version. Disable rules that suggest using new language features.
133+ disable(" StatementSwitchToExpressionSwitch" )
134+ disable(" PatternMatchingInstanceof" )
135+ }
136+
129137 if (name.contains(" Jmh" ) || name.contains(" Test" )) {
130138 // Allow underscore in test-type method names
131139 disable(" MemberName" )
You can’t perform that action at this time.
0 commit comments