From 9c103c4159cc90a1a4f5a54af5c660878b7c0639 Mon Sep 17 00:00:00 2001 From: LexManos Date: Fri, 15 Feb 2019 09:19:20 -0800 Subject: [PATCH] Migrate to maven-publish because gradle screwed up the old task. --- build.gradle | 76 ++++++++++++++++++++++------------------------------ 1 file changed, 32 insertions(+), 44 deletions(-) diff --git a/build.gradle b/build.gradle index 677f364b2..e08574c60 100644 --- a/build.gradle +++ b/build.gradle @@ -14,6 +14,7 @@ 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' @@ -231,34 +232,17 @@ pluginBundle { } } } - -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' +publishing { + publications { + mavenJava(MavenPublication) { + artifact jar + + /* + pom { + //name = project.archivesBaseName + packaging = 'jar' + description = 'Gradle plugin for Forge' + //url = 'https://github.com/MinecraftForge/ForgeGradle' scm { url 'https://github.com/MinecraftForge/ForgeGradle' @@ -267,31 +251,35 @@ uploadArchives { } issueManagement { - 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' - } + system = 'github' + url = 'https://github.com/MinecraftForge/ForgeGradle/issues' } developers { developer { - id 'AbrarSyed' - name 'Abrar Syed' - roles { role 'developer' } + id = 'AbrarSyed' + name = 'Abrar Syed' } developer { - id 'LexManos' - name 'Lex Manos' - roles { role 'developer' } + id = 'LexManos' + name = 'Lex Manos' } } } + */ + } + } + 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() + } } } }