asciidoctor / asciidoctor-gradle-plugin

A Gradle plugin that uses Asciidoctor via JRuby to process AsciiDoc source files within the project.
https://asciidoctor.github.io/asciidoctor-gradle-plugin/
Apache License 2.0
285 stars 120 forks source link

Asciidoctor task is relocatable when `gemPaths` is configured #672

Closed erichaagdev closed 1 year ago

erichaagdev commented 1 year ago

This PR resolves a build cache miss that occurs when gemPaths is configured. The value of gemPaths may contain one or more absolute paths. This makes the task not relocatable and results in a build cache miss when executed from different directories with local build caching, or between two machines with remote build caching.

To fix this, I marked gemPath with @Internal to exclude it from any sort of fingerprinting or cache key calculations. Since the gemPaths are already being tracked as input files and are properly relativized, there will be no regressions in terms of cacheability.

fixes #671