Skip to content

Commit

Permalink
Format code with spotless
Browse files Browse the repository at this point in the history
  • Loading branch information
fornwall committed Sep 26, 2024
1 parent 63dd74e commit 140583f
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ jobs:
DIRNAME=upload/termux-debug-apks-"$GITHUB_SHA"
mkdir -p "$DIRNAME"
shopt -s globstar; for file in termux-*/**/*.apk; do FILENAME="$(basename "$file")"; cp "$file" "$DIRNAME"/"${FILENAME/.apk/-$GITHUB_SHA.apk}"; done
- name: Check formatting (fix with ./gradlew spotlessApply)
run: ./gradlew spotlessCheck
- uses: actions/upload-artifact@v4
if: matrix.javaVersion == '21'
with:
Expand Down
27 changes: 27 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
plugins {
id("com.diffplug.spotless") version "7.0.0.BETA2" apply false
}

buildscript {
repositories {
mavenCentral()
Expand All @@ -18,3 +22,26 @@ allprojects {
mavenCentral()
}
}

allprojects {
apply {
plugin("com.diffplug.spotless")
}
configure<com.diffplug.gradle.spotless.SpotlessExtension> {
java {
target("**/*.java")
googleJavaFormat().aosp()
trimTrailingWhitespace()
}
kotlin {
target("**/*.kt")
ktlint()
trimTrailingWhitespace()
}
kotlinGradle {
target("*.gradle.kts")
ktlint()
trimTrailingWhitespace()
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
* For example {display: 'Custom name', ...}.
*
* Examples:
* {@code
* <pre>{@code
* # Empty:
* []
*
Expand All @@ -58,7 +58,7 @@
* {key: KEYBOARD, popup: {macro: "CTRL d", display: exit}}
* ]]
*
* }
* }</pre>
*
* Aliases are also allowed for the keys that you can pass as {@code extraKeyAliasMap}. Check
* {@link ExtraKeysConstants#CONTROL_CHARS_ALIASES}.
Expand Down

0 comments on commit 140583f

Please sign in to comment.