Allow setting the local P2 cache dir in the Spotless Gradle plugin#2944
Allow setting the local P2 cache dir in the Spotless Gradle plugin#2944bric3 wants to merge 3 commits into
Conversation
|
Maybe the Gradle plug-in could also set a more sensible default? |
|
Somewhere inside |
|
I hesitated to do that, as it's a breaking change. |
|
IMHO, if we just break a potentially existing cache, it's not so much of an issue. But maybe you're right. 🤷🏼♂️ |
|
Actually I slept on it, and I kind of agree with you know, it could be considered a bug. And as a matter of fact, under the hood spotless uses a "fake" eclipse, and there's a mechanism that is supposedly handling Gradle, but it only works if the I suppose there are various reasons why it's like that in solstice. But spotless knows where it is run so it should provide sensible defaults. I'm commiting someting in that regard. |
Set Gradle's default P2 cache under Gradle user home and Maven's under the local repository, while keeping explicit cacheDirectory overrides for both plugins. Solstice uses the maven m2 directory unless GRADLE_USER_HOME is set https://github.com/equodev/equo-ide/blob/main/solstice/src/main/java/dev/equo/solstice/p2/CacheLocations.java#L80-L104
|
It's been a long time, but I recall the Solstice cache directory being changed because somebody felt strongly it was in the wrong place before. I think the point of I'm okay with changing it, but it needs to be clearly laid out in the changelog "Eclipse dependencies were cached at X by default, now they are cached at Y by default" |
This adds a way to control in which directory the Eclipse based formatters will be cached. This PR adds a
cacheDirectorymethod 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.