From 31bd8185183791821c2f0a74a301ad3c6f905508 Mon Sep 17 00:00:00 2001 From: Rafael Winterhalter Date: Wed, 11 Dec 2019 12:47:07 +0100 Subject: [PATCH] Adjust build script to skip Gradle on unsupported JDK versions. --- .github/workflows/main.yml | 15 ++------------- byte-buddy-gradle-plugin/build.gradle | 4 ---- byte-buddy-gradle-plugin/main.gradle | 2 -- byte-buddy-gradle-plugin/pom.xml | 17 +++++++++++++++++ 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6143a90db71..91fbdb27c9d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,11 +18,10 @@ jobs: - uses: actions/checkout@v1 with: fetch-depth: 1 - - name: Install JDK and build project (without Gradle) + - name: Install JDK and build project run: | . ./.github/scripts/install-jdk.sh --feature ea --os linux-x64 - ./mvnw verify -Pjava14 -pl !byte-buddy-gradle-plugin - ./mvnw verify -Pjava14 -pl !byte-buddy-gradle-plugin + ./mvnw verify -Pjava14 hotspot-supported: name: HotSpot (supported) strategy: @@ -41,10 +40,6 @@ jobs: architecture: x64 - name: Build project run: ./mvnw verify -Pintegration -Pjava${{ matrix.java }} - if: matrix.java < 14 - - name: Build project (without Gradle) - run: ./mvnw verify -Pintegration -Pjava${{ matrix.java }} -pl !byte-buddy-gradle-plugin - if: matrix.java > 13 hotspot-unsupported: name: HotSpot (unsupported) strategy: @@ -90,12 +85,6 @@ jobs: run: | . ./.github/scripts/install-jdk.sh --url "https://api.adoptopenjdk.net/v2/binary/releases/openjdk${{ matrix.java }}?openjdk_impl=openj9&os=linux&arch=x64&release=latest&type=jdk&heap_size=normal" ./mvnw verify -Pintegration -Pjava${{ matrix.java }} - if: matrix.java < 14 - - name: Install JDK and build project (without Gradle) - run: | - . ./.github/scripts/install-jdk.sh --url "https://api.adoptopenjdk.net/v2/binary/releases/openjdk${{ matrix.java }}?openjdk_impl=openj9&os=linux&arch=x64&release=latest&type=jdk&heap_size=normal" - ./mvnw verify -Pintegration -Pjava${{ matrix.java }} -pl !byte-buddy-gradle-plugin - if: matrix.java > 13 coverage: name: Coverage runs-on: ubuntu-18.04 diff --git a/byte-buddy-gradle-plugin/build.gradle b/byte-buddy-gradle-plugin/build.gradle index 2a795834af6..8c60233eb0b 100644 --- a/byte-buddy-gradle-plugin/build.gradle +++ b/byte-buddy-gradle-plugin/build.gradle @@ -6,10 +6,6 @@ plugins { apply from: './main.gradle' -if (legacy) { - throw new GradleException("Current JDK version only supports simple build (--build-file build.simple.gradle)"); -} - version = pom.parent.version.text().toString() if (gradle.gradleVersion.startsWith("2.")) { // support legacy version diff --git a/byte-buddy-gradle-plugin/main.gradle b/byte-buddy-gradle-plugin/main.gradle index 4777066819f..2ad1b887767 100644 --- a/byte-buddy-gradle-plugin/main.gradle +++ b/byte-buddy-gradle-plugin/main.gradle @@ -14,8 +14,6 @@ if (!raw.startsWith("1.") && raw.contains(".")) { current = JavaVersion.toVersion(raw) } -ext.legacy = current < JavaVersion.VERSION_1_8 - def sourceVersion = System.getProperty("net.bytebuddy.gradle.version.source") if (sourceVersion != null) { sourceCompatibility = JavaVersion.toVersion(sourceVersion) diff --git a/byte-buddy-gradle-plugin/pom.xml b/byte-buddy-gradle-plugin/pom.xml index 0eb82517a7f..5371bcad6c7 100644 --- a/byte-buddy-gradle-plugin/pom.xml +++ b/byte-buddy-gradle-plugin/pom.xml @@ -29,6 +29,7 @@ 1.8 gradlew + false @@ -68,6 +69,9 @@ org.codehaus.mojo exec-maven-plugin ${version.plugin.exec} + + ${gradle.disabled} + gradle-clean @@ -149,6 +153,7 @@ + gradle-windows @@ -162,6 +167,18 @@ + + + gradle-disabled + + false + [14,) + + + true + + + extras