Commit 5301c4f
fix: CI/firebase fixes and expanded R8 dead-code-elimination tests (#152)
* fix(ci): remove docs build from pull_request trigger
Docs are now built and published only on push to main or release tags.
Running a full Dokka + MkDocs build on every PR is slow and its failure
should not block merging.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* test(gradle-plugin): expand R8 elimination coverage to full boolean matrix and int flags
- Replace single-branch caller with a bifurcated caller (if + else) so one
input JAR covers the full 2×2 boolean matrix:
· flag=false → if-branch eliminated, else-branch present
· flag=true → else-branch eliminated, if-branch present
· no assumevalues → both branches survive (baseline)
- Add Int flag test family: asserts that -assumevalues return 0 causes R8 to
constant-fold `0 > 0` to false and eliminate the guarded class
- Extract sideEffectClassBytes(name) helper to deduplicate branch-target bytecode
- Add -keepclassmembers for the surviving branch's sideEffect field to prevent
R8 from eliminating it via write-only field optimisation (dead class stays
unprotected so R8 can eliminate it freely)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* style(gradle-plugin): extract R8 test setup helpers; fix wildcard import
- Extract runBooleanR8/runIntR8/runR8WithJar helpers to eliminate repeated
three-line jar/rules/output setup from every test method
- Expand Opcodes.* wildcard to explicit imports (ktlint standard:no-wildcard-imports)
- Apply spotless formatting
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(firebase): rethrow CancellationException before wrapping in FetchException
Removing the RuntimeException catch in the previous commit inadvertently
caused CancellationException (a RuntimeException subclass) to be swallowed
and wrapped in FetchException, breaking structured concurrency.
Also restore pull_request trigger in docs.yml — publish-docs is already
gated with `if: github.event_name == 'push'` so docs are validated on PRs
but not published.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 8b8787e commit 5301c4f
3 files changed
Lines changed: 394 additions & 114 deletions
File tree
- .github/workflows
- featured-gradle-plugin/src/test/kotlin/dev/androidbroadcast/featured/gradle
- providers/firebase/src/main/kotlin/dev/androidbroadcast/featured/firebase
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | 7 | | |
11 | 8 | | |
12 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
0 commit comments