diff --git a/.github/actions/setup-environment/action.yml b/.github/actions/setup-environment/action.yml
new file mode 100644
index 0000000..1fcbdb4
--- /dev/null
+++ b/.github/actions/setup-environment/action.yml
@@ -0,0 +1,27 @@
+name: Set up environment
+description: Common environment setup steps for this repository
+
+inputs:
+ jdk:
+ description: Set up JDK
+ required: false
+ default: 'false'
+ gradle:
+ description: Set up Gradle
+ required: false
+ default: 'false'
+
+runs:
+ using: composite
+ steps:
+ - name: Set up JDK
+ if: ${{ inputs.jdk == 'true' || inputs.gradle == 'true' }}
+ uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0
+ with:
+ java-version-file: '.java-version'
+ distribution: 'temurin'
+ # Using 'temurin' speeds up the job, because this distribution is cached by the runner.
+ # See: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#Hosted-Tool-Cache
+ - name: Set up Gradle
+ if: ${{ inputs.gradle == 'true' }}
+ uses: gradle/actions/setup-gradle@d156388eb19639ec20ade50009f3d199ce1e2808 # v4.1.0
diff --git a/.github/workflows/on-pull-request.yml b/.github/workflows/on-pull-request.yml
index f9889af..f716dec 100644
--- a/.github/workflows/on-pull-request.yml
+++ b/.github/workflows/on-pull-request.yml
@@ -1,23 +1,37 @@
name: PR checks
-on: pull_request
+on:
+ pull_request:
+ merge_group:
jobs:
+ android-lint:
+ name: Android Lint
+ runs-on: ubuntu-24.04
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
+ - name: Set up environment
+ uses: ./.github/actions/setup-environment
+ with:
+ gradle: true
+ - name: Decrypt secrets
+ env:
+ GPG_KEY: ${{ secrets.gpg_key }}
+ run: secrets/decrypt.sh
+ - name: Run Android Lint
+ run: scripts/run-android-lint.sh
+
licenses:
name: Validate licenses
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- - name: Set up JDK
- uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0
+ - name: Set up environment
+ uses: ./.github/actions/setup-environment
with:
- java-version-file: '.java-version'
- distribution: 'temurin'
- # Using 'temurin' speeds up the job, because this distribution is cached by the runner.
- # See: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#Hosted-Tool-Cache
- - name: Set up Gradle
- uses: gradle/actions/setup-gradle@d156388eb19639ec20ade50009f3d199ce1e2808 # v4.1.0
+ gradle: true
- name: Decrypt secrets
env:
GPG_KEY: ${{ secrets.gpg_key }}
diff --git a/Pocket/build.gradle.kts b/Pocket/build.gradle.kts
index 75d1d18..67e6d45 100644
--- a/Pocket/build.gradle.kts
+++ b/Pocket/build.gradle.kts
@@ -216,8 +216,8 @@ android {
}
lint {
- abortOnError = false
checkReleaseBuilds = false
+ checkDependencies = true
}
buildFeatures {
viewBinding = true
diff --git a/Pocket/lint.xml b/Pocket/lint.xml
deleted file mode 100644
index 03d1ed1..0000000
--- a/Pocket/lint.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/Pocket/src/main/res/values/donottranslate.xml b/Pocket/src/main/res/values/donottranslate.xml
index 1b4b12f..f344999 100755
--- a/Pocket/src/main/res/values/donottranslate.xml
+++ b/Pocket/src/main/res/values/donottranslate.xml
@@ -1,5 +1,7 @@
-
+
Pocket
Pocket
Alpha Settings
@@ -31,5 +33,5 @@
638773995762
1:638773995762:android:11ffc4bd95a81fa4
api-project-638773995762.appspot.com
- api-project-638773995762
+ api-project-638773995762
diff --git a/Pocket/src/main/res/values/leakcanary.xml b/Pocket/src/main/res/values/leakcanary.xml
index 2ccacb2..999efb0 100644
--- a/Pocket/src/main/res/values/leakcanary.xml
+++ b/Pocket/src/main/res/values/leakcanary.xml
@@ -1,4 +1,7 @@
-
+
false
diff --git a/lint.xml b/lint.xml
new file mode 100644
index 0000000..5c617b5
--- /dev/null
+++ b/lint.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/scripts/run-android-lint.sh b/scripts/run-android-lint.sh
new file mode 100755
index 0000000..b198bec
--- /dev/null
+++ b/scripts/run-android-lint.sh
@@ -0,0 +1,6 @@
+#!/usr/bin/env bash
+
+# Fail if any commands fails.
+set -e
+
+./gradlew :Pocket:lint