Skip to content

Commit

Permalink
chore(java11): Target Java 11 (spinnaker#1372)
Browse files Browse the repository at this point in the history
  • Loading branch information
plumpy authored Oct 7, 2020
1 parent 2211513 commit 9a4c9a1
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 26 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -31,4 +26,4 @@ jobs:
restore-keys: |
${{ runner.os }}-gradle-
- name: Build
run: ./gradlew -PenableCrossCompilerPlugin=true build --stacktrace
run: ./gradlew build --stacktrace
7 changes: 1 addition & 6 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -25,4 +20,4 @@ jobs:
restore-keys: |
${{ runner.os }}-gradle-
- name: Build
run: ./gradlew -PenableCrossCompilerPlugin=true build
run: ./gradlew build
5 changes: 0 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 1 addition & 4 deletions Dockerfile.compile
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
FROM alpine:3.11
RUN apk add --update \
openjdk11 \
openjdk8 \
&& rm -rf /var/cache/apk
LABEL maintainer="[email protected]"
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
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public Map reorderPipelineStrategies(
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");
Expand Down
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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'`.
Expand Down
4 changes: 2 additions & 2 deletions gradle/kotlin-test.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
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"
Expand All @@ -39,6 +39,6 @@ test {
compileTestKotlin {
kotlinOptions {
languageVersion = "1.4"
jvmTarget = "1.8"
jvmTarget = "11"
}
}
4 changes: 2 additions & 2 deletions gradle/kotlin.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}

Expand Down

0 comments on commit 9a4c9a1

Please sign in to comment.