From 387c3aae53e36c69b6fb0f1e9bf3bbf8359ed910 Mon Sep 17 00:00:00 2001 From: Ben Manes Date: Fri, 22 Sep 2023 16:59:15 -0700 Subject: [PATCH] minor build updates, JDK-22 EA --- .github/actions/run-gradle/action.yml | 4 ++-- .github/workflows/benchmarks.yml | 2 +- .github/workflows/build.yml | 4 ++-- .github/workflows/snyk.yml | 5 ++-- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- gradle/libs.versions.toml | 2 +- ...va-library-caffeine-conventions.gradle.kts | 24 +++++++------------ ...errorprone-caffeine-conventions.gradle.kts | 1 + gradle/wrapper/gradle-wrapper.properties | 2 +- .../guava/compatibility/CacheLoadingTest.java | 4 ++-- 14 files changed, 27 insertions(+), 31 deletions(-) diff --git a/.github/actions/run-gradle/action.yml b/.github/actions/run-gradle/action.yml index 00203e039b..191eaf0b2a 100644 --- a/.github/actions/run-gradle/action.yml +++ b/.github/actions/run-gradle/action.yml @@ -8,11 +8,11 @@ inputs: required: true description: The JDK version early-access: - default: '21' + default: '22' required: false description: The early access release graal: - default: '17' + default: '21' required: false description: The GraalVM version token: diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index 45ed6fa91f..21f5f3f792 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java: [ 11, 20, 21, GraalVM ] + java: [ 11, 21, 22, GraalVM ] env: JAVA_VERSION: ${{ matrix.java }} steps: diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ca9ff0d0d7..0c38cd53f8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -38,7 +38,7 @@ env: schemastore.org:443 www.graalvm.org:443 PUBLISH_JDK: 11 - EA_JDK: 21 + EA_JDK: 22 jobs: compile: @@ -47,7 +47,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java: [ 11, 20, 21, GraalVM ] + java: [ 11, 21, 22, GraalVM ] env: JAVA_VERSION: ${{ matrix.java }} steps: diff --git a/.github/workflows/snyk.yml b/.github/workflows/snyk.yml index d3f40317a8..b5123a4c7f 100644 --- a/.github/workflows/snyk.yml +++ b/.github/workflows/snyk.yml @@ -39,7 +39,7 @@ jobs: services.gradle.org:443 - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - name: Run Snyk test - uses: snyk/actions/gradle@master + uses: snyk/actions/gradle-jdk11@master continue-on-error: true env: SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} @@ -57,9 +57,10 @@ jobs: with: sarif_file: snyk.sarif - name: Run Snyk monitor - uses: snyk/actions/gradle@master + uses: snyk/actions/gradle-jdk11@master continue-on-error: true env: SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} with: command: monitor + args: -- --no-configuration-cache diff --git a/examples/coalescing-bulkloader-reactor/gradle/wrapper/gradle-wrapper.properties b/examples/coalescing-bulkloader-reactor/gradle/wrapper/gradle-wrapper.properties index ac72c34e8a..b745ffcc57 100644 --- a/examples/coalescing-bulkloader-reactor/gradle/wrapper/gradle-wrapper.properties +++ b/examples/coalescing-bulkloader-reactor/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-1-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/examples/graal-native/gradle/wrapper/gradle-wrapper.properties b/examples/graal-native/gradle/wrapper/gradle-wrapper.properties index c30b486a89..e3b77bf66e 100644 --- a/examples/graal-native/gradle/wrapper/gradle-wrapper.properties +++ b/examples/graal-native/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-1-bin.zip networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/examples/hibernate/gradle/wrapper/gradle-wrapper.properties b/examples/hibernate/gradle/wrapper/gradle-wrapper.properties index c30b486a89..e3b77bf66e 100644 --- a/examples/hibernate/gradle/wrapper/gradle-wrapper.properties +++ b/examples/hibernate/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-1-bin.zip networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/examples/resilience-failsafe/gradle/wrapper/gradle-wrapper.properties b/examples/resilience-failsafe/gradle/wrapper/gradle-wrapper.properties index ac72c34e8a..b745ffcc57 100644 --- a/examples/resilience-failsafe/gradle/wrapper/gradle-wrapper.properties +++ b/examples/resilience-failsafe/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-1-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/examples/write-behind-rxjava/gradle/wrapper/gradle-wrapper.properties b/examples/write-behind-rxjava/gradle/wrapper/gradle-wrapper.properties index ac72c34e8a..b745ffcc57 100644 --- a/examples/write-behind-rxjava/gradle/wrapper/gradle-wrapper.properties +++ b/examples/write-behind-rxjava/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-1-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 780317d2cd..49a07f4377 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -22,7 +22,7 @@ coveralls = "2.12.2" dependency-check = "8.4.0" eclipse-collections = "12.0.0.M3" ehcache3 = "3.10.8" -errorprone-core = "2.21.1" +errorprone-core = "2.22.0" errorprone-plugin = "3.1.0" errorprone-support = "0.13.0" expiring-map = "0.5.10" diff --git a/gradle/plugins/src/main/kotlin/lifecycle/java-library-caffeine-conventions.gradle.kts b/gradle/plugins/src/main/kotlin/lifecycle/java-library-caffeine-conventions.gradle.kts index 9f3e043ca4..34d853cf58 100644 --- a/gradle/plugins/src/main/kotlin/lifecycle/java-library-caffeine-conventions.gradle.kts +++ b/gradle/plugins/src/main/kotlin/lifecycle/java-library-caffeine-conventions.gradle.kts @@ -54,27 +54,21 @@ tasks.withType().configureEach { } } -val projectDescription = objects.property().convention(provider { project.description }) tasks.jar { inputs.property("version", project.version.toString()) outputs.cacheIf { true } metaInf { from("$rootDir/LICENSE") } - bundle { - properties = projectDescription.map { - mapOf("project.description" to it) - } - bnd(mapOf( - "Bundle-License" to "https://www.apache.org/licenses/LICENSE-2.0", - "Build-Jdk-Spec" to java.toolchain.languageVersion.get(), - "Implementation-Title" to project.description, - "Bundle-Description" to project.description, - "Implementation-Version" to version, - "-noextraheaders" to true, - "-reproducible" to true, - "-snapshot" to "SNAPSHOT")) - } + bundle.bnd(mapOf( + "Bundle-License" to "https://www.apache.org/licenses/LICENSE-2.0", + "Build-Jdk-Spec" to java.toolchain.languageVersion.get(), + "Implementation-Title" to project.description, + "Bundle-Description" to project.description, + "Implementation-Version" to version, + "-noextraheaders" to true, + "-reproducible" to true, + "-snapshot" to "SNAPSHOT")) } tasks.withType().configureEach { diff --git a/gradle/plugins/src/main/kotlin/quality/errorprone-caffeine-conventions.gradle.kts b/gradle/plugins/src/main/kotlin/quality/errorprone-caffeine-conventions.gradle.kts index 0821e63ec5..f27c5f7da3 100644 --- a/gradle/plugins/src/main/kotlin/quality/errorprone-caffeine-conventions.gradle.kts +++ b/gradle/plugins/src/main/kotlin/quality/errorprone-caffeine-conventions.gradle.kts @@ -125,6 +125,7 @@ fun enabledChecks() = listOf( "SwitchDefault", "TimeUnitMismatch", "TransientMisuse", + "TruthContainsExactlyElementsInUsage", "UnnecessarilyVisible", "UnnecessaryAnonymousClass", "UnnecessaryOptionalGet", diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 9f93a78601..cfebe1804e 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,4 +1,4 @@ -distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-1-bin.zip distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME diff --git a/guava/src/test/java/com/github/benmanes/caffeine/guava/compatibility/CacheLoadingTest.java b/guava/src/test/java/com/github/benmanes/caffeine/guava/compatibility/CacheLoadingTest.java index 00e3503b74..e511222039 100644 --- a/guava/src/test/java/com/github/benmanes/caffeine/guava/compatibility/CacheLoadingTest.java +++ b/guava/src/test/java/com/github/benmanes/caffeine/guava/compatibility/CacheLoadingTest.java @@ -448,7 +448,7 @@ public Map loadAll(Iterable keys) { Object[] lookupKeys = new Object[] { new Object(), new Object(), new Object() }; ImmutableMap result = cache.getAll(asList(lookupKeys)); - assertThat(result.keySet()).containsExactlyElementsIn(asList(lookupKeys)); + assertThat(result.keySet()).containsExactly(lookupKeys); for (Map.Entry entry : result.entrySet()) { Object key = entry.getKey(); Object value = entry.getValue(); @@ -485,7 +485,7 @@ public Map loadAll(Iterable keys) { Object[] lookupKeys = new Object[] { new Object(), new Object(), new Object() }; ImmutableMap result = cache.getAll(asList(lookupKeys)); - assertThat(result.keySet()).containsExactlyElementsIn(asList(lookupKeys)); + assertThat(result.keySet()).containsExactlyElementsIn(lookupKeys); for (Map.Entry entry : result.entrySet()) { Object key = entry.getKey(); Object value = entry.getValue();