Skip to content

Commit

Permalink
add jdk19 to CI (#1001)
Browse files Browse the repository at this point in the history
Updates the actions to add JDKs from newest to oldest
so that JAVA_HOME at the end will be the older version.
That version should be used by gradle.

Remove special case checks for guice dependencies based
on the java version. They do not work with gradle toolchains
and artifacts were published with the new guice already. Will
stick with that for now unless it creates problems. This first
happened in 1.3.6 which was released in early August 2022.
No issues have been reported thus far.
  • Loading branch information
brharrington authored Oct 19, 2022
1 parent e663269 commit c8f2028
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 29 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,26 @@ jobs:
fetch-depth: 0
- name: Gradle wrapper validation
uses: gradle/wrapper-validation-action@v1
- name: Set up JDK 8
- name: Set up JDK 19
uses: actions/setup-java@v3
with:
java-version: 8
java-version: 19
distribution: 'zulu'
cache: 'gradle'
- run: echo "JDK8=$JAVA_HOME" >> $GITHUB_ENV
- run: echo "JDK19=$JAVA_HOME" >> $GITHUB_ENV
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'zulu'
cache: 'gradle'
- run: echo "JDK17=$JAVA_HOME" >> $GITHUB_ENV
- name: Set up JDK 18
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: 18
java-version: 8
distribution: 'zulu'
cache: 'gradle'
- run: echo "JDK18=$JAVA_HOME" >> $GITHUB_ENV
- run: echo "JDK8=$JAVA_HOME" >> $GITHUB_ENV
- name: Build
run: ./gradlew build
12 changes: 6 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,27 @@ jobs:
- uses: actions/checkout@v3
- name: Gradle wrapper validation
uses: gradle/wrapper-validation-action@v1
- name: Set up JDK 8
- name: Set up JDK 19
uses: actions/setup-java@v3
with:
java-version: 8
java-version: 19
distribution: 'zulu'
cache: 'gradle'
- run: echo "JDK8=$JAVA_HOME" >> $GITHUB_ENV
- run: echo "JDK19=$JAVA_HOME" >> $GITHUB_ENV
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'zulu'
cache: 'gradle'
- run: echo "JDK17=$JAVA_HOME" >> $GITHUB_ENV
- name: Set up JDK 18
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: 18
java-version: 8
distribution: 'zulu'
cache: 'gradle'
- run: echo "JDK18=$JAVA_HOME" >> $GITHUB_ENV
- run: echo "JDK8=$JAVA_HOME" >> $GITHUB_ENV
- name: Build candidate
if: contains(github.ref, '-rc.')
run: ./gradlew --info --stacktrace -Prelease.useLastTag=true candidate
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,27 @@ jobs:
fetch-depth: 0
- name: Gradle wrapper validation
uses: gradle/wrapper-validation-action@v1
- name: Set up JDK 8
- name: Set up JDK 19
uses: actions/setup-java@v3
with:
java-version: 8
java-version: 19
distribution: 'zulu'
cache: 'gradle'
- run: echo "JDK8=$JAVA_HOME" >> $GITHUB_ENV
- run: echo "JDK19=$JAVA_HOME" >> $GITHUB_ENV
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'zulu'
cache: 'gradle'
- run: echo "JDK17=$JAVA_HOME" >> $GITHUB_ENV
- name: Set up JDK 18
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: 18
java-version: 8
distribution: 'zulu'
cache: 'gradle'
- run: echo "JDK18=$JAVA_HOME" >> $GITHUB_ENV
- run: echo "JDK8=$JAVA_HOME" >> $GITHUB_ENV
- name: Build
run: ./gradlew build snapshot
env:
Expand Down
6 changes: 1 addition & 5 deletions spectator-ext-ipcservlet/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@ dependencies {
compileOnly 'javax.servlet:javax.servlet-api:4.0.1'
testImplementation 'org.eclipse.jetty:jetty-servlet:9.4.11.v20180605'
testImplementation 'org.eclipse.jetty:jetty-webapp:9.4.11.v20180605'
if (JavaVersion.current().isJava11Compatible()) {
testImplementation 'com.google.inject.extensions:guice-servlet'
} else {
testImplementation 'com.google.inject.extensions:guice-servlet:4.1.0'
}
testImplementation 'com.google.inject.extensions:guice-servlet'
}

jar {
Expand Down
7 changes: 1 addition & 6 deletions spectator-nflx-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@ dependencies {
api project(':spectator-ext-jvm')
api project(':spectator-reg-atlas')
implementation 'javax.inject:javax.inject'
if (JavaVersion.current().isJava11Compatible()) {
implementation "com.google.inject:guice"
} else {
implementation "com.google.inject:guice:4.1.0"
implementation "com.google.inject.extensions:guice-multibindings:4.1.0"
}
implementation "com.google.inject:guice"
implementation "com.netflix.archaius:archaius2-core"
implementation 'com.netflix.iep:iep-nflxenv'
implementation "com.netflix.servo:servo-core"
Expand Down

0 comments on commit c8f2028

Please sign in to comment.