-
Notifications
You must be signed in to change notification settings - Fork 4k
Update Gradle, AGP, Hilt #2799
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Gradle, AGP, Hilt #2799
Changes from all commits
85cfff6
30f3407
dc01b26
82d8c80
5a187b6
1395f93
cd658fe
89a3079
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -71,15 +71,18 @@ jobs: | |
| path: | | ||
| ~/.android/avd/* | ||
| ~/.android/adb* | ||
| key: avd-cached-${{ matrix.api-level }}-${{ matrix.os }}-${{ matrix.target }} | ||
| key: avd-cached-${{ matrix.api-level }}-${{ matrix.os }}-${{ matrix.target }}-${{ hashFiles('**/libs.versions.toml') }} | ||
| restore-keys: | | ||
| avd-cached-${{ matrix.api-level }}-${{ matrix.os }}-${{ matrix.target }}- | ||
| - name: Create AVD and generate snapshot for caching | ||
| if: steps.avd-cache.outputs.cache-hit != 'true' | ||
| uses: reactivecircus/android-emulator-runner@v2 | ||
| with: | ||
| api-level: ${{ matrix.api-level }} | ||
| target: ${{ matrix.target }} | ||
| arch: ${{ matrix.arch }} | ||
| force-avd-creation: false | ||
| # FORCE true here ensures if 'actions/cache' restored old avd, we wipe and start with a fresh image for the new dependency hash. | ||
| force-avd-creation: true | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does this mean we create a new AVD on every run? Doesn't that slow down CI?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No — only when
|
||
| emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none -no-snapshot-load | ||
| disable-animations: false | ||
| script: echo "Generated AVD snapshot for caching." | ||
|
|
@@ -92,14 +95,6 @@ jobs: | |
| arch: ${{ matrix.arch }} | ||
| emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none -no-snapshot-save | ||
| script: | | ||
| # Uninstall existing packages to avoid INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES | ||
| # when a cached AVD snapshot has old APKs signed with different keys. | ||
| adb uninstall com.squareup.leakcanary || true | ||
| adb uninstall com.squareup.leakcanary.test || true | ||
| adb uninstall com.squareup.leakcanary.core || true | ||
| adb uninstall com.squareup.leakcanary.core.test || true | ||
| adb uninstall com.squareup.leakcanary.instrumentation || true | ||
| adb uninstall com.squareup.leakcanary.instrumentation.test || true | ||
| touch emulator.log | ||
| chmod 777 emulator.log | ||
| adb logcat >> emulator.log & | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,7 @@ | ||
| distributionBase=GRADLE_USER_HOME | ||
| distributionPath=wrapper/dists | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip | ||
| networkTimeout=10000 | ||
| validateDistributionUrl=true | ||
| zipStoreBase=GRADLE_USER_HOME | ||
| zipStorePath=wrapper/dists |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's this about?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cache fallback. The exact key includes
hashFiles('**/libs.versions.toml'), so when deps change there's no exact match. Withoutrestore-keys, that's a total cache miss — the emulator runner has to set up everything from scratch. Withrestore-keys: avd-cached-{api-level}-{os}-{target}-, GitHub will restore the most recent cached AVD for that API level/target combination (from a previous dep version) as a partial restore. Thenforce-avd-creation: truewipes that old snapshot and creates a fresh one, which gets saved under the new key.