You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow loading of FormatterProperties from resource #2428
However, we would like to ship our XML codestyle definition as a resource file. This cannot be loaded by spotless unless we create a temporary file. Alternatively we would need to manually convert the XML to String-based properties and basically copy the behavior of XMLParser.
Therefore, it would be greate to be able to load FormatterProperties from an input stream (by specifying the file type) or even directly from a resource identifier
@nedtwigg I think I may have confused the situation ; I meant to submit new documentation :-) ; as a potential PR I've submitted #2643 to give an example in both the maven and gradle plugin READMEs.
Activity
nedtwigg commentedon Feb 23, 2025
For Gradle, I recommend https://github.com/diffplug/blowdryer. I don't know enough about Maven to make any recommendations here.
rnc commentedon Feb 26, 2025
Maven is straightforward (although it would have been useful to have this in the documentation) :
For Gradle, while #2343 helped a lot, #2361 might solve your use-case ? (then the resources could be loaded from a resource using a TextResource).
rnc commentedon Aug 6, 2025
With the advent of #2361 and the release of 7.2.1 its possible for Gradle (kotlin) to do something like:
@nedtwigg Would it be helpful to add something like these examples to the documentation?
nedtwigg commentedon Sep 24, 2025
docs such as that would be very helpful! Looks like this issue has been resolved.
rnc commentedon Sep 25, 2025
@nedtwigg I think I may have confused the situation ; I meant to submit new documentation :-) ; as a potential PR I've submitted #2643 to give an example in both the maven and gradle plugin READMEs.