mirror of
https://git.suyu.dev/suyu/suyu
synced 2024-12-25 02:42:41 -06:00
Merge pull request #12666 from t895/ktlint-yuzu-verify
android: Move ktlintCheck to yuzu-verify
This commit is contained in:
commit
da714a362b
3 changed files with 16 additions and 4 deletions
|
@ -32,3 +32,6 @@ if [ ! -z "$DIFF" ]; then
|
||||||
echo "$DIFF"
|
echo "$DIFF"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
cd src/android
|
||||||
|
./gradlew ktlintCheck
|
||||||
|
|
8
.github/workflows/verify.yml
vendored
8
.github/workflows/verify.yml
vendored
|
@ -13,13 +13,15 @@ jobs:
|
||||||
format:
|
format:
|
||||||
name: 'verify format'
|
name: 'verify format'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
|
||||||
image: yuzuemu/build-environments:linux-clang-format
|
|
||||||
options: -u 1001
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
submodules: false
|
submodules: false
|
||||||
|
- name: set up JDK 17
|
||||||
|
uses: actions/setup-java@v3
|
||||||
|
with:
|
||||||
|
java-version: '17'
|
||||||
|
distribution: 'temurin'
|
||||||
- name: 'Verify Formatting'
|
- name: 'Verify Formatting'
|
||||||
run: bash -ex ./.ci/scripts/format/script.sh
|
run: bash -ex ./.ci/scripts/format/script.sh
|
||||||
build:
|
build:
|
||||||
|
|
|
@ -188,8 +188,15 @@ tasks.create<Delete>("ktlintReset") {
|
||||||
delete(File(buildDir.path + File.separator + "intermediates/ktLint"))
|
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("loadKtlintReporters").dependsOn("ktlintReset")
|
||||||
tasks.getByPath("preBuild").dependsOn("ktlintCheck")
|
|
||||||
|
|
||||||
ktlint {
|
ktlint {
|
||||||
version.set("0.47.1")
|
version.set("0.47.1")
|
||||||
|
|
Loading…
Reference in a new issue