typescript-generator icon indicating copy to clipboard operation
typescript-generator copied to clipboard

Add support for Gradle configuration cache

Open sergeykad opened this issue 3 years ago • 2 comments

Running build with Gradle configuration cache enabled ( --configuration-cache) results in the following messages:

* What went wrong:
Configuration cache problems found in this build.

7 problems were found storing the configuration cache, 3 of which seem unique.
- Task `:module2:generateTypeScript` of type `cz.habarta.typescript.generator.gradle.GenerateTask`: cannot serialize object of type 'org.gradle.api.tasks.compile.JavaCompile', a subtype of 'org.gradle.api.Task', as these are not supported with the configuration cache.
  See https://docs.gradle.org/7.4.2/userguide/configuration_cache.html#config_cache:requirements:task_access
- Task `:module1:generateTypeScript` of type `cz.habarta.typescript.generator.gradle.GenerateTask`: cannot serialize object of type 'org.gradle.api.tasks.compile.JavaCompile', a subtype of 'org.gradle.api.Task', as these are not supported with the configuration cache.
  See https://docs.gradle.org/7.4.2/userguide/configuration_cache.html#config_cache:requirements:task_access
- Task `:module1:generateTypeScript` of type `cz.habarta.typescript.generator.gradle.GenerateTask`: invocation of 'Task.project' at execution time is unsupported.
  See https://docs.gradle.org/7.4.2/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution

Gradle 7.4.2 typescript-generator-gradle-plugin:2.36.1070

sergeykad avatar Apr 18 '22 07:04 sergeykad

This would help us a lot, is there a plan to support this? Moving initialization code from the gradle task to the gradle plugin (as is recommended practice, anyway) would already bring us most of the way there.

mkm-dt avatar Oct 05 '22 12:10 mkm-dt

In the v3.2.1263 of the plugin, one of the issues was resolved. This is the updated report.

  • Task :module1:generateTypeScript of type cz.habarta.typescript.generator.gradle.GenerateTask: cannot deserialize object of type 'org.gradle.api.Task' as these are not supported with the configuration cache. See https://docs.gradle.org/8.1.1/userguide/configuration_cache.html#config_cache:requirements:task_access
  • Task :module1:generateTypeScript of type cz.habarta.typescript.generator.gradle.GenerateTask: cannot serialize object of type 'org.gradle.api.tasks.compile.JavaCompile', a subtype of 'org.gradle.api.Task', as these are not supported with the configuration cache.

sergeykad avatar Jul 02 '23 07:07 sergeykad