williamfiset / Algorithms

A collection of algorithms and data structures
MIT License
17.18k stars 4.34k forks source link

Restore Code Formatting Checks #382

Closed syoon2 closed 1 year ago

syoon2 commented 1 year ago

https://github.com/williamfiset/Algorithms/blob/09a4f3b6f39d84879a8dc05d438a0f78234249b0/build.gradle#L16-L17

As long as I don't start using Gradle and this plugin again myself, it's maybe better for everybody to state that no, this project is not maintained. :sob:

Originally posted in https://github.com/sherter/google-java-format-gradle-plugin/issues/57#issuecomment-782886280

The old formatting tool is no longer maintained, as mentioned by the author of the tool (see above). Thus, this PR proposes restoring the formatting check by migrating to Spotless for Gradle.

Unfortunate side effect: because Spotless for Gradle requires JDK 11+, the JDK version this repository is targeting (or equivalently, the JDK version used in CI) needs to be bumped up from JDK 8 to JDK 11+; see 28e7a1b (part of the reason this PR was a draft). @williamfiset any thoughts?

syoon2 commented 1 year ago

Superseded by #383.

williamfiset commented 1 year ago

Superseded by #383.

@syoon2 Looking at this change now, wouldn't Spotless be a better solution since the java formatting tool is unmaintained? Moving up to Java 11 seems Okay to me

williamfiset commented 1 year ago

Ignore my last comment, I just saw the new PR incorporates Spotless + Java 11