Commit 92432a8
build: bump wrapper to Gradle 9.7.0, clear the blockers and deprecations
Gradle 9.7.0 ships Kotlin 2.4, which enforces Transformer's declared
OUT : Any bound. ContentFilterable.filter takes Transformer<String?,
String> - the OUT is nullable because returning null there drops the
line - so naming that type is now a compile error (KTLC-358), and
facades/PC named it twice: implementing the interface, and casting to
it. The net effect is that Gradle's own API is not implementable from
the Kotlin that Gradle ships with. Passing a lambda instead lets SAM
conversion supply the type argument, so the script never names it;
ScriptClasspathRewriter keeps its logic and never returned null anyway.
That was a prerequisite for the bump rather than a consequence of it: on
9.6.1 Kotlin only warns ("will become an error in language version 2.5"),
so the script had to stop naming the type before the wrapper could move.
Anyone already running a system Gradle 9.7.0 could not configure this
build at all.
Only the distributionUrl moves. The wrapper jar and gradlew scripts are
left alone - they are just the bootstrapper, and the existing ones drive
9.7.0 fine, so regenerating them would be diff noise. Staying on -bin
too: the wrapper task would have switched it to -all, making every CI run
additionally download sources and docs.
Also clears the Gradle 10 deprecations this repo owns - 100 warnings
before, 39 after:
- modules/build.gradle.kts passed the Project object itself to api(),
once per subproject. Using a Project as dependency notation fails with
an error in Gradle 10; it now depends on project(path).
- GradleDependencyInfo.asMap() produced the group:/name:/version: map
form, which terasology-module.gradle.kts applies to every module.
Multi-string notation also fails in Gradle 10, so it now produces
single-string "group:module:version". Version ranges are unaffected -
they contain no colons, so the coordinate still splits unambiguously.
- config/gradle/publish.gradle read publishRepo/mavenUser/mavenPass as
bare names, an implicit lookup in a parent project. Those sit inside
hasProperty guards, so they would have broken publishing, not building.
Every remaining warning traces into libs/gestalt or libs/TeraNUI, which
are independent repos reached through includeBuild and need their own
PRs. The module-attributed ones were never the module repos' fault:
every modules/*/build.gradle is byte-identical to templates/build.gradle
and only applies terasology-module, so those were this repo's
build-logic reported once per project.
Not addressed: the protoc coordinate warning attributed to :engine comes
from protobuf-gradle-plugin 0.9.4's own ToolsLocator, which tokenizes the
single-string coordinate we give it and rebuilds it as a map.
engine/build.gradle.kts is already correct; that needs a plugin upgrade.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>1 parent 338d7dd commit 92432a8
6 files changed
Lines changed: 16 additions & 16 deletions
File tree
- build-logic/src/main/kotlin
- org/terasology/gradology
- config/gradle
- facades/PC
- gradle/wrapper
- modules
Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
21 | | - | |
| 19 | + | |
22 | 20 | | |
23 | 21 | | |
24 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
46 | | - | |
47 | | - | |
| 47 | + | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
202 | | - | |
| 202 | + | |
| 203 | + | |
203 | 204 | | |
204 | 205 | | |
205 | 206 | | |
| |||
242 | 243 | | |
243 | 244 | | |
244 | 245 | | |
245 | | - | |
| 246 | + | |
246 | 247 | | |
247 | 248 | | |
248 | | - | |
| 249 | + | |
249 | 250 | | |
250 | 251 | | |
251 | 252 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
| 24 | + | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
0 commit comments