Skip to content

Scalastyle plugin is using absole sources path which makes it not cacheable #34

@mvitaly

Description

@mvitaly

Looks like scalastyle plugin is using absole paths for the scala source directories, which makes the tasks non cacheable across multiple checkouts of the same commit into multiple local directories.

Based on the comment on the superclass https://github.com/gradle/gradle/blob/v7.4.1/subprojects/core/src/main/java/org/gradle/api/tasks/SourceTask.java#L61 , I believe the fix is to override getSource method and annotate it with @PathSensitive(PathSensitivity.RELATIVE).

Gradle Enterprise reports this:
image

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