Skip to content

Commit

Permalink
upgrade to gradle 8.1-rc1
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-manes committed Mar 21, 2023
1 parent 891095b commit 0a60205
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 16 deletions.
8 changes: 3 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,10 @@ allprojects {
}

dependencies {
def ignored = [
'api', 'apiElements', 'archives', 'compileClasspath', 'compileOnlyApi', 'default',
'implementation', 'javadocElements', 'runtimeClasspath', 'runtimeElements', 'runtimeOnly',
'sourcesElements', 'testCompileClasspath', 'testRuntimeClasspath']
def ignored = ['api', 'compileOnlyApi', 'implementation',
'javadocElements', 'runtimeOnly', 'sourcesElements']
configurations.configureEach { configuration ->
if (name !in ignored) {
if ((name !in ignored) && configuration.isCanBeDeclaredAgainst()) {
restrictions.each { module, version ->
constraints.add(configuration.name, module).version { require version }
}
Expand Down
2 changes: 1 addition & 1 deletion caffeine/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ tasks.register('memoryOverhead', JavaExec) {
classpath sourceSets.jmh.runtimeClasspath
classpath sourceSets.codeGen.runtimeClasspath
mainClass = 'com.github.benmanes.caffeine.cache.MemoryBenchmark'
jvmArgs += [
jvmArgs [
'--add-opens', 'java.base/java.util.concurrent.atomic=ALL-UNNAMED',
'--add-opens', 'java.base/java.util.concurrent.locks=ALL-UNNAMED',
'--add-opens', 'java.base/java.util.concurrent=ALL-UNNAMED',
Expand Down
2 changes: 1 addition & 1 deletion caffeine/testing.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ tasks.withType(Test).configureEach {
maxHeapSize = '3g'
} else if (name.startsWith('lincheck')) {
options.includeGroups = ['lincheck']
jvmArgs += [
jvmArgs [
'--add-opens', 'java.base/jdk.internal.vm=ALL-UNNAMED',
'--add-opens', 'java.base/jdk.internal.misc=ALL-UNNAMED',
'--add-opens', 'java.base/jdk.internal.access=ALL-UNNAMED',
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
org.gradle.jvmargs=-Xmx2g -XX:+UseParallelGC -XX:+HeapDumpOnOutOfMemoryError
org.gradle.java.installations.fromEnv=JDK_CI
org.gradle.unsafe.configuration-cache=true
org.gradle.configuration-cache=true
org.gradle.configureondemand=true
org.gradle.parallel=true
org.gradle.caching=true
Expand Down
2 changes: 1 addition & 1 deletion gradle/codeQuality.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def JVM_ARGS_STRONG_ENCAPSULATION = [
]

tasks.withType(JavaExec).configureEach {
jvmArgs += JVM_ARGS_STRONG_ENCAPSULATION
jvmArgs JVM_ARGS_STRONG_ENCAPSULATION
javaLauncher = javaToolchains.launcherFor {
languageVersion = java.toolchain.languageVersion
}
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.0.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-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
Expand Up @@ -31,6 +31,7 @@
*
* @author ben.manes@gmail.com (Ben Manes)
*/
@SuppressWarnings("serial")
final class JCacheEntryEvent<K, V> extends CacheEntryEvent<K, V>
implements Iterable<CacheEntryEvent<? extends K, ? extends V>> {
private static final long serialVersionUID = 1L;
Expand Down
1 change: 0 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ dependencyResolutionManagement.repositories {
mavenCentral()
}

enableFeaturePreview 'STABLE_CONFIGURATION_CACHE'
rootProject.name = 'caffeine'

include 'caffeine'
Expand Down
9 changes: 4 additions & 5 deletions simulator/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ tasks.named('run').configure {

class Simulate extends DefaultTask {
@Input @Optional @Option(option = 'jvmArgs', description = 'The jvm arguments')
String jvmArguments
String jvmOptions
@Input @Option(option = 'maximumSize', description = 'The maximum cache sizes')
List<String> maximumSizes = []
@Input @Option(option = 'metric', description = 'The metric to compare')
Expand All @@ -106,8 +106,7 @@ class Simulate extends DefaultTask {
if (maximumSizes.isEmpty()) {
def yellow = { "\033[33m${it}\033[0m" }
def italic = { "\033[3m${it}\033[0m" }
project.logger.error(
"\t${yellow('--maximumSize=')}${italic('<Long>[,<Long>...]')} is required")
logger.error("\t${yellow('--maximumSize=')}${italic('<Long>[,<Long>...]')} is required")
return
}
def reports = [:]
Expand All @@ -125,8 +124,8 @@ class Simulate extends DefaultTask {
classpath = project.sourceSets.main.runtimeClasspath
mainClass = project.application.mainClass
jvmArgs project.tasks.run.allJvmArgs
if (jvmArguments) {
jvmArgs jvmArguments.split(',')
if (jvmOptions) {
jvmArgs (jvmOptions.split(',') as List)
}
systemProperties [
'caffeine.simulator.report.format': 'csv',
Expand Down

0 comments on commit 0a60205

Please sign in to comment.