Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support the Gradle configuration cache #924

Open
PinkMoustacheMan opened this issue Dec 1, 2024 · 1 comment
Open

Support the Gradle configuration cache #924

PinkMoustacheMan opened this issue Dec 1, 2024 · 1 comment
Assignees

Comments

@PinkMoustacheMan
Copy link

Since Gradle is working strongly towards its configuration cache, the io.openliberty.tools.gradle.Liberty Plugin should support it as well.

Issue

When the org.gradle.configuration-cache Gradle property is enabled, tasks provided by the plugin, such as libertyStop and libertyDev fail with the following error message:

Task `:libertyDev` of type `io.openliberty.tools.gradle.tasks.DevTask`: invocation of 'Task.project' at execution time is unsupported.

Versions used

Gradle 8.11.1
Open Liberty Gradle Tools 3.9.1


Here is the full error message

08:45:07: Executing 'libertyDev'…

Calculating task graph as no cached configuration is available for tasks: libertyDev
> Task :libertyDev FAILED
[Incubating] Problems report is available at: file:///home/my_user/workspace/open-liberty-test/build/reports/problems/problems-report.html

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':libertyDev'.
> Could not get unknown property 'liberty' for root project 'open-liberty-test' of type org.gradle.api.Project.

* 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.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
Configuration cache problems found in this build.

1 problem was found storing the configuration cache.
- Task `:libertyDev` of type `io.openliberty.tools.gradle.tasks.DevTask`: invocation of 'Task.project' at execution time is unsupported.
  See https://docs.gradle.org/8.11.1/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution

See the complete report at file:///home/my_user/workspace/open-liberty-test/build/reports/configuration-cache/cqtvlhct0pddw26hh6a2ntcyy/5gu9nyybhjaeql176gp7pgak/configuration-cache-report.html
> Invocation of 'Task.project' by task ':libertyDev' at execution time 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 296ms
10 actionable tasks: 1 executed, 9 up-to-date
Configuration cache entry discarded with 1 problem.
08:45:08: Execution finished 'libertyDev'.
@cherylking
Copy link
Member

Thank you for bringing this to our attention. We will look into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants