Skip to content
This repository was archived by the owner on Mar 2, 2026. It is now read-only.
This repository was archived by the owner on Mar 2, 2026. It is now read-only.

The -Astubs parameter can't contain a relative path which impacts Gradle task cacheability #252

@jprinet

Description

@jprinet

Issue

The Gradle JavaCompile task is leveraging the worker API and as such has ~/.gradle/workers as working directory.
It means that in the task context a relative path can't be used to retrieve resources like stubs for instance.

It is obviously possible to fallback to an absolute path location using ${project.rootdir}/stubs-example-folder but this has a negative impact on build caching as the task inputs can't be relocated. This means that you would only get a build cache hit when the project is built from the same location.

see this section of the Gradle documentation to get more details.

Potential fix:

Add the project directory as an internal input and use it as a prefix in the path if relative

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions