Skip to content

t/android: Enable spotless for Monado for Android's code formatting

utzcoz requested to merge utzcoz/monado:enable-spotless-for-Monado into main

The spotless is a wide used tool to format Java and Kotlin code in Android area, especially the open-source world. The spotless has many configurations to use different separate format tools/styles for Java and Kotlin. This MR just enables it for Monado with AOSP style for Java and ktfmt Kotlin Language style for Kotlin. We can use ./gradlew spotlessCheck to check whether there are un-formatted code, and we can use ./gradlew spotlessApply to fix formatting issues locally before pushing code. This MR also enables misc formatter for Gradle files, Markdown files and gitignore files to keep these files consistent always.

To keep the spotless working always, this MR also adds a CI job to run ./gradlew spotlessCheck for every commit.

Merge request reports