diff --git a/LaunchServer/build.gradle b/LaunchServer/build.gradle index 1b3ab817..c1b14d45 100644 --- a/LaunchServer/build.gradle +++ b/LaunchServer/build.gradle @@ -41,7 +41,7 @@ } -task clean(type: Jar, dependsOn: jar) { +task cleanjar(type: Jar, dependsOn: jar) { classifier = 'clean' manifest.attributes("Main-Class": mainClassName, "Premain-Class": mainAgentName, @@ -159,4 +159,31 @@ task dumpClientLibs(type: Copy) { from parent.childProjects.Launcher.tasks.dumpLibs.destinationDir } -build.dependsOn tasks.dumpLibs, tasks.dumpCompileOnlyLibs, tasks.dumpClientLibs, tasks.bundle, tasks.clean +build.dependsOn tasks.dumpLibs, tasks.dumpCompileOnlyLibs, tasks.dumpClientLibs, tasks.bundle, tasks.cleanjar + + + +publishing { + publications { + launchserverapi(MavenPublication) { + artifactId = 'launchserver-api' + artifact cleanjar + pom { + name = 'GravitLauncher LaunchServer API' + description = 'GravitLauncher LaunchServer Module API' + url = 'https://launcher.gravit.pro' + licenses { + license { + name = 'GNU General Public License, Version 3.0' + url = 'https://www.gnu.org/licenses/gpl-3.0.html' + } + } + scm { + connection = 'scm:git:https://github.com/GravitLauncher/Launcher.git' + developerConnection = 'scm:git:ssh://git@github.com:GravitLauncher/Launcher.git' + url = 'https://launcher.gravit.pro/' + } + } + } + } +} diff --git a/Launcher/build.gradle b/Launcher/build.gradle index 1cd76ea4..73125e38 100644 --- a/Launcher/build.gradle +++ b/Launcher/build.gradle @@ -58,3 +58,28 @@ task dumpLibs(type: Copy) { build.dependsOn tasks.genRuntimeJS, tasks.dumpLibs, tasks.shadowJar + +publishing { + publications { + launcherclientapi(MavenPublication) { + artifactId = 'launcher-client-api' + artifact jar + pom { + name = 'GravitLauncher Client API' + description = 'GravitLauncher Client Module API' + url = 'https://launcher.gravit.pro' + licenses { + license { + name = 'GNU General Public License, Version 3.0' + url = 'https://www.gnu.org/licenses/gpl-3.0.html' + } + } + scm { + connection = 'scm:git:https://github.com/GravitLauncher/Launcher.git' + developerConnection = 'scm:git:ssh://git@github.com:GravitLauncher/Launcher.git' + url = 'https://launcher.gravit.pro/' + } + } + } + } +} diff --git a/LauncherAPI/build.gradle b/LauncherAPI/build.gradle index 3ba17392..f0a91a2a 100644 --- a/LauncherAPI/build.gradle +++ b/LauncherAPI/build.gradle @@ -6,3 +6,32 @@ compile project(':LauncherCore') compileOnly 'org.apache.httpcomponents:httpclient:4.5.7' compileOnly 'io.netty:netty-codec-http:4.1.36.Final' } + +jar { + classifier = 'clean' +} + +publishing { + publications { + launcherwsapi(MavenPublication) { + artifactId = 'launcher-ws-api' + artifact jar + pom { + name = 'GravitLauncher WebSocket API' + description = 'GravitLauncher WebSocket Module API' + url = 'https://launcher.gravit.pro' + licenses { + license { + name = 'GNU General Public License, Version 3.0' + url = 'https://www.gnu.org/licenses/gpl-3.0.html' + } + } + scm { + connection = 'scm:git:https://github.com/GravitLauncher/Launcher.git' + developerConnection = 'scm:git:ssh://git@github.com:GravitLauncher/Launcher.git' + url = 'https://launcher.gravit.pro/' + } + } + } + } +} diff --git a/Launcher/src/main/java/cpw/mods/fml/SafeExitJVMLegacy.java b/LauncherAuthlib/src/main/java/cpw/mods/fml/SafeExitJVMLegacy.java similarity index 100% rename from Launcher/src/main/java/cpw/mods/fml/SafeExitJVMLegacy.java rename to LauncherAuthlib/src/main/java/cpw/mods/fml/SafeExitJVMLegacy.java diff --git a/Launcher/src/main/java/net/minecraftforge/fml/SafeExitJVM.java b/LauncherAuthlib/src/main/java/net/minecraftforge/fml/SafeExitJVM.java similarity index 100% rename from Launcher/src/main/java/net/minecraftforge/fml/SafeExitJVM.java rename to LauncherAuthlib/src/main/java/net/minecraftforge/fml/SafeExitJVM.java diff --git a/LauncherCore/build.gradle b/LauncherCore/build.gradle index d143c15a..63c682e6 100644 --- a/LauncherCore/build.gradle +++ b/LauncherCore/build.gradle @@ -8,3 +8,32 @@ compileOnly 'org.jline:jline-terminal:3.11.0' compile 'com.google.code.gson:gson:2.8.5' } + +jar { + classifier = 'clean' +} + +publishing { + publications { + launchercore(MavenPublication) { + artifactId = 'launcher-core' + artifact jar + pom { + name = 'GravitLauncher Core Utils' + description = 'GravitLauncher Core Utils' + url = 'https://launcher.gravit.pro' + licenses { + license { + name = 'GNU General Public License, Version 3.0' + url = 'https://www.gnu.org/licenses/gpl-3.0.html' + } + } + scm { + connection = 'scm:git:https://github.com/GravitLauncher/Launcher.git' + developerConnection = 'scm:git:ssh://git@github.com:GravitLauncher/Launcher.git' + url = 'https://launcher.gravit.pro/' + } + } + } + } +} diff --git a/build.gradle b/build.gradle index 86d688ba..e3bfd666 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,9 @@ plugins { id 'com.github.johnrengelman.shadow' version '5.0.0' apply false + id 'maven-publish' } +group = 'pro.gravit.launcher' +version = '5.0.5-SNAPSHOT' configure(subprojects.findAll { it.name != 'modules' }) { apply plugin: 'idea' @@ -43,3 +46,16 @@ } defaultTasks 'build' + +publishing { + repositories { + maven { + // change URLs to point to your repos, e.g. http://my.org/repo + url = version.endsWith('SNAPSHOT') ? mavenSnapshotRepository : mavenReleaseRepository + credentials { + username mavenUsername + password mavenPassword + } + } + } +}