I have:
gradle.properties
org.gradle.configuration-cache=true
org.gradle.configuration-cache.problems=warn
JIB plugin defined:
jib {
container {
creationTime.set("USE_CURRENT_TIMESTAMP")
mainClass = "com.my.MyApp"
}
from {
image = "eclipse-temurin:17-jre"
}
}
I run:
./gradlew jibDockerBuild
I get:
> Task :jibDockerBuild FAILED
10 problems were found storing the configuration cache, 2 of which seem unique.
- Task `:jibDockerBuild` of type `com.google.cloud.tools.jib.gradle.BuildDockerTask`: cannot deserialize object of type 'org.gradle.api.Project' as these are not supported with the configuration cache.
See https://docs.gradle.org/8.1.1/userguide/configuration_cache.html#config_cache:requirements:disallowed_types
- Task `:jibDockerBuild` of type `com.google.cloud.tools.jib.gradle.BuildDockerTask`: cannot serialize object of type 'org.gradle.api.internal.project.DefaultProject', a subtype of 'org.gradle.api.Project', as these are not supported with the configuration cache.
See https://docs.gradle.org/8.1.1/userguide/configuration_cache.html#config_cache:requirements:disallowed_types
See the complete report at file:///Users/artemptushkin/gitlab/IptiQ/dx/spring-cloud-config-server/build/reports/configuration-cache/dmnth65ek47ehgnuriyy459yl/ac38wk6b6wvejhas26wg0jngi/configuration-cache-report.html
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':jibDockerBuild'.
> Cannot invoke "org.gradle.api.Project.getProjectDir()" because "this.project" is null
It passes away when I disable the configuration cache
My expectations are that if I set org.gradle.configuration-cache.problems=warn
then it never fails though it does
Relevant issue in the plugin Configuration cache problems in Gradle 8.1 · Issue #225 · n0mer/gradle-git-properties · GitHub