chore(java11): Target Java 11
MODIFY
.github/workflows/build.yml
.github/workflows/build.yml
@@ -16,11 +16,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- # Install Java 8 for cross-compilation support. Setting it up before
- # Java 11 means it comes later in $PATH (because of how setup-java works)
- - uses: actions/setup-java@v1
- with:
- java-version: 8
- uses: actions/setup-java@v1
with:
java-version: 11
@@ -31,4 +26,4 @@ jobs:
restore-keys: |
${{ runner.os }}-gradle-
- name: Build
- run: ./gradlew -PenableCrossCompilerPlugin=true build --stacktrace
+ run: ./gradlew build --stacktrace

MODIFY
.github/workflows/pr.yml
.github/workflows/pr.yml
@@ -10,11 +10,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- # Install Java 8 for cross-compilation support. Setting it up before
- # Java 11 means it comes later in $PATH (because of how setup-java works)
- - uses: actions/setup-java@v1
- with:
- java-version: 8
- uses: actions/setup-java@v1
with:
java-version: 11
@@ -25,4 +20,4 @@ jobs:
restore-keys: |
${{ runner.os }}-gradle-
- name: Build
- run: ./gradlew -PenableCrossCompilerPlugin=true build
+ run: ./gradlew build

MODIFY
.github/workflows/release.yml
.github/workflows/release.yml
@@ -15,11 +15,6 @@ jobs:
steps:
- uses: actions/checkout@v2
- run: git fetch --prune --unshallow
- # Install Java 8 for cross-compilation support. Setting it up before
- # Java 11 means it comes later in $PATH (because of how setup-java works)
- - uses: actions/setup-java@v1
- with:
- java-version: 8
- uses: actions/setup-java@v1
with:
java-version: 11

MODIFY
Dockerfile.compile
Dockerfile.compile
FROM alpine:3.11
RUN apk add --update \
openjdk11 \
- openjdk8 \
&& rm -rf /var/cache/apk
LABEL maintainer="sig-platform@spinnaker.io"
-ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk
-ENV JDK_18 /usr/lib/jvm/java-1.8-openjdk
ENV GRADLE_USER_HOME /workspace/.gradle
ENV GRADLE_OPTS -Xmx4g
-CMD ./gradlew --no-daemon -PenableCrossCompilerPlugin=true gate-web:installDist -x test
+CMD ./gradlew --no-daemon gate-web:installDist -x test

MODIFY
gate-web/src/main/groovy/com/netflix/spinnaker/gate/controllers/ReorderPipelinesController.java
gate-web/src/main/groovy/com/netflix/spinnaker/gate/controllers/ReorderPipelinesController.java
@@ -63,7 +63,7 @@ public class ReorderPipelinesController {
private Map handlePipelineReorder(
ReorderPipelinesCommand reorderPipelinesCommand, Boolean isStrategy) {
Map<String, Integer> idsToIndices = reorderPipelinesCommand.getIdsToIndices();
- String application = reorderPipelinesCommand.getApplication();
+ var application = reorderPipelinesCommand.getApplication();
if (idsToIndices == null) {
throw new InvalidRequestException("`idsToIndices` is required field on request body");

MODIFY
gradle.properties
gradle.properties
@@ -5,6 +5,7 @@ korkVersion=7.76.3
kotlinVersion=1.4.0
org.gradle.parallel=true
spinnakerGradleVersion=8.9.0
+targetJava11=true
# To enable a composite reference to a project, set the
# project property `'<projectName>Composite=true'`.

MODIFY
gradle/kotlin-test.gradle
gradle/kotlin-test.gradle
apply plugin: "kotlin"
dependencies {
- testImplementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
+ testImplementation "org.jetbrains.kotlin:kotlin-stdlib"
testImplementation "org.junit.jupiter:junit-jupiter-api"
testImplementation "org.junit.platform:junit-platform-runner"
@@ -39,6 +39,6 @@ test {
compileTestKotlin {
kotlinOptions {
languageVersion = "1.4"
- jvmTarget = "1.8"
+ jvmTarget = "11"
}
}

MODIFY
gradle/kotlin.gradle
gradle/kotlin.gradle
@@ -20,14 +20,14 @@ apply plugin: "kotlin-spring"
compileKotlin {
kotlinOptions {
languageVersion = "1.4"
- jvmTarget = "1.8"
+ jvmTarget = "11"
}
}
compileTestKotlin {
kotlinOptions {
languageVersion = "1.4"
- jvmTarget = "1.8"
+ jvmTarget = "11"
}
}

chore(java11): Target Java 11 (#1372)