Skip to content

A fully functional Android app built entirely with Kotlin and Jetpack Compose

Run dependencyGuard task during CI (#1064)

Jonathan Korenc1d6c88bb06b
diff --git a/.github/workflows/Build.yaml b/.github/workflows/Build.yaml
index 9bd84abc0..15594800d 100644
--- a/.github/workflows/Build.yaml
+++ b/.github/workflows/Build.yaml
@@ -45,13 +45,41 @@ jobs:
- name: Check spotless
run: ./gradlew spotlessCheck --init-script gradle/init.gradle.kts --no-configuration-cache
+ - name: Check Dependency Guard
+ id: dependencyguard_verify
+ continue-on-error: true
+ run: ./gradlew dependencyGuard
+
+ - name: Prevent updating Dependency Guard baselines if this is a fork
+ id: checkfork_dependencyguard
+ continue-on-error: false
+ if: steps.dependencyguard_verify.outcome == 'failure' && github.event.pull_request.head.repo.full_name != github.repository
+ run: |
+ echo "::error::Dependency Guard failed, please run the following to update baselines:\n" \
+ " ./gradlew dependencyGuardBaseline" && exit 1
+
+ # Runs if previous job failed
+ - name: Generate new screenshots if verification failed and it's a PR
+ id: dependencyguard_baseline
+ if: steps.dependencyguard_verify.outcome == 'failure' && github.event_name == 'pull_request'
+ run: |
+ ./gradlew dependencyGuardBaseline
+
+ - name: Push new Dependency Guard baselines if available
+ uses: stefanzweifel/git-auto-commit-action@v5
+ if: steps.dependencyguard_baseline.outcome == 'success'
+ with:
+ file_pattern: '**/dependencies/*.txt'
+ disable_globbing: true
+ commit_message: "🤖 Updates baselines for Dependency Guard"
+
- name: Run all local screenshot tests (Roborazzi)
id: screenshotsverify
continue-on-error: true
run: ./gradlew verifyRoborazziDemoDebug
- name: Prevent pushing new screenshots if this is a fork
- id: checkfork
+ id: checkfork_screenshots
continue-on-error: false
if: steps.screenshotsverify.outcome == 'failure' && github.event.pull_request.head.repo.full_name != github.repository
run: |
diff --git a/app/dependencies/prodReleaseRuntimeClasspath.txt b/app/dependencies/prodReleaseRuntimeClasspath.txt
index 3f88c60ec..e9e3ebf8e 100644
--- a/app/dependencies/prodReleaseRuntimeClasspath.txt
+++ b/app/dependencies/prodReleaseRuntimeClasspath.txt
@@ -112,8 +112,8 @@ androidx.vectordrawable:vectordrawable:1.1.0
androidx.versionedparcelable:versionedparcelable:1.1.1
androidx.viewpager:viewpager:1.0.0
androidx.window:window:1.0.0
-androidx.work:work-runtime-ktx:2.9.0-rc01
-androidx.work:work-runtime:2.9.0-rc01
+androidx.work:work-runtime-ktx:2.9.0
+androidx.work:work-runtime:2.9.0
com.caverock:androidsvg-aar:1.4
com.google.accompanist:accompanist-drawablepainter:0.32.0
com.google.accompanist:accompanist-permissions:0.32.0