<@U03FP6RKVJS> Yesterday , I commented on JS2d plu...
# gsoc-2025-improving-cc
n
@Rafael Chaves Yesterday , I commented on JS2d plugin cc issue asking them to release their fix as it was part of my surveyed plugins before , they will release it in couple of days except the Android version and they will accept patch for it , so I give it a try , It was simple issue , here is my changes : https://github.com/jsonschema2dataclass/js2d-gradle/compare/main...Nouran-11:js2d-gradle:fix-cc
at first I got this issue : Configuration cache state could not be cached: field
__outputFolder__
of task
:plugin-gradle:processors:jsonschema2pojo:processorVersion
of type `org.jsonschema2dataclass.internal.plugin.lib.ProcessorVersionGeneratorTask`: error writing value of type 'org.gradle.api.internal.file.DefaultFilePropertyFactory$DefaultDirectoryVar'
Extension 'processorVersion' property 'outputFolder' is declared as an output property of extension 'processorVersion' (type ProcessorVersionPExtension) but does not have a task associated with it.
then I removed the @get:OutputFile annotation
and I got this : 1 problem was found storing the configuration cache. - Task
:plugin-gradle:processors:jsonschema2pojo:processorVersion
of type `org.jsonschema2dataclass.internal.plugin.lib.ProcessorVersionGeneratorTask`: invocation of 'Task.project' at execution time is unsupported.
for the
Task.project
issue , I moved all the dependency resolution to configuration time , all project.versionCatalogs
for the outputFolder change , I am not sure if this valid issue or this is from the composite build , I got all the issues from android test project using composite build with their base code as they fix some cc issues in their code but not released
r
then I removed the @get:OutputFile annotation
I don't see that in your changes, and not sure why you would want to change that.
for the
Task.project
issue , I moved all the dependency resolution to configuration time , all project.versionCatalogs
You made it eager, so you won't see changes made after the plugin is applied. We should follow the same pattern as before, using a provider/lazy property, so it is computed late (at CC store time), when configuration is no longer being mutated.
🫣 1
n
line 96
ah, thanks
Still, don't get why you would change that.
n
Copy code
Configuration cache state could not be cached: field `__outputFolder__` of task `:plugin-gradle:processors:jsonschema2pojo:processorVersion` of type `org.jsonschema2dataclass.internal.plugin.lib.ProcessorVersionGeneratorTask`: error writing value of type 'org.gradle.api.internal.file.DefaultFilePropertyFactory$DefaultDirectoryVar'
> Extension 'processorVersion' property 'outputFolder' is declared as an output property of extension 'processorVersion' (type ProcessorVersionPExtension) but does not have a task associated with it.
I got this issue at the begining so I removed to see what other issues we have
I change it to property and map
✅ 1
r
Are you testing it manually?
n
Yes
r
n
is this the output you mean ?
2025-08-29T171434.335+0300 [DEBUG] [org.gradle.api.Task] Found library with identifier
org.jsonschema2pojo:jsonschema2pojo-core:1.2.2
, writing to /Users/nouranatef/IdeaProjects/js2d-gradle/plugin-gradle/processors/jsonschema2pojo/build/generated/sources/processorVersion/processor.properties
✅ 1
r
Thanks. I suspect that was incorrect in the previous commit
n
so removing this annotation doesn't change in the functionality?
and why this break cc?
r
Which was lazy, after all, but may have printed a provider/property instead of its value (because dependency is an
Optional<Provider<...>
I believe
CC changes the timing of things. Dependencies are resolved during configuration store, instead during execution. But that does not answer your question.
🙌 1
n
can you please explain more?
r
What bits were unclear, Nouran? In essence, those annotations are meant for properties declared directly on tasks, or indirectly via
@Nested
properties. Otherwise, they have no special meaning - yet, may lead to errors when CC is enabled.
🙌 1
n
got it , Thanks