From 637cf3aa36fda37dd180c9e8b9fe64f6fd48a8bf Mon Sep 17 00:00:00 2001 From: M66B Date: Thu, 2 Nov 2023 10:43:27 +0100 Subject: [PATCH] Run lint in workflow --- .github/workflows/android.yml | 2 ++ app/build.gradle | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 0d79aa1b24..a04e7c9d17 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -40,6 +40,8 @@ jobs: gpg -d --passphrase "${PASSWORD}" --batch local.properties.asc > local.properties - name: Grant execute permission for gradlew run: chmod +x gradlew + - name: Check with Lint + run: ./gradlew lintGithubRelease - name: Build with Gradle run: ./gradlew assembleGithubRelease assembleLargeRelease assemblePlayRelease uploadBugsnagGithub-releaseMapping uploadBugsnagLarge-releaseMapping uploadBugsnagPlay-releaseMapping - name: Upload to BitBucket diff --git a/app/build.gradle b/app/build.gradle index cd0fdd1c2b..98e3ce0aff 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -79,10 +79,14 @@ android { } lint { - abortOnError false + // https://developer.android.com/studio/write/lint + // https://developer.android.com/reference/tools/gradle-api/8.0/com/android/build/api/dsl/LintOptions + abortOnError true checkReleaseBuilds false + checkDependencies false disable 'MissingTranslation' - enable 'StringFormatInvalid' + fatal 'StringFormatInvalid', 'StringFormatMatches', 'StringFormatCount' + checkOnly 'StringFormatInvalid', 'StringFormatMatches', 'StringFormatCount' } compileOptions {