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"
|
|
|
|
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 {
|
2019-04-12 23:22:24 +03:00
|
|
|
classifier = 'clean'
|
2019-04-03 16:27:40 +03:00
|
|
|
manifest.attributes("Main-Class": mainClassName,
|
|
|
|
"Premain-Class": mainAgentName,
|
|
|
|
"Can-Redefine-Classes": "true",
|
|
|
|
"Can-Retransform-Classes": "true",
|
2019-06-02 04:33:31 +03:00
|
|
|
"Can-Set-Native-Method-Prefix": "true",
|
|
|
|
"Multi-Release-Jar": "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
|
|
|
|
archiveClassifier = 'sources'
|
|
|
|
}
|
|
|
|
|
|
|
|
task javadocJar(type: Jar) {
|
|
|
|
from javadoc
|
|
|
|
archiveClassifier = 'javadoc'
|
|
|
|
}
|
|
|
|
|
2019-04-12 23:22:24 +03:00
|
|
|
shadowJar {
|
2020-03-01 12:44:14 +03:00
|
|
|
duplicatesStrategy = 'EXCLUDE'
|
2019-05-15 14:11:22 +03:00
|
|
|
classifier = 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')
|
2019-05-07 20:53:20 +03:00
|
|
|
bundle 'com.github.oshi:oshi-core:3.13.0'
|
2019-11-24 18:32:39 +03:00
|
|
|
pack 'io.netty:netty-codec-http:4.1.43.Final'
|
2019-04-12 23:22:24 +03:00
|
|
|
pack 'org.ow2.asm:asm-tree:7.1'
|
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'
|
|
|
|
}
|
|
|
|
}
|
2019-08-22 14:30:22 +03:00
|
|
|
developers {
|
|
|
|
developer {
|
|
|
|
id = 'gravit'
|
|
|
|
name = 'Gravit'
|
|
|
|
email = 'gravit.min@ya.ru'
|
|
|
|
}
|
|
|
|
developer {
|
|
|
|
id = 'zaxar163'
|
|
|
|
name = 'Zaxar163'
|
|
|
|
email = 'zahar.vcherachny@yandex.ru'
|
|
|
|
}
|
2019-08-22 10:36:50 +03:00
|
|
|
}
|
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
|
|
|
}
|