Repository navigation
Optimize CI Gradle and independent plugin caching - #92
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CI restored Gradle caches through both
setup-javaandsetup-gradle, which prevented the latter from restoring its cache. It also rebuilt the independent plugin SDK and example on every run. Usesetup-gradlealone, enable Gradle task caching and parallel module execution, and reuse the SDK/example artifacts only when their source, build configuration, wrapper and actual JDK/Android tool inputs match exactly.The example still builds outside the checkout using only the exported SDK JAR. Missing artifacts trigger a rebuild, and partial cache keys are never restored. Source-contract tests declare repository source text/build configuration as inputs, and plugin import tests declare the fixture ZIP contents, so changed external files invalidate cached test results. Full test/Lint task commands, release signing and APK uploads are unchanged; no application runtime code changes.
Validation: four artifact cache invalidation regressions passed; a second independent build compiled Java from cache and produced identical SDK/ZIP hashes. An invalid fixture ZIP previously remained UP-TO-DATE; it now reruns and fails the import test, then passes when restored. A source-only probe also invalidated the structural test task. Full local Gradle checks passed with 1133 tests, all Lint tasks and release assembly; v2 release signature verified. Added the Python regressions to CI and documented cache behavior. Actions timing will depend on subsequent cache hits.
Final-head Actions checks passed: Release and PR. The release job took 6m44s versus 7m48s for the previous main run; this is a single-run comparison. Gradle User Home cache writes remain main-only by default, so steady-state timing should be measured after merge.