Closed
Description
After upgrading to Boot 3.3.0 I noticed that the Gradle configuration cache throws an error. This is related to the configuration of the Boot plugin's buildInfo. With this config:
plugins.withId('org.springframework.boot') {
springBoot {
buildInfo {
properties {
excludes = ['time']
}
}
}
}
I'm getting this error when running Gradle with the config cache enabled:
Configuration cache state could not be cached: field `writeLock` of `org.springframework.util.function.SingletonSupplier` bean found in field `creationTime` of `org.springframework.boot.gradle.tasks.buildinfo.BuildInfoProperties` bean found in field `properties` of task `:bootBuildInfo` of type `org.springframework.boot.gradle.tasks.buildinfo.BuildInfo`: error writing value of type 'java.util.concurrent.locks.ReentrantLock'
> Unable to make field private final java.util.concurrent.locks.ReentrantLock$Sync java.util.concurrent.locks.ReentrantLock.sync accessible: module java.base does not "opens java.util.concurrent.locks" to unnamed module @d0d7a47f
Here's a project that reproduces the problem: just run a regular build to see the error.
gradle-config-cache.zip
This problem did not occur with Boot 3.2.x versions.