rising3 / semver-gradle-plugin

Gradle plugin for Updates the project version.A plugin that can updating the semantic versions like `yarn version` command.
Apache License 2.0
15 stars 7 forks source link

Does not work with Gradle configuration cache #27

Open pkubowicz opened 10 months ago

pkubowicz commented 10 months ago

Describe the bug Tasks created by this plugin are not compatible with Gradle configuration cache.

To Reproduce Steps to reproduce the behavior:

  1. Execute gradle --configuration-cache semverLatest

Build fails with:

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 `semverLatest` of type `com.github.rising3.gradle.semver.tasks.LatestTask`: invocation of 'Task.project' at execution time is unsupported.
  See https://docs.gradle.org/8.5/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution

Expected behavior Build succeeds.

Desktop gradle --version


------------------------------------------------------------
Gradle 8.5
------------------------------------------------------------

Build time:   2023-11-29 14:08:57 UTC
Revision:     28aca86a7180baa17117e0e5ba01d8ea9feca598

Kotlin:       1.9.20
Groovy:       3.0.17
Ant:          Apache Ant(TM) version 1.10.13 compiled on January 4 2023
JVM:          17.0.9 (Private Build 17.0.9+9-Ubuntu-123.10)
OS:           Linux 6.5.0-14-generic amd64