MinecraftForge / ForgeGradle

Minecraft mod development framework used by Forge and FML for the gradle build system
GNU Lesser General Public License v2.1
517 stars 444 forks source link

ForgeGradle 5 doesn't support plugin DSL syntax #835

Closed tyhdefu closed 2 years ago

tyhdefu commented 2 years ago

ForgeGradle 5 cannot be applied with the plugin DSL syntax, only the legacy apply plugin + buildscript classpath syntax. I have even specified the forge repository as one of the places to grab plugins for, but it still cannot find the plugin Im using gradle 7.3

Plugin [id: 'net.minecraftforge.gradle', version: '5.1.+'] was not found in any of the following sources:

- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (could not resolve plugin artifact 'net.minecraftforge.gradle:net.minecraftforge.gradle.gradle.plugin:5.1.+')
  Searched in the following repositories:
    Gradle Central Plugin Repository
    maven(https://files.minecraftforge.net/maven)
    at org.gradle.plugin.use.internal.DefaultPluginRequestApplicator.resolveToFoundResult(DefaultPluginRequestApplicator.java:222)
    at org.gradle.plugin.use.internal.DefaultPluginRequestApplicator.lambda$resolvePluginRequests$3(DefaultPluginRequestApplicator.java:147)
    at org.gradle.util.internal.CollectionUtils.collect(CollectionUtils.java:207)
    at org.gradle.util.internal.CollectionUtils.collect(CollectionUtils.java:201)
    at org.gradle.plugin.use.internal.DefaultPluginRequestApplicator.resolvePluginRequests(DefaultPluginRequestApplicator.java:145)
        --snip--
Caused by: org.gradle.api.plugins.UnknownPluginException: Plugin [id: 'net.minecraftforge.gradle', version: '5.1.+'] was not found in any of the following sources:

Seems to previously be brought up in #439 for previous gradle versions but no longer seems to be resolved

This has been resolved in Gradle 4.10. Thought it seems like FG currently does not work on 4.10 or higher as of #552. - MinecraftPlaye

SizableShrimp commented 2 years ago

ForgeGradle intentionally does not publish plugin markers. This is also not a place to receive support for that kind of thing. Use the Forge discord if you want further help.

sciwhiz12 commented 2 years ago

After reconsideration, we are now planning to generate and publish plugin marker artifacts for ForgeGradle, through PR #858, which will allow the use of the plugins DSL syntax (provided that the Forge maven is added as a repository in the pluginManagement block of the settings.gradle).

I am reopening this issue so it will be (automatically) closed as completed once the PR is merged.