Skip to content

Allow setting the local P2 cache dir in the Spotless Gradle plugin#2944

Open
bric3 wants to merge 2 commits into
diffplug:mainfrom
bric3:add-cache-directory-dsl
Open

Allow setting the local P2 cache dir in the Spotless Gradle plugin#2944
bric3 wants to merge 2 commits into
diffplug:mainfrom
bric3:add-cache-directory-dsl

Conversation

@bric3
Copy link
Copy Markdown
Contributor

@bric3 bric3 commented May 21, 2026

This adds a way to control in which directory the Eclipse based formatters will be cached. This PR adds a cacheDirectory method in the config of each Eclipse based steps.

The reason is that, by default the eclipse resolver will place the downloaded artifacts in ~/.m2/repository/dev/equo/p2-data, this folder is a bit alien in Gradle based build. And having it nested in the maven repository structure makes it a bit harder to manage in a CI.

Given it's a Gradle related change, I choose to not add this under the maven plugin since .m2/ is already maven managed.

  • a summary of the change
  • either
    • a link to the issue you are resolving (for small changes)
    • a link to the PR you just created (for big changes likely to have discussion)

Comment thread plugin-gradle/CHANGES.md Outdated
@jochenberger
Copy link
Copy Markdown
Contributor

Maybe the Gradle plug-in could also set a more sensible default?

@jochenberger
Copy link
Copy Markdown
Contributor

Somewhere inside $GRADLE_USER_HOME for example?

@bric3
Copy link
Copy Markdown
Contributor Author

bric3 commented May 21, 2026

I hesitated to do that, as it's a breaking change.

@jochenberger
Copy link
Copy Markdown
Contributor

IMHO, if we just break a potentially existing cache, it's not so much of an issue. But maybe you're right. 🤷🏼‍♂️

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

Successfully merging this pull request may close these issues.

2 participants