diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2dbb449b6..befee3d2e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,8 +26,8 @@ jobs: - uses: actions/setup-java@v4 with: java-version: | - 17 11 + 17 distribution: 'zulu' cache: 'gradle' - name: Prepare build variables @@ -38,7 +38,7 @@ jobs: - name: Build env: ORG_GRADLE_PROJECT_version: ${{ steps.build_variables.outputs.VERSION }} - run: ./gradlew build --stacktrace ${{ steps.build_variables.outputs.REPO }}-web:installDist + run: ./gradlew -PenableCrossCompilerPlugin=true build --stacktrace ${{ steps.build_variables.outputs.REPO }}-web:installDist - name: Build local slim container image for testing uses: docker/build-push-action@v5 with: diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 018a9755b..d5941199d 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -26,7 +26,9 @@ jobs: - name: Set up JDK 11 uses: actions/setup-java@v4 with: - java-version: 11 + java-version: | + 11 + 17 distribution: 'zulu' cache: 'gradle' @@ -53,8 +55,8 @@ jobs: uses: actions/setup-java@v4 with: java-version: | - 17 11 + 17 distribution: 'zulu' cache: 'gradle' @@ -75,8 +77,8 @@ jobs: - uses: actions/setup-java@v4 with: java-version: | - 17 11 + 17 distribution: 'zulu' cache: 'gradle' - name: Prepare build variables @@ -87,7 +89,7 @@ jobs: - name: Build env: ORG_GRADLE_PROJECT_version: ${{ steps.build_variables.outputs.VERSION }} - run: ./gradlew build ${{ steps.build_variables.outputs.REPO }}-web:installDist $GRADLE_ARGS + run: ./gradlew -PenableCrossCompilerPlugin=true build ${{ steps.build_variables.outputs.REPO }}-web:installDist $GRADLE_ARGS - name: Build slim container image uses: docker/build-push-action@v5 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3dedb7a70..519de980f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,8 +24,8 @@ jobs: - uses: actions/setup-java@v4 with: java-version: | - 17 11 + 17 distribution: 'zulu' cache: 'gradle' - name: Assemble release info @@ -52,14 +52,14 @@ jobs: ORG_GRADLE_PROJECT_nexusPgpSigningKey: ${{ secrets.NEXUS_PGP_SIGNING_KEY }} ORG_GRADLE_PROJECT_nexusPgpSigningPassword: ${{ secrets.NEXUS_PGP_SIGNING_PASSWORD }} run: | - ./gradlew --info build ${{ steps.build_variables.outputs.REPO }}-web:installDist publishToNexus closeAndReleaseNexusStagingRepository + ./gradlew -PenableCrossCompilerPlugin=true --info build ${{ steps.build_variables.outputs.REPO }}-web:installDist publishToNexus closeAndReleaseNexusStagingRepository - name: Publish apt packages to Google Artifact Registry env: ORG_GRADLE_PROJECT_version: ${{ steps.release_info.outputs.RELEASE_VERSION }} ORG_GRADLE_PROJECT_artifactRegistryPublishEnabled: true GAR_JSON_KEY: ${{ secrets.GAR_JSON_KEY }} run: | - ./gradlew --info publish + ./gradlew -PenableCrossCompilerPlugin=true --info publish - name: Login to Google Cloud # Only run this on repositories in the 'spinnaker' org, not on forks. if: startsWith(github.repository, 'spinnaker/') diff --git a/Dockerfile.compile b/Dockerfile.compile index d51c5e9b0..17b5f1283 100644 --- a/Dockerfile.compile +++ b/Dockerfile.compile @@ -5,4 +5,4 @@ RUN apk add --update \ LABEL maintainer="sig-platform@spinnaker.io" ENV GRADLE_USER_HOME /workspace/.gradle ENV GRADLE_OPTS -Xmx4g -CMD ./gradlew --no-daemon kayenta-web:installDist -x test +CMD ./gradlew -PenableCrossCompilerPlugin=true --no-daemon kayenta-web:installDist -x test diff --git a/build.gradle b/build.gradle index 4feb8c344..f275981ae 100644 --- a/build.gradle +++ b/build.gradle @@ -54,17 +54,6 @@ subprojects { project -> } } - tasks.withType(JavaCompile).configureEach { - javaCompiler = javaToolchains.compilerFor { - languageVersion = JavaLanguageVersion.of(11) - } - } - tasks.withType(Test).configureEach { - javaLauncher = javaToolchains.launcherFor { - languageVersion = JavaLanguageVersion.of(17) - } - } - configurations.all { exclude group: 'org.mortbay.jetty', module: 'servlet-api' exclude group: 'javax.servlet', module: 'servlet-api' diff --git a/gradle.properties b/gradle.properties index 74f954751..6d641aba8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ orcaVersion=8.52.0 org.gradle.parallel=true spinnakerGradleVersion=8.32.1 -targetJava11=true +targetJava17=false org.gradle.jvmargs=-Xmx2g