maven-plugin-development Gradle Plugin for Maven Plugin
There is now a Gradle Plugin to help Gradle developers produce Maven plugins.
https://github.com/britter/maven-plugin-development
If there's a desire to unify the build, this may help by allowing us to simplify the plugin development for this project: https://github.com/diffplug/spotless/tree/master/plugin-maven
@lutovich just in case you didn't see this. I have no opinion either way.
Interesting! This plugin could potentially simplify the build of spotless-maven-plugin
Thanks to buildcache, our standard CI build is now ~45 seconds. But the maven builds are 7 - 10 minutes, every time. e.g. https://app.circleci.com/pipelines/github/diffplug/spotless/734/workflows/eb22b955-dd19-40a8-aaa3-bd6519d9ac84
The linked plugin recently added buildcache support: https://github.com/britter/maven-plugin-development/issues/7
It's not high on my todo, but it would be nice to slurp this in bring our average build times down a ton. Especially for new contributors, a clean build of a fresh clone takes a really long time, and most of that is maven.
Hey everyone! Continuing discussion started here - https://github.com/diffplug/spotless/pull/1237
So the maven-plugin build is not fully cacheable. That's primarily because the dependencies needed for the build are downloaded into "localMavenRepository" folder every time the build is triggered (even if the inputs/outputs are specified properly).
From what I can tell, the root cause lies in the "_remote.repositories" file, which contains date time and its changing from build to build.
Example for antlr:
#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice. #Mon Jun 13 20:05:38 EEST 2022 antlr-2.7.2.jar>central= antlr-2.7.2.pom>central=
In order to fix this, that whole folder has to be cached (although normal dependency cache would probably be a better solution and a proper one I guess). Alternatively, the plugin mentioned above could solve this altogether, but I haven't checked it yet.
If you'd like, I can have a look at it and try to experiment with the build using the plugin.
I would love a PR for this, thanks very much for investigating!
I'm gonna take a whack at this.
First publish of this new build is plugin-maven 2.31.0.