openjfx / javafx-gradle-plugin

Gradle plugin that makes it easy to work with JavaFX 11+
https://openjfx.io/
BSD 3-Clause "New" or "Revised" License
359 stars 62 forks source link

Compatibility with configuration cache #136

Open eduardz1 opened 1 year ago

eduardz1 commented 1 year ago

When running an application with configuration cache enabled the build fails when closing the application

*  Executing task: gradle: client:configJavafxRun 

Configuration cache is an incubating feature.
Calculating task graph as no configuration cache is available for tasks: client:configJavafxRun

> Configure project :client
Project :client => no module-info.java found

> Configure project :lib
Project :lib => no module-info.java found

> Configure project :server
Project :server => no module-info.java found
1 actionable task: 1 executed
<=============> 100% EXECUTING [1s]
> IDLE

FAILURE: Build failed with an exception.

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

2 problems were found storing the configuration cache.
- Task `:client:configJavafxRun` of type `org.openjfx.gradle.tasks.ExecTask`: 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/7.6/userguide/configuration_cache.html#config_cache:requirements:disallowed_types
- Task `:client:configJavafxRun` of type `org.openjfx.gradle.tasks.ExecTask`: cannot serialize object of type 'org.gradle.api.tasks.JavaExec', a subtype of 'org.gradle.api.Task', as these are not supported with the configuration cache.
  See https://docs.gradle.org/7.6/userguide/configuration_cache.html#config_cache:requirements:task_access

for now you can mark the task with https://docs.gradle.org/7.4/javadoc/org/gradle/api/Task.html#notCompatibleWithConfigurationCache-java.lang.String-