diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index ac76c2524..a9c0d9a56 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -12,7 +12,7 @@ on: pull_request: branches: [ main ] merge_group: - branches: [ main ] + types: [ checks-requested ] workflow_dispatch: @@ -47,15 +47,19 @@ jobs: uses: gradle/actions/setup-gradle@v4 with: cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} + build-scan-publish: true + build-scan-terms-of-use-url: 'https://gradle.com/terms-of-service' + build-scan-terms-of-use-agree: 'yes' + add-job-summary: always - name: Check lint - run: ./gradlew lintFdroidDebug lintGoogleDebug + run: ./gradlew lintFdroidDebug lintGoogleDebug --configuration-cache --scan - name: Build debug artifacts - run: ./gradlew assembleDebug + run: ./gradlew assembleDebug --configuration-cache --scan - name: Run local tests - run: ./gradlew testFdroidDebug testGoogleDebug + run: ./gradlew testFdroidDebug testGoogleDebug --configuration-cache --scan - name: Upload debug artifact uses: actions/upload-artifact@v4 @@ -91,9 +95,15 @@ jobs: - name: Setup Gradle uses: gradle/actions/setup-gradle@v4 + with: + cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} + build-scan-publish: true + build-scan-terms-of-use-url: 'https://gradle.com/terms-of-service' + build-scan-terms-of-use-agree: 'yes' + add-job-summary: always - name: Check detekt - run: ./gradlew detekt + run: ./gradlew detekt --configuration-cache --scan - name: Upload build reports if: ${{ !cancelled() }} @@ -127,6 +137,12 @@ jobs: distribution: 'jetbrains' - uses: gradle/actions/setup-gradle@v4 + with: + cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} + build-scan-publish: true + build-scan-terms-of-use-url: 'https://gradle.com/terms-of-service' + build-scan-terms-of-use-agree: 'yes' + add-job-summary: always - uses: actions/cache@v4 id: avd-cache @@ -162,7 +178,7 @@ jobs: force-avd-creation: false emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -no-metrics -camera-back none disable-animations: true - script: ./gradlew :app:connectedFdroidDebugAndroidTest && killall -INT crashpad_handler || true + script: ./gradlew :app:connectedFdroidDebugAndroidTest --configuration-cache --scan && killall -INT crashpad_handler || true - name: Upload Test Results if: ${{ !cancelled() }} diff --git a/.github/workflows/dependency-submission.yml b/.github/workflows/dependency-submission.yml new file mode 100644 index 000000000..c9cfb6674 --- /dev/null +++ b/.github/workflows/dependency-submission.yml @@ -0,0 +1,22 @@ +name: Dependency Submission + +on: + push: + branches: [ 'main' ] + workflow_dispatch: + +permissions: + contents: write + +jobs: + dependency-submission: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: jetbrains + java-version: 21 + + - name: Generate and submit dependency graph + uses: gradle/actions/dependency-submission@v4 \ No newline at end of file diff --git a/app/build.gradle.kts b/app/build.gradle.kts index d6d314d9a..f6e18b516 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -249,11 +249,14 @@ detekt { baseline = file("../config/detekt/detekt-baseline.xml") } +val googleServiceKeywords = listOf("crashlytics", "google") tasks.configureEach { if ( - name.contains("crashlytics", ignoreCase = true) && name.contains("fdroid", ignoreCase = true) + googleServiceKeywords.any { + name.contains(it, ignoreCase = true) + } && name.contains("fdroid", ignoreCase = true) ) { - project.logger.lifecycle("Disabling Crashlytics task for F-Droid: $name") + project.logger.lifecycle("Disabling task for F-Droid: $name") enabled = false } }