From 7764e3e3ab3ed60f9f9d8405b1c9b12910f5af13 Mon Sep 17 00:00:00 2001 From: LexManos Date: Fri, 15 Feb 2019 12:08:30 -0800 Subject: [PATCH] Revert "Migrate to maven-publish because gradle screwed up the old task." This reverts commit 9c103c4159cc90a1a4f5a54af5c660878b7c0639. --- build.gradle | 76 ++++++++++++++++++++++++++++++---------------------- 1 file changed, 44 insertions(+), 32 deletions(-) diff --git a/build.gradle b/build.gradle index e08574c60..677f364b2 100644 --- a/build.gradle +++ b/build.gradle @@ -14,7 +14,6 @@ apply plugin: 'java' apply plugin: 'idea' apply plugin: 'eclipse' apply plugin: 'maven' -apply plugin: 'maven-publish' apply plugin: "com.gradle.plugin-publish" apply plugin: 'license' @@ -232,17 +231,34 @@ pluginBundle { } } } -publishing { - publications { - mavenJava(MavenPublication) { - artifact jar - - /* - pom { - //name = project.archivesBaseName - packaging = 'jar' - description = 'Gradle plugin for Forge' - //url = 'https://github.com/MinecraftForge/ForgeGradle' + +uploadArchives { + repositories.mavenDeployer { + + dependsOn 'build' + + if (project.hasProperty('forgeMavenPass')) + { + repository(url: "https://files.minecraftforge.net/maven/manage/upload") { + authentication(userName: "forge", password: project.getProperty('forgeMavenPass')) + } + } + else + { + // local repo folder. Might wanna juset use gradle install if you wanans end it to maven-local + repository(url: 'file://localhost/' + project.file('repo').getAbsolutePath()) + } + + + pom { + groupId = project.group + version = project.version + artifactId = project.archivesBaseName + project { + name project.archivesBaseName + packaging 'jar' + description 'Gradle plugin for Forge' + url 'https://github.com/MinecraftForge/ForgeGradle' scm { url 'https://github.com/MinecraftForge/ForgeGradle' @@ -251,35 +267,31 @@ publishing { } issueManagement { - system = 'github' - url = 'https://github.com/MinecraftForge/ForgeGradle/issues' + system 'github' + url 'https://github.com/MinecraftForge/ForgeGradle/issues' + } + + licenses { + license { + name 'Lesser GNU Public License, Version 2.1' + url 'https://www.gnu.org/licenses/lgpl-2.1.html' + distribution 'repo' + } } developers { developer { - id = 'AbrarSyed' - name = 'Abrar Syed' + id 'AbrarSyed' + name 'Abrar Syed' + roles { role 'developer' } } developer { - id = 'LexManos' - name = 'Lex Manos' + id 'LexManos' + name 'Lex Manos' + roles { role 'developer' } } } } - */ - } - } - repositories { - maven { - if (project.hasProperty('forgeMavenPass')) { - credentials { - username 'forge' //project.properties.forgeMavenUser - password project.properties.forgeMavenPass - } - url 'https://files.minecraftforge.net/maven/manage/upload' - } else { - url 'file://' + rootProject.file('repo').getAbsolutePath() - } } } }