Skip to content

Commit

Permalink
try upgrading Gradle build to require 17
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-manes committed Feb 28, 2024
1 parent 520efb9 commit a96229a
Show file tree
Hide file tree
Showing 19 changed files with 36 additions and 54 deletions.
22 changes: 4 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -341,26 +341,12 @@ jobs:
lightbend.github.io:443
guava.dev:443
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up JDK ${{ env.PUBLISH_JDK }}
uses: Wandalen/wretry.action@0ef67d343938e879e0a9bb37c107a55731e8ed35 # v1.4.5
with:
action: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4.0.0
with: |
distribution: temurin
java-version: ${{ env.PUBLISH_JDK }}
attempt_limit: 3
attempt_delay: 2000
- name: Setup Gradle
uses: Wandalen/wretry.action@0ef67d343938e879e0a9bb37c107a55731e8ed35 # v1.4.5
timeout-minutes: 5
uses: ./.github/actions/run-gradle
with:
action: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0
with: |
add-job-summary: never
cache-read-only: false
gradle-home-cache-cleanup: true
attempt_limit: 3
attempt_delay: 2000
java: ${{ env.PUBLISH_JDK }}
arguments: help -q
token: ${{ secrets.GITHUB_TOKEN }}
- name: Publish Snapshot
env:
JAVA_VERSION: ${{ env.PUBLISH_JDK }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ permissions:

env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
JAVA_VERSION: 11
JAVA_VERSION: 17

jobs:
analyze:
Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:
uses: Wandalen/wretry.action@0ef67d343938e879e0a9bb37c107a55731e8ed35 # v1.4.5
timeout-minutes: 5
with:
action: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4.0.0
action: actions/setup-java@9704b39bf258b59bc04b50fa2dd55e9ed76b47a8 # v4.1.0
with: |
distribution: temurin
java-version: ${{ env.JAVA_VERSION }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependency-submission-pr-submit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
uses: Wandalen/wretry.action@0ef67d343938e879e0a9bb37c107a55731e8ed35 # v1.4.5
timeout-minutes: 5
with:
action: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4.0.0
action: actions/setup-java@9704b39bf258b59bc04b50fa2dd55e9ed76b47a8 # v4.1.0
with: |
cache: gradle
distribution: temurin
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependency-submission.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
uses: Wandalen/wretry.action@0ef67d343938e879e0a9bb37c107a55731e8ed35 # v1.4.5
timeout-minutes: 5
with:
action: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4.0.0
action: actions/setup-java@9704b39bf258b59bc04b50fa2dd55e9ed76b47a8 # v4.1.0
with: |
cache: gradle
distribution: temurin
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
uses: Wandalen/wretry.action@0ef67d343938e879e0a9bb37c107a55731e8ed35 # v1.4.5
timeout-minutes: 5
with:
action: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4.0.0
action: actions/setup-java@9704b39bf258b59bc04b50fa2dd55e9ed76b47a8 # v4.1.0
with: |
distribution: temurin
java-version: ${{ env.JAVA_VERSION }}
Expand Down
23 changes: 4 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,12 @@ jobs:
disable-sudo: true
egress-policy: audit
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up JDK ${{ env.JAVA_VERSION }}
uses: Wandalen/wretry.action@0ef67d343938e879e0a9bb37c107a55731e8ed35 # v1.4.5
timeout-minutes: 5
with:
action: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4.0.0
with: |
distribution: temurin
java-version: ${{ env.JAVA_VERSION }}
attempt_limit: 3
attempt_delay: 2000
- name: Setup Gradle
uses: Wandalen/wretry.action@0ef67d343938e879e0a9bb37c107a55731e8ed35 # v1.4.5
timeout-minutes: 5
uses: ./.github/actions/run-gradle
with:
action: gradle/actions/setup-gradle@b6816cf21e7970b88479bb3c57d9cbe5cdd4b949 # v3.0.0-rc.1
with: |
add-job-summary: never
cache-read-only: false
gradle-home-cache-cleanup: true
attempt_limit: 3
attempt_delay: 2000
java: ${{ env.JAVA_VERSION }}
arguments: help -q
token: ${{ secrets.GITHUB_TOKEN }}
- name: Releasing
env:
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.NEXUS_USERNAME }}
Expand Down
2 changes: 1 addition & 1 deletion .java-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
11.0
17.0
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
java 11
java 17
2 changes: 2 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ plugins {
id("root-caffeine-conventions")
}

require(JavaVersion.current() >= JavaVersion.VERSION_17) { "Java 17 or greater is required" }

allprojects {
description = "A high performance caching library"
group = "com.github.ben-manes.caffeine"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-rc-1-bin.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-rc-1-bin.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-rc-1-bin.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-rc-1-bin.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-rc-1-bin.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
Expand Down
10 changes: 10 additions & 0 deletions gradle/config/spotbugs/exclude.xml
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,16 @@
<Method name="reformat"/>
<Bug pattern="RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE"/>
</Match>
<Match>
<Class name="com.github.benmanes.caffeine.cache.local.AddSubtype"/>
<Method name="getJavaDoc"/>
<Bug pattern="POTENTIAL_XML_INJECTION"/>
</Match>
<Match>
<Class name="com.github.benmanes.caffeine.cache.node.AddSubtype"/>
<Method name="getJavaDoc"/>
<Bug pattern="POTENTIAL_XML_INJECTION"/>
</Match>
<Match>
<Class name="~com.github.benmanes.caffeine.*Benchmark.*"/>
<Bug pattern="PREDICTABLE_RANDOM"/>
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ asm = "9.6"
auto-value = "1.10.4"
awaitility = "4.2.0"
bcel = "6.8.2"
bnd = "6.4.0"
bnd = "7.0.0"
bouncycastle-jdk15on = "1.70"
bouncycastle-jdk18on = "1.77"
cache2k = "2.6.1.Final"
Expand Down
1 change: 0 additions & 1 deletion gradle/plugins/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ tasks.withType<DependencyUpdatesTask> {
}
}
}
force(libs.bnd)
}
}

Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-rc-1-bin.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
Expand Down
4 changes: 2 additions & 2 deletions jitpack.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
before_install:
- source "$HOME/.sdkman/bin/sdkman-init.sh"
- sdk update
- sdk install java 11.0.13-zulu
- sdk use java 11.0.13-zulu
- sdk install java 17-zulu
- sdk use java 17-zulu

0 comments on commit a96229a

Please sign in to comment.