diff --git a/build.gradle b/build.gradle index 244b7cc..717cb50 100644 --- a/build.gradle +++ b/build.gradle @@ -16,7 +16,7 @@ defaultTasks 'clean', 'licenseFormat', 'build' apply plugin: 'java' group = 'org.spongepowered' -version = '0.6.1-SNAPSHOT' +version = '0.7-SNAPSHOT' sourceCompatibility = '1.8' targetCompatibility = '1.8' @@ -25,18 +25,16 @@ archivesBaseName = project.name.toLowerCase() repositories { jcenter() + // TODO: Remove before uploading to Gradle's plugin portal + maven { + name = 'sponge' + url = 'http://repo.spongepowered.org/maven' + } } -configurations { - compileOnly -} - -sourceSets.main.compileClasspath += configurations.compileOnly -eclipse.classpath.plusConfigurations += [configurations.compileOnly] -idea.module.scopes.COMPILE.plus += [configurations.compileOnly] - dependencies { - compile 'org.spongepowered:plugin-meta:0.1.1' + // TODO: Switch to release before uploading to Gradle's plugin portal + compile 'org.spongepowered:plugin-meta:0.2-SNAPSHOT' compileOnly 'org.codehaus.groovy:groovy-all:2.4.4:indy' } diff --git a/src/main/groovy/org/spongepowered/gradle/meta/MetadataBaseExtension.groovy b/src/main/groovy/org/spongepowered/gradle/meta/MetadataBaseExtension.groovy index 2c88ad0..9db2e64 100644 --- a/src/main/groovy/org/spongepowered/gradle/meta/MetadataBaseExtension.groovy +++ b/src/main/groovy/org/spongepowered/gradle/meta/MetadataBaseExtension.groovy @@ -85,6 +85,7 @@ class MetadataBaseExtension { Object version Object description Object url + Object minecraftVersion List authors = [] @@ -106,6 +107,10 @@ class MetadataBaseExtension { return SpongeGradle.resolve(this.url) } + String getMinecraftVersion() { + return SpongeGradle.resolve(this.minecraftVersion) + } + String getAssets() { return SpongeGradle.resolve(this.assets) } @@ -116,6 +121,7 @@ class MetadataBaseExtension { meta.version = getVersion() meta.description = getDescription() meta.url = getUrl() + meta.minecraftVersion = getMinecraftVersion() meta.authors.addAll(this.authors) def assets = getAssets() diff --git a/src/main/groovy/org/spongepowered/gradle/meta/MetadataPlugin.groovy b/src/main/groovy/org/spongepowered/gradle/meta/MetadataPlugin.groovy index e3a9b95..d38caf2 100644 --- a/src/main/groovy/org/spongepowered/gradle/meta/MetadataPlugin.groovy +++ b/src/main/groovy/org/spongepowered/gradle/meta/MetadataPlugin.groovy @@ -43,6 +43,7 @@ class MetadataPlugin implements Plugin { name = project.name version = {project.version} description = {project.description} + minecraftVersion = {project.extensions.findByName('minecraft')?.version} } } }