Commit 65e2a82
chore(build): parallel configuration cache, and make version assignment IP-safe
Enables org.gradle.configuration-cache.parallel, and removes the one thing in
this build that Isolated Projects rejects.
The root build script set the git-derived version through `allprojects { }`.
Under Isolated Projects that fails outright — "Project ':' cannot access
'Project.version' functionality on subprojects via 'allprojects'" — because the
root project may not reach into its subprojects' state. The supported
equivalent is gradle.lifecycle.beforeProject in settings.gradle.kts, which
needs no cross-project access, so the derivation moves there wholesale.
One subtlety worth the comment it carries: the beforeProject lambda must close
over a *local* copy of the resolved version. A top-level `val` in a settings
script is a field of the script object, so referencing it directly makes the
configuration cache try to serialise the script itself and fail with "cannot
serialize Gradle script object references".
Isolated Projects is still not enabled, and the remaining blocker is not ours:
KGP's WasmNpmResolverPlugin reaches from :sample into the root project
("Project ':sample' cannot access 'Project.plugins' functionality on another
project ':'"). gradle.properties records this so the next reader does not
rediscover it. With the build's own side now clean, turning the feature on is a
one-line change once JetBrains isolates the Wasm/npm plugins.
Verified with spotlessCheck detektAll allTests apiCheck koverVerify.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent 4689a54 commit 65e2a82
3 files changed
Lines changed: 49 additions & 33 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | 19 | | |
53 | 20 | | |
54 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
6 | 12 | | |
7 | 13 | | |
8 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
26 | 69 | | |
27 | 70 | | |
28 | 71 | | |
| |||
0 commit comments