Slackbot
01/16/2024, 3:35 PMVampire
01/16/2024, 3:43 PMval foo by tasks.registering {
doLast {
println(project)
}
}
with CC on, I get a failed build with the error, if I add notCompatibleWithConfigurationCache("")
, I get successful build with the same as warning.Karim Houari
01/16/2024, 3:58 PMartifactoryPublish
Configuration cache entry discarded with 12 problems.
FAILURE: Build failed with an exception.
* What went wrong:
Configuration cache problems found in this build.
12 problems were found storing the configuration cache, 6 of which seem unique.
- Task `:artifactoryDeploy` of type `org.jfrog.gradle.plugin.artifactory.task.DeployTask`: cannot serialize object of type 'org.jfrog.gradle.plugin.artifactory.task.ArtifactoryTask', a subtype of 'org.gradle.api.Task', as these are not supported with the configuration cache.
See <https://docs.gradle.org/8.5/userguide/configuration_cache.html#config_cache:requirements:task_access>
- Task `:artifactoryDeploy` of type `org.jfrog.gradle.plugin.artifactory.task.DeployTask`: cannot serialize object of type 'org.jfrog.gradle.plugin.artifactory.task.ExtractModuleTask', a subtype of 'org.gradle.api.Task', as these are not supported with the configuration cache.
See <https://docs.gradle.org/8.5/userguide/configuration_cache.html#config_cache:requirements:task_access>
- Task `:artifactoryDeploy` of type `org.jfrog.gradle.plugin.artifactory.task.DeployTask`: execution of task ':artifactoryDeploy' caused invocation of 'Task.project' in other task at execution time which is unsupported.
See <https://docs.gradle.org/8.5/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution>
- Task `:artifactoryDeploy` of type `org.jfrog.gradle.plugin.artifactory.task.DeployTask`: invocation of 'Task.project' at execution time is unsupported.
See <https://docs.gradle.org/8.5/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution>
- Task `:artifactoryPublish` of type `org.jfrog.gradle.plugin.artifactory.task.ArtifactoryTask`: invocation of 'Task.project' at execution time is unsupported.
See <https://docs.gradle.org/8.5/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution>
- Task `:extractModuleInfo` of type `org.jfrog.gradle.plugin.artifactory.task.ExtractModuleTask`: invocation of 'Task.project' at execution time is unsupported.
See <https://docs.gradle.org/8.5/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution>
See the complete report at file:///C:/Users/KarimHouari/Projects/artifactory-test/build/reports/configuration-cache/dm1lvqb8ei0ngfz0eolaeibxf/8vclmwydv802cim4ls27xzj9v/configuration-cache-report.html
> Invocation of 'Task.project' by task ':artifactoryPublish' at execution time is unsupported.
> Invocation of 'Task.project' by task ':extractModuleInfo' at execution time is unsupported.
> Invocation of 'Task.project' by task ':artifactoryDeploy' at execution time is unsupported.
> Execution of task ':artifactoryDeploy' caused invocation of 'Task.project' by task ':artifactoryPublish' at execution time which is unsupported.
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at <https://help.gradle.org>.
BUILD FAILED in 1s
with this in build.gradle.kts
tasks {
artifactoryPublish {
notCompatibleWithConfigurationCache("")
}
}
Vampire
01/16/2024, 4:04 PMproject
usage at runtime, but the referencing from DeployTask
to ExtractModuleTask
? 🤷♂️Karim Houari
01/16/2024, 4:05 PMKarim Houari
01/16/2024, 4:07 PMnotCompatibleWithConfigurationCache
would mean any config cache related issues would be ignored as the config cache won't be used, but I suppose that's not the caseCristianGM
01/17/2024, 6:59 AMTask.project
fails the build even when you use notCompatibleWithConfigurationCache
And I would expect it to work because I understand Gradle should disable CC when any of the tasks is not compatible.Vampire
01/17/2024, 8:33 AMCristianGM
01/17/2024, 8:37 AMVampire
01/17/2024, 8:38 AMCristianGM
01/17/2024, 8:51 AMInvocation of 'Task.project' by task 'kotlin scripting dependencies maven allproguard' at execution time is unsupported.
Execution of task 'kotlin scripting dependencies maven allresultJar' caused invocation of 'Task.project' by task 'kotlin scripting dependencies maven allproguard' at execution time which is unsupported.
Invocation of 'Task.project' by task 'kotlin reflectproguard' at execution time is unsupported.
Execution of task 'kotlin reflectresult' caused invocation of 'Task.project' by task 'kotlin reflectproguard' at execution time which is unsupported.
Invocation of 'Task.project' by task 'kotlin compilerproguard' at execution time is unsupported.
CristianGM
01/17/2024, 8:52 AMExecution of task 'kotlin scripting dependencies maven allresultJar' caused invocation of 'Task.project' by task 'kotlin scripting dependencies maven allproguard' at execution time which is unsupported.
CristianGM
01/17/2024, 8:53 AMVampire
01/17/2024, 9:57 AMCristianGM
01/17/2024, 9:58 AMjar
task uses the outputs of proguard
(the task that uses Task.project in execution time)Vampire
01/17/2024, 10:09 AMval foo by tasks.registering {
notCompatibleWithConfigurationCache("")
doLast {
println(project)
}
}
tasks.jar {
from(foo)
}
Vampire
01/17/2024, 10:12 AMCristianGM
01/17/2024, 10:13 AMuses "project" at configuration timeExecution time, right?
Vampire
01/17/2024, 10:13 AMCristianGM
01/17/2024, 10:13 AMVampire
01/17/2024, 10:14 AMnotCompatibelWithConfigurationCache
does not workVampire
01/17/2024, 10:14 AMval foo by tasks.registering {
doLast {
println(project)
}
}
tasks.jar {
notCompatibleWithConfigurationCache("")
from(foo)
}
fails if you execute jar
Vampire
01/17/2024, 10:15 AMresultJar
as incompatible
and if @Karim Houari would declare artifactoryDeploy
as incompatible it would probably work as expectedVampire
01/17/2024, 10:16 AMCristianGM
01/17/2024, 10:17 AMVampire
01/17/2024, 10:22 AMVampire
01/17/2024, 10:23 AMCristianGM
01/17/2024, 10:28 AMKarim Houari
01/17/2024, 10:39 AMartifactoryDeploy
as incompatible I have found that I need to mark both that and extractModuleInfo
. Certainly not great user experience but at least I don't have to disable the config cache externally to the project where artifactoryPublish
is used