Skip to content

Conversation

@kylev
Copy link
Contributor

@kylev kylev commented Apr 14, 2025

Proposed Changes

Fix build against now-stabilized ModDevGradle API.

Additional Context

I encountered a runtime error while setting up a AlmostReliable/merequester dev environment:

* Where:
Build file 'C:\xxx\merequester\build.gradle.kts' line: 6

* What went wrong:
'org.gradle.api.provider.Property net.neoforged.moddevgradle.dsl.NeoForgeExtension.getVersion()'

While trying to run the almostgradle test task, the 2.0.80 version of moddevgradle caused a compilation error:

C:\xxx\almostgradle\src\main\java\com\almostreliable\almostgradle\AlmostGradleExtension.java:189: error: cannot find symbol
        neoForge.getVersion().set(getNeoforgeVersion());
                             ^
  symbol:   method set(String)
  location: class String
1 error

The API changed in neoforged/ModDevGradle#200 which became 2.0.64-beta.

This API changed from the unstable releases.
@rlnt
Copy link
Member

rlnt commented Apr 14, 2025

While it's understandable to make this toolchain work with the newest MDG version, I don't really get the reason behind it. Why do you need that to set up ME Requester? The mod uses a fixed version and I can set it up just fine. That must mean you updated the version yourself for some reason? And why do you execute the test task? The mod doesn't use tests.

@kylev
Copy link
Contributor Author

kylev commented Apr 14, 2025

I encountered a bug in merequester while playing ATM-10 and went to reproduce it, and found the tooling there outdated and a bit clunky to get working on my machine. I encountered this upstream problem as a result.

Note: this currently means all downstream consumers of almostgradle 1.1.1 must use pre-release versions of ModDevGradle < 2.0.64-beta.

@kylev
Copy link
Contributor Author

kylev commented Apr 14, 2025

As mentioned in chat, the upstream API change creates some hassle. Depending how this is merged or released, others' builds may break.

One suggestion is to release it as 1.2.0 "MDG is out of beta"-release to prevent projects like lootjs that use the 1.1.+ wildcard from picking it up during any new builds. They can then upgrade to 1.2.0 and release version of MDG (like 2.0.80) simultaneously later.

@rlnt rlnt mentioned this pull request Apr 15, 2025
@rlnt
Copy link
Member

rlnt commented Apr 15, 2025

Superseded by #2.

@rlnt rlnt closed this Apr 15, 2025
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