Skip to content

[gradle-plugin] nativeCompile and generateResourcesConfigFile tasks are incompatible with configuration cache #762

@bacecek

Description

@bacecek

Describe the bug
Building nativeCompile task fails with configuration cache problems:

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

2 problems were found storing the configuration cache.
- Task `:generateResourcesConfigFile` of type `org.graalvm.buildtools.gradle.tasks.GenerateResourcesConfigFile`: cannot serialize object of type 'org.gradle.api.internal.artifacts.configurations.DefaultConfigurationContainer', a subtype of 'org.gradle.api.artifacts.ConfigurationContainer', as these are not supported with the configuration cache.
  See https://docs.gradle.org/9.0.0/userguide/configuration_cache_requirements.html#config_cache:requirements:disallowed_types
- Task `:nativeCompile` of type `org.graalvm.buildtools.gradle.tasks.BuildNativeImageTask`: cannot serialize object of type 'org.gradle.api.internal.artifacts.configurations.DefaultConfigurationContainer', a subtype of 'org.gradle.api.artifacts.ConfigurationContainer', as these are not supported with the configuration cache.
  See https://docs.gradle.org/9.0.0/userguide/configuration_cache_requirements.html#config_cache:requirements:disallowed_types

Steps to reproduce the behavior:

  1. Apply org.graalvm.buildtools.native
  2. Call ./gradlew nativeCompile --configuration-cache

System Info:

  • OS: macOS 26.0 beta
  • GraalVM Version 22.0 CE
  • Java Version 17
  • Plugin version org.graalvm.buildtools.native:0.11.0
  • Gradle 8.14.3, 9.0.0

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions