File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -159,8 +159,8 @@ task verifyVersions {
159
159
* the enabled state of every bwc task. It should be set back to true
160
160
* after the backport of the backcompat code is complete.
161
161
*/
162
- final boolean bwc_tests_enabled = true
163
- final String bwc_tests_disabled_issue = " " /* place a PR link here when commiting bwc changes */
162
+ boolean bwc_tests_enabled = true
163
+ final String bwc_tests_disabled_issue = " " /* place a PR link here when committing bwc changes */
164
164
if (bwc_tests_enabled == false ) {
165
165
if (bwc_tests_disabled_issue. isEmpty()) {
166
166
throw new GradleException (" bwc_tests_disabled_issue must be set when bwc_tests_enabled == false" )
@@ -170,6 +170,17 @@ if (bwc_tests_enabled == false) {
170
170
println " See ${ bwc_tests_disabled_issue} "
171
171
println " ==========================================================="
172
172
}
173
+ if (project. gradle. startParameter. taskNames. find { it. startsWith(" checkPart" ) } != null ) {
174
+ // Disable BWC tests for checkPart* tasks as it's expected that this will run un it's own check
175
+ bwc_tests_enabled = false
176
+ }
177
+ if (project. gradle. startParameter. taskNames. contains(" bwcTestSnapshots" ) && bwc_tests_enabled == false ) {
178
+ throw new GradleException (" BWC tests are disabled. " +
179
+ " This can happen if a branch happened to be created when they were disabled and can be solved by mergin at" +
180
+ " least to the commit on the parent branch that re-enabled them"
181
+ )
182
+ }
183
+
173
184
subprojects {
174
185
ext. bwc_tests_enabled = bwc_tests_enabled
175
186
/*
You can’t perform that action at this time.
0 commit comments