diff --git a/.github/workflows/pr-build-workflow.yml b/.github/workflows/pr-build-workflow.yml index 22bc74e95e..38ba42600b 100644 --- a/.github/workflows/pr-build-workflow.yml +++ b/.github/workflows/pr-build-workflow.yml @@ -21,7 +21,7 @@ jobs: java-version: '17' distribution: 'temurin' - name: Build with Gradle - run: ./gradlew clean build --continue + run: ./gradlew clean build -PskipCheckExpectedBranchVersion --continue generate-docs: name: Generate Docs runs-on: ubuntu-latest diff --git a/buildSrc/src/main/java/org/springframework/security/CheckExpectedBranchVersionPlugin.java b/buildSrc/src/main/java/org/springframework/security/CheckExpectedBranchVersionPlugin.java index 40b943856c..9266f7c4d5 100644 --- a/buildSrc/src/main/java/org/springframework/security/CheckExpectedBranchVersionPlugin.java +++ b/buildSrc/src/main/java/org/springframework/security/CheckExpectedBranchVersionPlugin.java @@ -45,6 +45,9 @@ public class CheckExpectedBranchVersionPlugin implements Plugin { @TaskAction public void run() throws IOException { Project project = getProject(); + if (project.hasProperty("skipCheckExpectedBranchVersion")) { + return; + } String version = (String) project.getVersion(); String branchVersion = getBranchVersion(project); if (!branchVersion.matches("^[0-9]+\\.[0-9]+\\.x$")) {