2020-03-01 12:44:14 +03:00
|
|
|
apply plugin: 'org.openjfx.javafxplugin'
|
2019-04-12 23:22:24 +03:00
|
|
|
apply plugin: 'com.github.johnrengelman.shadow'
|
|
|
|
|
2019-06-02 05:03:08 +03:00
|
|
|
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
|
|
|
}
|
2019-11-24 20:33:18 +03:00
|
|
|
javafx {
|
|
|
|
version = "12"
|
2020-04-05 10:27:04 +03:00
|
|
|
modules = ['javafx.controls', 'javafx.fxml']
|
2019-11-24 20:33:18 +03:00
|
|
|
}
|
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,
|
2021-01-28 20:13:21 +03:00
|
|
|
"Multi-Release": "true")
|
2018-09-17 10:07:32 +03:00
|
|
|
}
|
|
|
|
|
2019-08-28 11:55:58 +03:00
|
|
|
task sourcesJar(type: Jar) {
|
|
|
|
from sourceSets.main.allJava
|
2021-09-14 14:05:36 +03:00
|
|
|
archiveClassifier.set('sources')
|
2019-08-28 11:55:58 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
task javadocJar(type: Jar) {
|
|
|
|
from javadoc
|
2021-09-14 14:05:36 +03:00
|
|
|
archiveClassifier.set('javadoc')
|
2019-08-28 11:55:58 +03:00
|
|
|
}
|
|
|
|
|
2019-04-12 23:22:24 +03:00
|
|
|
shadowJar {
|
2020-03-01 12:44:14 +03:00
|
|
|
duplicatesStrategy = 'EXCLUDE'
|
2021-09-14 14:05:36 +03:00
|
|
|
archiveClassifier.set(null)
|
2019-06-02 05:08:35 +03:00
|
|
|
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'
|
2019-04-12 23:22:24 +03:00
|
|
|
}
|
|
|
|
|
2018-09-17 10:07:32 +03:00
|
|
|
dependencies {
|
2019-12-08 20:56:16 +03:00
|
|
|
pack project(':LauncherAPI')
|
2020-03-01 14:34:31 +03:00
|
|
|
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
|
|
|
}
|
|
|
|
|
2020-02-25 09:38:11 +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")
|
2020-02-25 09:38:11 +03:00
|
|
|
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
|
|
|
|
2020-02-22 07:46:01 +03:00
|
|
|
assemble.dependsOn tasks.genRuntimeJS, tasks.dumpLibs, tasks.shadowJar
|
2019-08-10 21:53:12 +03:00
|
|
|
|
2019-08-13 14:49:41 +03:00
|
|
|
publishing {
|
|
|
|
publications {
|
|
|
|
launcherclientapi(MavenPublication) {
|
2019-08-10 21:53:12 +03:00
|
|
|
artifactId = 'launcher-client-api'
|
2019-08-22 10:36:50 +03:00
|
|
|
artifact(jar) {
|
|
|
|
classifier ""
|
|
|
|
}
|
2019-08-28 11:55:58 +03:00
|
|
|
artifact sourcesJar
|
|
|
|
artifact javadocJar
|
2019-08-13 14:49:41 +03:00
|
|
|
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'
|
|
|
|
}
|
|
|
|
}
|
2019-08-13 14:49:41 +03:00
|
|
|
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/'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-08-10 21:53:12 +03:00
|
|
|
}
|
2019-08-13 14:49:41 +03:00
|
|
|
|
|
|
|
|
|
|
|
signing {
|
2019-08-12 23:20:28 +03:00
|
|
|
sign publishing.publications.launcherclientapi
|
2019-08-13 14:49:41 +03:00
|
|
|
}
|