mirror of
https://github.com/ProjectSWGCore/launcher.git
synced 2026-01-16 23:04:25 -05:00
90 lines
2.5 KiB
Groovy
90 lines
2.5 KiB
Groovy
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
|
import org.beryx.jlink.data.TargetPlatform
|
|
|
|
plugins {
|
|
id 'application'
|
|
id 'java'
|
|
id 'idea'
|
|
id "edu.sc.seis.macAppBundle" version "2.2.1"
|
|
id "com.github.johnrengelman.shadow" version "4.0.3"
|
|
id "org.openjfx.javafxplugin" version "0.0.5"
|
|
id "org.beryx.jlink" version "2.2.1"
|
|
id "org.javamodularity.moduleplugin" version "1.3.0"
|
|
}
|
|
|
|
// Note: define javaVersion, javaHomeLinux, javaHomeMac, and javaHomeWindows inside your gradle.properties file
|
|
|
|
group = 'com.projectswg.launcher'
|
|
version = '1.1.13'
|
|
mainClassName = "com.projectswg.launcher.core.Launcher"
|
|
sourceCompatibility = 11
|
|
targetCompatibility = 11
|
|
|
|
sourceSets {
|
|
main {}
|
|
utility {}
|
|
}
|
|
|
|
idea {
|
|
module {
|
|
inheritOutputDirs = true
|
|
}
|
|
}
|
|
|
|
jlink {
|
|
options.addAll('--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages')
|
|
targetPlatforms.orNull.put('linux', new TargetPlatform('linux', javaHomeLinux))
|
|
targetPlatforms.orNull.put('mac', new TargetPlatform('mac', javaHomeMac))
|
|
targetPlatforms.orNull.put('windows', new TargetPlatform('windows', javaHomeWindows))
|
|
}
|
|
|
|
shadowJar {
|
|
baseName = "Launcher"
|
|
classifier = null
|
|
version = null
|
|
}
|
|
|
|
macAppBundle {
|
|
appName "ProjectSWG"
|
|
dmgName "ProjectSWG"
|
|
icon "src/main/resources/theme/projectswg/graphics/ProjectSWGLaunchpad.icns"
|
|
mainClassName "${->project.mainClassName}"
|
|
jarTask 'shadowJar'
|
|
jvmVersion javaVersion
|
|
jreHome javaHomeMac
|
|
bundleJRE true
|
|
}
|
|
|
|
javafx {
|
|
modules = ['javafx.controls', 'javafx.fxml']
|
|
}
|
|
|
|
repositories {
|
|
jcenter()
|
|
}
|
|
|
|
dependencies {
|
|
compile project(':pswgcommon')
|
|
compile project(':client-holocore')
|
|
compile project(':forwarder')
|
|
compile 'net.openhft:zero-allocation-hashing:0.8'
|
|
compile group: 'me.joshlarson', name: 'fast-json', version: '2.2.3'
|
|
compile group: 'me.joshlarson', name: 'jlcommon-fx', version: '1.0.3'
|
|
compile 'de.jensd:fontawesomefx-fontawesome:4.7.0-9.1.2'
|
|
|
|
utilityCompile group: 'org.bouncycastle', name: 'bcprov-jdk15on', version: '1.60'
|
|
utilityCompile group: 'me.joshlarson', name: 'fast-json', version: '2.2.3'
|
|
utilityCompile 'net.openhft:zero-allocation-hashing:0.8'
|
|
|
|
testCompile group: 'junit', name: 'junit', version: '4.12'
|
|
}
|
|
|
|
task CreateUpdateListTask(type: ShadowJar) {
|
|
archiveName = 'CreateUpdateList.jar'
|
|
manifest.attributes 'Main-Class': 'com.projectswg.launcher.utility.CreateUpdateList'
|
|
from sourceSets.utility.output
|
|
configurations = [project.configurations.utilityRuntime]
|
|
exclude('META-INF/INDEX.LIST', 'META-INF/*.SF', 'META-INF/*.DSA', 'META-INF/*.RSA')
|
|
}
|
|
|