Launcher/Launcher/build.gradle

119 lines
3.3 KiB
Groovy
Raw Permalink Normal View History

2020-03-01 12:44:14 +03:00
apply plugin: 'org.openjfx.javafxplugin'
apply plugin: 'com.github.johnrengelman.shadow'
String mainClassName = "pro.gravit.launcher.ClientLauncherWrapper"
String mainAgentName = "pro.gravit.launcher.LauncherAgent"
2018-09-17 10:07:32 +03:00
repositories {
2019-04-03 16:27:40 +03:00
maven {
2020-03-01 12:44:14 +03:00
url "https://repo.spring.io/plugins-release/"
2019-04-03 16:27:40 +03:00
}
2018-09-17 10:07:32 +03:00
}
javafx {
version = "12"
2020-04-05 10:27:04 +03:00
modules = ['javafx.controls', 'javafx.fxml']
}
2018-09-17 10:07:32 +03:00
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
2019-01-09 12:42:36 +03:00
configurations {
2019-04-03 16:27:40 +03:00
bundle
pack
2020-03-01 12:44:14 +03:00
api.extendsFrom bundle, pack
2019-01-09 12:42:36 +03:00
}
2018-09-17 10:07:32 +03:00
jar {
2021-09-14 14:05:36 +03:00
archiveClassifier.set('clean')
2019-04-03 16:27:40 +03:00
manifest.attributes("Main-Class": mainClassName,
"Premain-Class": mainAgentName,
"Multi-Release": "true")
2018-09-17 10:07:32 +03:00
}
task sourcesJar(type: Jar) {
from sourceSets.main.allJava
2021-09-14 14:05:36 +03:00
archiveClassifier.set('sources')
}
task javadocJar(type: Jar) {
from javadoc
2021-09-14 14:05:36 +03:00
archiveClassifier.set('javadoc')
}
shadowJar {
2020-03-01 12:44:14 +03:00
duplicatesStrategy = 'EXCLUDE'
2021-09-14 14:05:36 +03:00
archiveClassifier.set(null)
relocate 'org.objectweb.asm', 'pro.gravit.repackage.org.objectweb.asm'
relocate 'io.netty', 'pro.gravit.repackage.io.netty'
2019-05-15 14:11:22 +03:00
configurations = [project.configurations.pack]
exclude 'module-info.class'
}
2018-09-17 10:07:32 +03:00
dependencies {
pack project(':LauncherAPI')
bundle group: 'com.github.oshi', name: 'oshi-core', version: rootProject['verOshiCore']
pack group: 'io.netty', name: 'netty-codec-http', version: rootProject['verNetty']
pack group: 'org.ow2.asm', name: 'asm-tree', version: rootProject['verAsm']
2018-09-17 10:07:32 +03:00
}
task genRuntimeJS(type: Zip) {
2020-03-01 12:44:14 +03:00
duplicatesStrategy = 'EXCLUDE'
2020-03-01 12:51:12 +03:00
archiveFileName = "runtime.zip"
destinationDirectory = file("${buildDir}/tmp")
from "runtime/"
}
2019-01-09 11:29:54 +03:00
task dumpLibs(type: Copy) {
2020-03-01 12:44:14 +03:00
duplicatesStrategy = 'EXCLUDE'
2019-04-03 16:27:40 +03:00
into "$buildDir/libs/libraries"
from configurations.bundle
2018-09-17 10:07:32 +03:00
}
2019-01-09 11:29:54 +03:00
assemble.dependsOn tasks.genRuntimeJS, tasks.dumpLibs, tasks.shadowJar
publishing {
publications {
launcherclientapi(MavenPublication) {
artifactId = 'launcher-client-api'
artifact(jar) {
classifier ""
}
artifact sourcesJar
artifact javadocJar
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'
}
}
2020-09-28 21:32:19 +03:00
developers {
developer {
id = 'gravita'
name = 'Gravita'
email = 'gravita@gravit.pro'
}
developer {
id = 'zaxar163'
name = 'Zaxar163'
email = 'zahar.vcherachny@yandex.ru'
}
}
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/'
}
}
}
}
}
signing {
sign publishing.publications.launcherclientapi
}