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 @@ -163,8 +163,8 @@ task verifyVersions {
163163 * the enabled state of every bwc task. It should be set back to true
164164 * after the backport of the backcompat code is complete.
165165 */
166- final boolean bwc_tests_enabled = true
167- final String bwc_tests_disabled_issue = " " /* place a PR link here when commiting bwc changes */
166+ boolean bwc_tests_enabled = true
167+ final String bwc_tests_disabled_issue = " " /* place a PR link here when committing bwc changes */
168168if (bwc_tests_enabled == false ) {
169169 if (bwc_tests_disabled_issue. isEmpty()) {
170170 throw new GradleException (" bwc_tests_disabled_issue must be set when bwc_tests_enabled == false" )
@@ -174,6 +174,17 @@ if (bwc_tests_enabled == false) {
174174 println " See ${ bwc_tests_disabled_issue} "
175175 println " ==========================================================="
176176}
177+ if (project. gradle. startParameter. taskNames. find { it. startsWith(" checkPart" ) } != null ) {
178+ // Disable BWC tests for checkPart* tasks as it's expected that this will run un it's own check
179+ bwc_tests_enabled = false
180+ }
181+ if (project. gradle. startParameter. taskNames. contains(" bwcTestSnapshots" ) && bwc_tests_enabled == false ) {
182+ throw new GradleException (" BWC tests are disabled. " +
183+ " This can happen if a branch happened to be created when they were disabled and can be solved by mergin at" +
184+ " least to the commit on the parent branch that re-enabled them"
185+ )
186+ }
187+
177188subprojects {
178189 ext. bwc_tests_enabled = bwc_tests_enabled
179190 /*
You can’t perform that action at this time.
0 commit comments