-
-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a Spotless plugin #18
Conversation
src/main/groovy/net/neoforged/gradleutils/spotless/SpotlessPlugin.groovy
Outdated
Show resolved
Hide resolved
src/main/groovy/net/neoforged/gradleutils/spotless/SpotlessUtilsExtension.groovy
Outdated
Show resolved
Hide resolved
src/main/groovy/net/neoforged/gradleutils/spotless/SpotlessUtilsExtension.groovy
Outdated
Show resolved
Hide resolved
src/main/groovy/net/neoforged/gradleutils/spotless/ExtractSpotlessConfiguration.groovy
Outdated
Show resolved
Hide resolved
src/spotless/groovy/net/neoforged/gradleutils/spotless/SpotlessUtilsExtension.groovy
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Usage example is as follows, right?
spotlessUtils.configure spotless
spotless {
// custom stuff
}
src/spotless/groovy/net/neoforged/gradleutils/spotless/SpotlessUtilsExtension.groovy
Show resolved
Hide resolved
src/spotless/groovy/net/neoforged/gradleutils/spotless/SpotlessUtilsExtension.groovy
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a bit of polish needed on that README section.
README.md
Outdated
|
||
The `net.neoforged.gradleutils.spotless` plugin provides integration (a formatter configuration) with Spotless. | ||
|
||
This plugin provides a `spotlessUtils` extension which has a `configure` method that can be called with the `spotless` extension to configure Spotless and use the formatter configuration provided by GradleUtils. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Provide an example, for clarity.
Also we should probably make a note here: spotless for Gradle requires the Gradle runtime to be running in java 17 |
Adds a
net.neoforged.gradleutils.spotless
plugin that will configure spotless to use a shared formatter config.See https://github.com/neoforged/NeoForge/blob/932773f5194811609b03edeaa9b0c0f6a7d3a516/codeformat/formatter-config.xml