···52525353 // So we don't have to check in generated files: we start with SVGs for vector art.
5454 id "com.quittle.svg-2-android-vector" version "0.0.6" apply false
5555+5656+ // Spotless for Java and Kotlin's code formatting
5757+ id 'com.diffplug.spotless' version "6.18.0" apply false
5558}
56595760ext {
+17
src/xrt/auxiliary/android/build.gradle
···55 id 'com.android.library'
66 id 'kotlin-android'
77 id 'dagger.hilt.android.plugin'
88+ id 'com.diffplug.spotless'
89}
9101011android {
···4950 // Only a Java file has annotations right now, so we don't yet need kapt
5051 annotationProcessor "com.google.dagger:hilt-compiler:$hiltVersion"
5152}
5353+5454+spotless {
5555+ java {
5656+ target 'src/main/java/**/*.java'
5757+ // apply a specific flavor of google-java-format.
5858+ googleJavaFormat('1.8').aosp().reflowLongStrings()
5959+ // fix formatting of type annotations.
6060+ formatAnnotations()
6161+ }
6262+6363+ kotlin {
6464+ target 'src/main/java/**/*.kt'
6565+ // Use ktfmt(https://github.com/facebook/ktfmt) as the default Kotlin formatter.
6666+ ktfmt('0.43').kotlinlangStyle()
6767+ }
6868+}
+18
src/xrt/ipc/android/build.gradle
···7788 id 'kotlin-kapt'
99 id 'dagger.hilt.android.plugin'
1010+1111+ id 'com.diffplug.spotless'
1012}
11131214android {
···6466 api "com.google.dagger:hilt-android:$hiltVersion"
6567 kapt "com.google.dagger:hilt-compiler:$hiltVersion"
6668}
6969+7070+spotless {
7171+ java {
7272+ target 'src/main/java/**/*.java'
7373+ // apply a specific flavor of google-java-format.
7474+ googleJavaFormat('1.8').aosp().reflowLongStrings()
7575+ // fix formatting of type annotations.
7676+ formatAnnotations()
7777+ }
7878+7979+ kotlin {
8080+ target 'src/main/java/**/*.kt'
8181+ // Use ktfmt(https://github.com/facebook/ktfmt) as the default Kotlin formatter.
8282+ ktfmt('0.43').kotlinlangStyle()
8383+ }
8484+}
+18
src/xrt/targets/android_common/build.gradle
···11111212 // SVG files in the "raw" resource directory will be transformed into vector drawables of the same name.
1313 id 'com.quittle.svg-2-android-vector'
1414+1515+ // Use spotless to format Java and Kotlin code.
1616+ id 'com.diffplug.spotless'
1417}
15181919+spotless {
2020+ java {
2121+ target 'src/main/java/**/*.java'
2222+ // apply a specific flavor of google-java-format.
2323+ googleJavaFormat('1.8').aosp().reflowLongStrings()
2424+ // fix formatting of type annotations.
2525+ formatAnnotations()
2626+ }
2727+2828+ kotlin {
2929+ target 'src/main/java/**/*.kt'
3030+ // Use ktfmt(https://github.com/facebook/ktfmt) as the default Kotlin formatter. .
3131+ ktfmt('0.43').kotlinlangStyle()
3232+ }
3333+}
16341735android {
1836 compileSdk project.sharedCompileSdk
+19
src/xrt/targets/openxr_android/build.gradle
···17171818 // SVG files in the "raw" resource directory will be transformed into vector drawables of the same name.
1919 id 'com.quittle.svg-2-android-vector'
2020+2121+ // Use spotless to format Java and Kotlin code
2222+ id 'com.diffplug.spotless'
2323+}
2424+2525+spotless {
2626+ java {
2727+ target 'src/main/java/**/*.java'
2828+ // apply a specific flavor of google-java-format.
2929+ googleJavaFormat('1.8').aosp().reflowLongStrings()
3030+ // fix formatting of type annotations.
3131+ formatAnnotations()
3232+ }
3333+3434+ kotlin {
3535+ target 'src/main/java/**/*.kt'
3636+ // Use ktfmt(https://github.com/facebook/ktfmt) as the default Kotlin formatter.
3737+ ktfmt('0.43').kotlinlangStyle()
3838+ }
2039}
21402241// apply from: file("../android_common/fetch-eigen.gradle")