Commit 44e42ae
authored
build: cache R8 compatibility transformations (#1014)
The R8 compatibility fixture currently runs its expensive transformation
on every test invocation. Declare the program jar, both ProGuard rule
files, and JDK library directory as inputs, and the transformed jar and
mapping as outputs, so Gradle can restore identical transformations from
its build cache. JavaExec already tracks the tool classpath and
arguments. Both executable compatibility smoke tests still run.
Local JDK 21 experiments after deleting fixture outputs reduced the
shrinker test command from **45s to 3s** with the R8 output restored.
Changing a rule file changed the cache key and reran R8; restoring the
rules restored the cached result. Both smoke tests passed in each case.
Final independent-branch verification passed in 2s with Shadow,
ProGuard, and R8 restored and both smoke tests executing.
This is a one-file change with no dependency or optimizer-option
changes. CI reuse needs a trusted main cache with matching inputs; #1012
enables retaining test preparation on main. SDK, rules, tool, or JDK
changes still rebuild. Absolute argument paths conservatively restrict
cache reuse to matching checkout/JDK paths.
Validation: Kotlin/Java lint and 47 build-logic tests passed; cold
execution, clean-output restoration, rule invalidation, and both
shrinker smoke tests passed. Security-focused adversarial review checks
cache input coverage and preserves existing cache trust boundaries.
<!-- codex-thread: 01a0b068-1c07-70a1-b846-2ed907c8c512 -->1 parent 7d2077c commit 44e42ae
1 file changed
Lines changed: 12 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
78 | 79 | | |
79 | 80 | | |
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
84 | 85 | | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
85 | 96 | | |
86 | 97 | | |
87 | 98 | | |
88 | 99 | | |
89 | 100 | | |
90 | 101 | | |
91 | 102 | | |
92 | | - | |
| 103 | + | |
93 | 104 | | |
94 | 105 | | |
95 | 106 | | |
| |||
0 commit comments