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 {
159159 * the enabled state of every bwc task. It should be set back to true
160160 * after the backport of the backcompat code is complete.
161161 */
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 */
164164if (bwc_tests_enabled == false ) {
165165 if (bwc_tests_disabled_issue. isEmpty()) {
166166 throw new GradleException (" bwc_tests_disabled_issue must be set when bwc_tests_enabled == false" )
@@ -170,6 +170,17 @@ if (bwc_tests_enabled == false) {
170170 println " See ${ bwc_tests_disabled_issue} "
171171 println " ==========================================================="
172172}
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+
173184subprojects {
174185 ext. bwc_tests_enabled = bwc_tests_enabled
175186 /*
You can’t perform that action at this time.
0 commit comments