-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Enforce Google Java Style. #3
Comments
Hi @Clivern Happy to take this up for #Hacktoberfest! If I may ask, why AOSP style and not say Google Java Style guide, since this is not an Android project? Same as Clivern/Racter#13 |
Sure you can take this over and Clivern/Racter#13. I chosen the AOSP style because it is more readable. I kind of hate the google style with the 2 whitespace ident. But you can use it indeed for a PR. I was thinking to use https://github.com/sherter/google-java-format-gradle-plugin. I used it somewhere else and works as expected. Here's part of my plugins {
id 'com.github.sherter.google-java-format' version '0.8'
}
googleJavaFormat {
options style: 'AOSP'
} It gives you two gradle tasks to format & verify $ ./gradlew goJF --info $ ./gradlew verGJF --info or you can give https://github.com/diffplug/spotless a try plugins {
id 'com.diffplug.gradle.spotless' version '3.24.3'
}
spotless {
java {
licenseHeaderFile 'spotless.license.java'
importOrder 'java'
}
} $ ./gradlew spotlessApply
$ ./gradlew spotlessJavaCheck |
Great, A number of folks have issues with the 2 whitespace indent too 😄. I'll begin with it from the when #Hacktoberfest begins using the google java format plugin |
No description provided.
The text was updated successfully, but these errors were encountered: