summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2024-01-14 02:23:02 +0100
committerGitHub <noreply@github.com>2024-01-14 02:23:02 +0100
commitda714a362b159cfc02bd606a0dedf0d50f4dfa79 (patch)
tree742072bed52d07dae8aa7a8e6e22d640aca9fdb7
parentMerge pull request #12605 from german77/abstract (diff)
parentandroid: Move ktlintCheck to yuzu-verify (diff)
downloadyuzu-da714a362b159cfc02bd606a0dedf0d50f4dfa79.tar
yuzu-da714a362b159cfc02bd606a0dedf0d50f4dfa79.tar.gz
yuzu-da714a362b159cfc02bd606a0dedf0d50f4dfa79.tar.bz2
yuzu-da714a362b159cfc02bd606a0dedf0d50f4dfa79.tar.lz
yuzu-da714a362b159cfc02bd606a0dedf0d50f4dfa79.tar.xz
yuzu-da714a362b159cfc02bd606a0dedf0d50f4dfa79.tar.zst
yuzu-da714a362b159cfc02bd606a0dedf0d50f4dfa79.zip
-rwxr-xr-x.ci/scripts/format/script.sh3
-rw-r--r--.github/workflows/verify.yml8
-rw-r--r--src/android/app/build.gradle.kts9
3 files changed, 16 insertions, 4 deletions
diff --git a/.ci/scripts/format/script.sh b/.ci/scripts/format/script.sh
index c22398de0..f9c63dbfa 100755
--- a/.ci/scripts/format/script.sh
+++ b/.ci/scripts/format/script.sh
@@ -32,3 +32,6 @@ if [ ! -z "$DIFF" ]; then
echo "$DIFF"
exit 1
fi
+
+cd src/android
+./gradlew ktlintCheck
diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml
index c073f3f3f..62eb69aeb 100644
--- a/.github/workflows/verify.yml
+++ b/.github/workflows/verify.yml
@@ -13,13 +13,15 @@ jobs:
format:
name: 'verify format'
runs-on: ubuntu-latest
- container:
- image: yuzuemu/build-environments:linux-clang-format
- options: -u 1001
steps:
- uses: actions/checkout@v3
with:
submodules: false
+ - name: set up JDK 17
+ uses: actions/setup-java@v3
+ with:
+ java-version: '17'
+ distribution: 'temurin'
- name: 'Verify Formatting'
run: bash -ex ./.ci/scripts/format/script.sh
build:
diff --git a/src/android/app/build.gradle.kts b/src/android/app/build.gradle.kts
index 53aafa08c..d62254dd3 100644
--- a/src/android/app/build.gradle.kts
+++ b/src/android/app/build.gradle.kts
@@ -188,8 +188,15 @@ tasks.create<Delete>("ktlintReset") {
delete(File(buildDir.path + File.separator + "intermediates/ktLint"))
}
+val showFormatHelp = {
+ logger.lifecycle(
+ "If this check fails, please try running \"gradlew ktlintFormat\" for automatic " +
+ "codestyle fixes"
+ )
+}
+tasks.getByPath("ktlintKotlinScriptCheck").doFirst { showFormatHelp.invoke() }
+tasks.getByPath("ktlintMainSourceSetCheck").doFirst { showFormatHelp.invoke() }
tasks.getByPath("loadKtlintReporters").dependsOn("ktlintReset")
-tasks.getByPath("preBuild").dependsOn("ktlintCheck")
ktlint {
version.set("0.47.1")