SpongePowered / SpongeGradle

Handy gradle utilities for the various gradle projects of SpongePowered
MIT License
21 stars 16 forks source link

Metadata generation is broken #25

Closed 14mRh4X0r closed 2 years ago

14mRh4X0r commented 4 years ago

With SpongeGradle 0.9, metadata was generated correctly from the Gradle project. After upgrading to 0.11, this is not the case any more.

Adding org.spongepowered.gradle.meta.bundle doesn't change the output, adding org.spongepowered.gradle.meta results in the error "Too many parameters provided for constructor for type MetadataBaseExtension. Expected 1, received 2.".

settings.gradle

rootProject.name = 'SGTest'

build.gradle

plugins {
    id 'org.spongepowered.plugin' version '0.9.0'
}

archivesBaseName = 'sgtest'
version = '0.1'
description = "Test plugin for SpongeGradle"

dependencies {
    compileOnly 'org.spongepowered:spongeapi:7.2.0'
    annotationProcessor 'org.spongepowered:spongeapi:7.2.0'
}

src/main/java/SGTest.java

@org.spongepowered.api.plugin.Plugin(id="sgtest")
public class SGTest {}

mcmod.info output for 0.9

[
    {
        "modid": "sgtest",
        "name": "SGTest",
        "version": "0.1",
        "description": "Test plugin for SpongeGradle",
        "dependencies": [
            "spongeapi@7.2.0"
        ],
        "requiredMods": [
            "spongeapi@7.2.0"
        ]
    }
]

mcmod.info output for 0.11.5

[
    {
        "modid": "sgtest",
        "dependencies": [
            "spongeapi@7.2.0"
        ],
        "requiredMods": [
            "spongeapi@7.2.0"
        ]
    }
]
zml2008 commented 2 years ago

This issue is no longer applicable to SpongeGradle 2.0.0+