Skip to content

Supersede PR #2973: ci: bump gradle-wrapper from 9.4.1 to 9.7.1 - #2978

Merged
riccardobl merged 3 commits into
jMonkeyEngine:masterfrom
jaime-jmebot:jaime/supersede-pr-2973-3801fb34
Sep 28, 2026
Merged

riccardobl merged 3 commits into
jMonkeyEngine:masterfrom
jaime-jmebot:jaime/supersede-pr-2973-3801fb34

Conversation

@jaime-jmebot

@jaime-jmebot jaime-jmebot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Supersedes #2973
Requested by @riccardobl.

Supersedes #2973, as requested. It has the same wrapper bump plus the buildscript fix that makes CI pass.

What was actually breaking

I pulled the failing log, so no more guessing. Every job died during configuration, before anything compiled:

* What went wrong:
Could not get unknown property 'sourceSets' for object of type
'org.gradle.api.artifacts.DefaultProjectDependency'.
> Where: Build file '/home/runner/work/jmonkeyengine/jmonkeyengine/jme3-terrain/build.gradle' line: 4

DefaultProjectDependency was the giveaway — the receiver isn't the project, it's a project dependency. The offending line was:

testImplementation project(':jme3-core').sourceSets.test.output

Inside a dependencies { } block, Gradle configures the block with the DependencyHandler as delegate. Up to 9.4 that handler had no project(String) overload, so the call fell through to the script and returned the Project — which is why .sourceSets worked. Gradle 9.5 added DependencyHandler.project(String), so the call now matches the delegate and returns a ProjectDependency instead, which has no sourceSets.

I checked the API docs across versions to be sure: 9.4.1 only has project(Map), 9.5.0 adds project(String). So this was introduced somewhere in 9.5 — it never had anything to do with the Android projects, my earlier guess. Good thing CI could tell us.

The fix

One line moved out of the dependencies block, where project(path) unambiguously means the Project:

def jme3CoreTestClasses = files(project(':jme3-core').sourceSets.test.output)

dependencies {
    ...
    testImplementation jme3CoreTestClasses
}

Wrapping in files() keeps it a file collection, so the implicit dependency on :jme3-core's test compilation is carried over exactly as before — the terrain tests still compile jme3-core's tests first. The in-file comment explains why it can't go back.

I swept the other build scripts: no other dependencies block dereferences a property on a project dependency, and the other project(':x').tasks.named(...) calls are fine because they aren't in a dependencies block. The Android apps configure with their own plugin and never touch project.sourceSets at the project level.

Also included

The distributionSha256Sum pin from my inline note on #2973, since the properties file was being rewritten anyway. It means a corrupted wrapper download now fails the build instead of being executed — worth noting that CI's wrapper-validation step only checks the wrapper JAR, not the distribution zip, so nothing else covered this.

Honest caveat

I couldn't run ./gradlew end-to-end here, so this hasn't had a real build against it — CI is the first full exercise of 9.4.1 → 9.7.1. What I did verify: the failing log and its exact line, the delegate-resolution mechanism (reproduced in isolation against the 9.4 and 9.5 handler shapes), that the new file configures cleanly under 9.7 semantics, and that every build script still parses. The change is deliberately narrow so that if something else in 9.5–9.7 surfaces, the diff makes it obvious.

#2973 can be closed. One heads-up: Dependabot will open a fresh one for the same bump once this merges or goes stale.

Changes

  • jme3-terrain/build.gradle

dependabot Bot and others added 3 commits September 28, 2026 03:07
Bumps [gradle-wrapper](https://github.com/gradle/gradle) from 9.4.1 to 9.7.1.
- [Release notes](https://github.com/gradle/gradle/releases)
- [Commits](gradle/gradle@v9.4.1...v9.7.1)

---
updated-dependencies:
- dependency-name: gradle-wrapper
  dependency-version: 9.7.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Jaime Bot <jaime@rblb.it>
Supersedes jMonkeyEngine#2973. Gradle 9.5 added DependencyHandler.project(String),
so project(':jme3-core') inside dependencies {} returns a
ProjectDependency with no sourceSets. Resolve the test-output file
collection at the top of the script instead.
@riccardobl
riccardobl merged commit 137119e into jMonkeyEngine:master Sep 28, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants