Commit a8e45be
authored
Fix Gradle remote build cache relocatability (#7999)
* build: make cacheable test inputs relocatable
* Disabled caching for all test tasks, ecept for :test, as they have utputs.upToDateWhen { false } configured, which effectively disabled caching anyway
* build: fix missing task dependencies causing cache disabled for correctness
- Add sourcesJar.dependsOn(generateGrammarSource) in geode-core so the
sourcesJar task declares its dependency on antlr-generated sources.
- Replace taskGraph.whenReady combineReports wiring with eager subprojects
configuration so Gradle sees the dependency declarations during
configuration phase instead of after task graph finalization.
* build: use mustRunAfter instead of dependsOn for combineReports
dependsOn forces all test tasks to execute when combineReports runs.
The original whenReady wiring never triggered tasks because the graph
was already sealed. mustRunAfter preserves ordering without forcing
execution.
* build: revert eager combineReports wiring, fix geode-old-versions only
reportOn creates implicit file dependencies that trigger all test tasks.
Revert to original whenReady block and instead add the missing
finalizedBy/mustRunAfter wiring in geode-old-versions, which is the
only project that lacks it since it doesn't apply geode-test.gradle.
* build: exclude geode-old-versions version dirs from rat task inputs
The version subdirectories (1.10.0, 1.11.0, etc.) are empty Gradle
project directories with no source files. Gradle creates them during
the build, so their presence differs between clean builds in different
locations, causing a rat task cache miss.
* build: clean geode-old-versions subproject dirs to fix rat cache miss
The version subdirectories (1.10.0, 1.11.0, etc.) are not in git but
get created during the build as Gradle project directories. On
subsequent clean builds from the same location, these dirs persist
after clean and cause rat task input fingerprint mismatches. Add a
deleteOldGeodeVersions task finalized by clean to remove them.1 parent 37f72de commit a8e45be
6 files changed
Lines changed: 16 additions & 5 deletions
File tree
- build-tools/scripts/src/main/groovy
- geode-core
- geode-jmh
- geode-old-versions
- geode-server-all
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| 94 | + | |
94 | 95 | | |
95 | 96 | | |
96 | 97 | | |
97 | 98 | | |
98 | 99 | | |
99 | 100 | | |
| 101 | + | |
100 | 102 | | |
101 | 103 | | |
102 | 104 | | |
| |||
148 | 150 | | |
149 | 151 | | |
150 | 152 | | |
| 153 | + | |
151 | 154 | | |
152 | 155 | | |
153 | 156 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
438 | 438 | | |
439 | 439 | | |
440 | 440 | | |
| 441 | + | |
441 | 442 | | |
442 | 443 | | |
443 | 444 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
113 | 117 | | |
114 | 118 | | |
| 119 | + | |
115 | 120 | | |
116 | 121 | | |
117 | 122 | | |
| |||
141 | 146 | | |
142 | 147 | | |
143 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
| 78 | + | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
0 commit comments