Skip to content

ForgeGradle maven repository doesn't have Plugin Marker Artifacts #508

@Niko-sk2x

Description

@Niko-sk2x

As of gradle 4.10 it will be possible to use the new plugins syntax for snapshpot versions, and this feature is already available in latest 4.10 nightly build of gradle. But for it to work correctly, the plugin repositories need Plugin Marker Artifacts, otherwise gradle won't be able to resolve the plugin by ID.

While the old apply plugin: syntax still works, the new plugins syntax allows gradle kotlin DSL to automatically generate all the right accessors, without the need for the buildscript top successfully compile and configure, which allows to simplify the buildscript, and avoid relying on exact class names from plugins.

Currently it's possible to work around the issue by specifying a custom resolution strategy in settings.gradle like this:

pluginManagement {
    resolutionStrategy {
        eachPlugin {
            if (requested.id.toString() == 'net.minecraftforge.gradle.forge') {
                useModule('net.minecraftforge.gradle:ForgeGradle:' + requested.version)
            }
        }
    }
    repositories {
        maven {
            setUrl("http://files.minecraftforge.net/maven")
        }
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    won't fixIssue is not a real issue or not something worth fixing

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions