forked from HanSolo/SpaceFX
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
99 lines (84 loc) · 2.66 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
buildscript {
repositories {
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
maven {
url "https://sandec.bintray.com/repo"
}
}
dependencies {
classpath 'com.google.gradle:osdetector-gradle-plugin:1.6.2'
classpath 'org.javamodularity:moduleplugin:1.6.0'
classpath 'org.beryx:badass-jlink-plugin:2.16.4'
classpath 'com.sandec.jpro:jpro-plugin-gradle:2019.2.4'
}
}
plugins {
id 'java-library'
id 'application'
id 'com.google.osdetector' version '1.6.2'
id 'org.javamodularity.moduleplugin' version '1.6.0'
id 'org.beryx.jlink' version '2.16.4'
}
apply plugin: 'com.sandec.jpro'
group 'eu.hansolo.spacefx'
version '1.0-SNAPSHOT'
ext.platform = osdetector.os == 'osx' ? 'mac' : osdetector.os == 'windows' ? 'win' : osdetector.os
repositories {
mavenCentral()
}
sourceCompatibility = 11
targetCompatibility = 11
dependencies {
implementation "org.openjfx:javafx-base:11:$platform"
implementation "org.openjfx:javafx-graphics:11:$platform"
implementation "org.openjfx:javafx-controls:11:$platform"
implementation "org.openjfx:javafx-media:11:$platform"
implementation "com.sandec.jpro:jpro-webapi:2019.2.3"
implementation "one.jpro:one.jpro.sound:0.1.0"
testCompile 'junit:junit:4.12'
testCompile "de.sandec:JMemoryBuddy:0.2.4"
testCompile("org.testfx:openjfx-monocle:jdk-11+26") {
exclude group: 'org.openjfx'
}
}
test {
jvmArgs = ['-Dglass.platform=Monocle', '-Dmonocle.platform=Headless']
}
mainClassName = "$moduleName/eu.hansolo.spacefx.SpaceFX"
// To run SpaceFX in the browser with jPro use:
task web() {
mainClassName = "eu.hansolo.spacefx.SpaceFX"
dependsOn jproRun
}
jar {
from {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
} {
exclude "META-INF/*.SF"
exclude "META-INF/*.DSA"
exclude "META-INF/*.RSA"
}
manifest {
attributes ('Implementation-Title': 'SpaceFX',
'Class-Path': 'SpaceFX-1.0-SNAPSHOT.jar ',
'Main-Class': 'eu.hansolo.spacefx.Launcher')
}
}
jlink {
options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages']
launcher {
name = 'eu.hansolo.spacefx'
}
}
jpro {
port = 8080
JVMArgs << '-Xmx1000m'
visible = false // Debug mode can also be used to create images via canvas and snapshot
noRenderJobs = true // false to enable snapshot support
jproVersion = "2019.2.4"
openURLOnStartup = false
}