diff --git a/caffeine/build.gradle.kts b/caffeine/build.gradle.kts index 1e032ec78e..aa617a1eeb 100644 --- a/caffeine/build.gradle.kts +++ b/caffeine/build.gradle.kts @@ -24,7 +24,7 @@ sourceSets { val compileJavaPoetJava by tasks.existing val javaAgent: Configuration by configurations.creating val collections4Sources: Configuration by configurations.creating -var javaPoetImplementation: Configuration = configurations["javaPoetImplementation"] +val javaPoetImplementation: Configuration = configurations["javaPoetImplementation"] dependencies { api(libs.checker.annotations) @@ -39,7 +39,6 @@ dependencies { testImplementation(libs.jctools) testImplementation(libs.fastutil) testImplementation(libs.lincheck) - testImplementation(libs.guava.testlib) testImplementation(libs.commons.lang3) testImplementation(libs.bundles.slf4j.test) testImplementation(libs.commons.collections4) diff --git a/examples/coalescing-bulkloader-reactor/gradle/libs.versions.toml b/examples/coalescing-bulkloader-reactor/gradle/libs.versions.toml index 59b413a8aa..d9772e75a2 100644 --- a/examples/coalescing-bulkloader-reactor/gradle/libs.versions.toml +++ b/examples/coalescing-bulkloader-reactor/gradle/libs.versions.toml @@ -2,7 +2,7 @@ caffeine = "3.1.8" junit = "5.11.0-M2" reactor = "3.6.7" -truth = "1.4.3" +truth = "1.4.4" versions = "0.51.0" [libraries] diff --git a/examples/coalescing-bulkloader-reactor/gradle/wrapper/gradle-wrapper.properties b/examples/coalescing-bulkloader-reactor/gradle/wrapper/gradle-wrapper.properties index e021a95878..0af00fb146 100644 --- a/examples/coalescing-bulkloader-reactor/gradle/wrapper/gradle-wrapper.properties +++ b/examples/coalescing-bulkloader-reactor/gradle/wrapper/gradle-wrapper.properties @@ -1,4 +1,4 @@ -distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-rc-1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME diff --git a/examples/graal-native/gradle/libs.versions.toml b/examples/graal-native/gradle/libs.versions.toml index 86d7356c16..43c74b3cbc 100644 --- a/examples/graal-native/gradle/libs.versions.toml +++ b/examples/graal-native/gradle/libs.versions.toml @@ -2,7 +2,7 @@ caffeine = "3.1.8" graal = "0.10.2" junit = "5.11.0-M2" -truth = "1.4.3" +truth = "1.4.4" versions = "0.51.0" [libraries] diff --git a/examples/graal-native/gradle/wrapper/gradle-wrapper.properties b/examples/graal-native/gradle/wrapper/gradle-wrapper.properties index e021a95878..0af00fb146 100644 --- a/examples/graal-native/gradle/wrapper/gradle-wrapper.properties +++ b/examples/graal-native/gradle/wrapper/gradle-wrapper.properties @@ -1,4 +1,4 @@ -distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-rc-1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME diff --git a/examples/hibernate/gradle/libs.versions.toml b/examples/hibernate/gradle/libs.versions.toml index b100c2580f..9298a0a88c 100644 --- a/examples/hibernate/gradle/libs.versions.toml +++ b/examples/hibernate/gradle/libs.versions.toml @@ -5,7 +5,7 @@ hibernate = "6.5.2.Final" junit = "5.11.0-M2" log4j2 = "3.0.0-beta2" slf4j = "2.0.7" -truth = "1.4.3" +truth = "1.4.4" versions = "0.51.0" [libraries] diff --git a/examples/hibernate/gradle/wrapper/gradle-wrapper.properties b/examples/hibernate/gradle/wrapper/gradle-wrapper.properties index e021a95878..0af00fb146 100644 --- a/examples/hibernate/gradle/wrapper/gradle-wrapper.properties +++ b/examples/hibernate/gradle/wrapper/gradle-wrapper.properties @@ -1,4 +1,4 @@ -distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-rc-1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME diff --git a/examples/indexable/gradle.properties b/examples/indexable/gradle.properties new file mode 100644 index 0000000000..560b0f9c22 --- /dev/null +++ b/examples/indexable/gradle.properties @@ -0,0 +1,5 @@ +org.gradle.configuration-cache=true +org.gradle.configureondemand=true +org.gradle.parallel=true +org.gradle.caching=true +org.gradle.daemon=true diff --git a/examples/indexable/gradle/libs.versions.toml b/examples/indexable/gradle/libs.versions.toml index 4f6e6e0138..54029919f2 100644 --- a/examples/indexable/gradle/libs.versions.toml +++ b/examples/indexable/gradle/libs.versions.toml @@ -2,7 +2,7 @@ caffeine = "3.1.8" guava = "33.2.1-jre" junit-jupiter = "5.11.0-M2" -truth = "1.4.3" +truth = "1.4.4" versions = "0.51.0" [libraries] diff --git a/examples/indexable/gradle/wrapper/gradle-wrapper.properties b/examples/indexable/gradle/wrapper/gradle-wrapper.properties index e021a95878..0af00fb146 100644 --- a/examples/indexable/gradle/wrapper/gradle-wrapper.properties +++ b/examples/indexable/gradle/wrapper/gradle-wrapper.properties @@ -1,4 +1,4 @@ -distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-rc-1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME diff --git a/examples/resilience-failsafe/gradle/libs.versions.toml b/examples/resilience-failsafe/gradle/libs.versions.toml index 30fa3b18e0..92c11eb802 100644 --- a/examples/resilience-failsafe/gradle/libs.versions.toml +++ b/examples/resilience-failsafe/gradle/libs.versions.toml @@ -2,7 +2,7 @@ caffeine = "3.1.8" failsafe = "3.3.2" junit = "5.11.0-M2" -truth = "1.4.3" +truth = "1.4.4" versions = "0.51.0" [libraries] diff --git a/examples/resilience-failsafe/gradle/wrapper/gradle-wrapper.properties b/examples/resilience-failsafe/gradle/wrapper/gradle-wrapper.properties index e021a95878..0af00fb146 100644 --- a/examples/resilience-failsafe/gradle/wrapper/gradle-wrapper.properties +++ b/examples/resilience-failsafe/gradle/wrapper/gradle-wrapper.properties @@ -1,4 +1,4 @@ -distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-rc-1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists 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 e021a95878..0af00fb146 100644 --- a/examples/write-behind-rxjava/gradle/wrapper/gradle-wrapper.properties +++ b/examples/write-behind-rxjava/gradle/wrapper/gradle-wrapper.properties @@ -1,4 +1,4 @@ -distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-rc-1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index ad8bc3499a..6dcf131488 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -19,7 +19,7 @@ commons-text = "1.12.0" concurrentlinkedhashmap = "1.4.2" config = "1.4.3" coveralls = "2.12.2" -dependency-check = "10.0.1" +dependency-check = "10.0.2" eclipse-collections = "12.0.0.M3" ehcache3 = "3.10.8" errorprone = "2.28.0" @@ -41,8 +41,8 @@ hamcrest = "2.2" hazelcast = "5.3.7" httpclient = "4.5.14" idea = "1.1.8" -jackrabbit = "1.64.0" -jackson = "2.17.1" +jackrabbit = "1.66.0" +jackson = "2.17.2" jacoco = "0.8.12" jakarta-inject = "2.0.1" jamm = "0.4.0" @@ -59,7 +59,7 @@ jmh-plugin = "0.7.2" jmh-report = "0.9.6" joor = "0.9.15" json-bind = "1.0" -jsoup = "1.17.2" +jsoup = "1.18.1" junit-testng = "1.0.5" junit4 = "4.13.2" junit5 = "5.11.0-M2" @@ -86,11 +86,11 @@ snakeyaml = "2.2" sonarqube = "5.1.0.4882" spotbugs = "4.8.6" spotbugs-contrib = "7.6.4" -spotbugs-plugin = "6.0.18" +spotbugs-plugin = "6.0.19" stream = "2.9.8" tcache = "2.0.1" testng = "7.10.2" -truth = "1.4.3" +truth = "1.4.4" univocity-parsers = "2.9.1" versions = "0.51.0" xz = "1.9" diff --git a/gradle/plugins/build.gradle.kts b/gradle/plugins/build.gradle.kts index 152739bd86..8a39a8399a 100644 --- a/gradle/plugins/build.gradle.kts +++ b/gradle/plugins/build.gradle.kts @@ -61,7 +61,7 @@ tasks.withType { componentSelection { val ignoredGroups = listOf("com.beust", "org.apache.logging.log4j", "org.jetbrains.kotlin", "org.gradle.kotlin.kotlin-dsl") - val stable = setOf("com.fasterxml.jackson", "com.squareup.okhttp3") + val stable = setOf("com.fasterxml.jackson", "com.google.protobuf", "com.squareup.okhttp3") val isNonStable = "^[0-9,.v-]+(-r)?$".toRegex() all { if ((candidate.group in ignoredGroups) && (candidate.version != currentVersion)) { diff --git a/gradle/plugins/src/main/kotlin/analyze/jmh.caffeine.gradle.kts b/gradle/plugins/src/main/kotlin/analyze/jmh.caffeine.gradle.kts index 3c9d3aa522..546fa54299 100644 --- a/gradle/plugins/src/main/kotlin/analyze/jmh.caffeine.gradle.kts +++ b/gradle/plugins/src/main/kotlin/analyze/jmh.caffeine.gradle.kts @@ -13,7 +13,7 @@ plugins { } configurations.jmh { - extendsFrom(configurations.testImplementation.get()) + extendsFrom(configurations["testImplementation"]) exclude(module = "jazzer-junit") exclude(module = "slf4j-test") } @@ -95,7 +95,7 @@ tasks.named("jmhReport").configure { } idea.module { - scopes["PROVIDED"]!!["plus"]!!.add(configurations.jmh.get()) + scopes["PROVIDED"]!!["plus"]!!.add(configurations["jmh"]) } eclipse.classpath.file.whenMerged { diff --git a/gradle/plugins/src/main/kotlin/lifecycle/java-library.caffeine.gradle.kts b/gradle/plugins/src/main/kotlin/lifecycle/java-library.caffeine.gradle.kts index 296a126110..55f34a132d 100644 --- a/gradle/plugins/src/main/kotlin/lifecycle/java-library.caffeine.gradle.kts +++ b/gradle/plugins/src/main/kotlin/lifecycle/java-library.caffeine.gradle.kts @@ -31,9 +31,8 @@ tasks.withType().configureEach { languageVersion = maxOf(javaVersion, JavaLanguageVersion.of(17)) } - options.compilerArgs.add("-Xlint:all,-auxiliaryclass,-exports,-processing," - + "-removal,-requires-automatic,-requires-transitive-automatic") - options.compilerArgs.addAll(listOf("-Xmaxerrs", "500", "-Xmaxwarns", "500")) + options.compilerArgs.addAll(listOf( "-Xlint:all", "-Xlint:-auxiliaryclass", "-Xlint:-classfile", + "-Xlint:-exports", "-Xlint:-processing", "-Xlint:-removal", "-Xlint:-requires-automatic")) if (javaVersion.canCompileOrRun(21)) { options.compilerArgs.add("-proc:full") } diff --git a/gradle/plugins/src/main/kotlin/lifecycle/testing.caffeine.gradle.kts b/gradle/plugins/src/main/kotlin/lifecycle/testing.caffeine.gradle.kts index 1afd0b0509..3b99a858d4 100644 --- a/gradle/plugins/src/main/kotlin/lifecycle/testing.caffeine.gradle.kts +++ b/gradle/plugins/src/main/kotlin/lifecycle/testing.caffeine.gradle.kts @@ -15,6 +15,7 @@ dependencies { testImplementation(libs.hamcrest) testImplementation(libs.awaitility) testImplementation(libs.bundles.junit) + testImplementation(libs.guava.testlib) testImplementation(libs.bundles.osgi.test.compile) testImplementation(platform(libs.asm.bom)) diff --git a/gradle/plugins/src/main/kotlin/lifecycle/versions.caffeine.gradle.kts b/gradle/plugins/src/main/kotlin/lifecycle/versions.caffeine.gradle.kts index 3252b7f6b8..b46ff6efe3 100644 --- a/gradle/plugins/src/main/kotlin/lifecycle/versions.caffeine.gradle.kts +++ b/gradle/plugins/src/main/kotlin/lifecycle/versions.caffeine.gradle.kts @@ -11,8 +11,8 @@ tasks.named("dependencyUpdates").configure { componentSelection { all { val ignoredGroups = listOf("com.beust", "org.apache.logging.log4j") - val stable = setOf("com.hazelcast", "javax.json.bind", - "org.jetbrains.kotlin", "org.osgi", "org.slf4j") + val stable = setOf("com.google.protobuf", "com.hazelcast", + "javax.json.bind", "org.jetbrains.kotlin", "org.osgi", "org.slf4j") if ((candidate.group in stable) && isNonStable(candidate.version)) { reject("Release candidate") } else if ((candidate.module == "commons-io") && candidate.version.startsWith("2003")) { diff --git a/gradle/plugins/src/main/kotlin/quality/jacoco.caffeine.gradle.kts b/gradle/plugins/src/main/kotlin/quality/jacoco.caffeine.gradle.kts index c542afd0e0..fb0acc154e 100644 --- a/gradle/plugins/src/main/kotlin/quality/jacoco.caffeine.gradle.kts +++ b/gradle/plugins/src/main/kotlin/quality/jacoco.caffeine.gradle.kts @@ -22,10 +22,10 @@ tasks.withType().configureEach { } tasks.withType().configureEach { - if (environment["JDK_EA"] == "true") { + if (System.getenv("JDK_EA") == "true") { systemProperty("net.bytebuddy.experimental", true) configure { - enabled = false + isEnabled = false } } } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index e021a95878..0af00fb146 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.9-rc-1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME diff --git a/guava/build.gradle.kts b/guava/build.gradle.kts index 3fdc654bb5..041157345c 100644 --- a/guava/build.gradle.kts +++ b/guava/build.gradle.kts @@ -10,14 +10,9 @@ dependencies { api(libs.guava) testImplementation(libs.jctools) - testImplementation(libs.guava.testlib) testImplementation(libs.bundles.slf4j.nop) } -tasks.named("compileJava").configure { - modularity.inferModulePath = true -} - tasks.withType().configureEach { useJUnitPlatform() diff --git a/jcache/build.gradle.kts b/jcache/build.gradle.kts index f96d674c99..fb21c40ff2 100644 --- a/jcache/build.gradle.kts +++ b/jcache/build.gradle.kts @@ -30,9 +30,7 @@ dependencies { api(libs.jcache) api(libs.config) - testImplementation(libs.guava) testImplementation(libs.jcache.guice) - testImplementation(libs.guava.testlib) testImplementation(libs.bundles.slf4j.nop) testImplementation(files(testResourcesJar)) testImplementation(libs.jcache.tck) @@ -76,10 +74,6 @@ val unzipJCacheJavaDoc by tasks.registering(Copy::class) { into(layout.buildDirectory.dir("jcache-docs")) } -tasks.named("compileJava").configure { - modularity.inferModulePath = true -} - tasks.jar { bundle.bnd(mapOf( "Automatic-Module-Name" to "com.github.benmanes.caffeine.jcache", diff --git a/simulator/build.gradle.kts b/simulator/build.gradle.kts index 2de719c0ce..c6ef03959b 100644 --- a/simulator/build.gradle.kts +++ b/simulator/build.gradle.kts @@ -55,7 +55,6 @@ tasks.withType().configureEach { disableWarningsInGeneratedCode = true nullaway.disable() } - modularity.inferModulePath = true } tasks.withType().configureEach { @@ -77,19 +76,10 @@ tasks.withType().configureEach { tasks.named("run").configure { description = "Runs a single simulation and generates a report" } - -tasks.register("simulate") { - description = "Runs multiple simulations and generates an aggregate report" - mainClass = "com.github.benmanes.caffeine.cache.simulator.Simulate" -} - -tasks.register("rewrite") { - description = "Rewrite traces into the format used by other simulators" - mainClass = "com.github.benmanes.caffeine.cache.simulator.parser.Rewriter" -} +tasks.register("simulate") +tasks.register("rewrite") tasks.withType().configureEach { - group = group ?: "Application" dependsOn(tasks.processResources, tasks.compileJava) classpath(sourceSets["main"].runtimeClasspath) systemProperties(caffeineSystemProperties()) @@ -117,6 +107,12 @@ abstract class Simulate @Inject constructor( @OutputDirectory val reportDir = File(projectLayout.buildDirectory.get().asFile, "/reports/$name") + init { + group = "Application" + mainClass = "com.github.benmanes.caffeine.cache.simulator.Simulate" + description = "Runs multiple simulations and generates an aggregate report" + } + @TaskAction override fun exec() { if (maximumSize.isNotEmpty()) { @@ -140,6 +136,12 @@ abstract class Rewrite : JavaExec() { @Input @Option(option = "outputFormat", description = "The output format") var outputFormat: String = "" + init { + group = "Application" + description = "Rewrite traces into the format used by other simulators" + mainClass = "com.github.benmanes.caffeine.cache.simulator.parser.Rewriter" + } + @TaskAction override fun exec() { if (inputFiles.isNotEmpty()) {