Detect NeoForge ModDevGradle plugin (Implements #24) #29
Conversation
| "net.neoforged.gradle", "NeoForge", | ||
| "net.neoforged.gradle.userdev", "NeoForge" | ||
| "net.neoforged.gradle.userdev", "NeoForge", | ||
| "net.neoforged.moddev", "NeoForge" |
There was a problem hiding this comment.
Unfortunately the net.neoforged.moddev plugin is also used in loaderless (common) environments so this would create a false positive. This would not be an issue in the majority of use cases but could still create confusion. This is why #24 was rejected as well. I think the correct approach would be to check if it has the plugin and does not have the neoFormVersion property, but there may also be a more reliable way to detect it.
There was a problem hiding this comment.
I had to add moddevgradle as a dependency to check if that property is set. Unfortunately, the "getNeoFormVersion" throws a slightly weird exception if it isn't set, and the underlying workflow dependency stuff is marked as internal, so the result is a little hacky.
# Conflicts: # build.gradle
Implements #24