[FEATURE] Настроена отправка артефактов в Maven

This commit is contained in:
Gravit 2019-08-11 01:53:12 +07:00
parent 7c0cf17da3
commit d20cf39e89
No known key found for this signature in database
GPG key ID: 061981E1E85D3216
7 changed files with 128 additions and 2 deletions

View file

@ -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/'
}
}
}
}
}

View file

@ -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/'
}
}
}
}
}

View file

@ -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/'
}
}
}
}
}

View file

@ -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/'
}
}
}
}
}

View file

@ -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
}
}
}
}