-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathbuild.gradle
More file actions
123 lines (99 loc) · 3.1 KB
/
build.gradle
File metadata and controls
123 lines (99 loc) · 3.1 KB
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
group 'com.jme3'
version '1.0-SNAPSHOT'
import org.apache.tools.ant.taskdefs.condition.Os
apply plugin: 'java'
apply plugin: 'application'
apply plugin: "org.mini2Dx.parcl"
mainClassName='com.jme3.bootmonkey.ui.MainWindow'
sourceCompatibility = 1.8
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
compile 'org.eclipse.jgit:org.eclipse.jgit:4.5.0.201609210915-r'
compile 'commons-io:commons-io:2.5'
compile 'org.apache.commons:commons-lang3:3.4'
compile 'org.yaml:snakeyaml:1.17'
compile "com.github.insubstantial:substance:[7.3,)"
testCompile group: 'junit', name: 'junit', version: '4.11'
}
buildscript {
repositories {
mavenCentral()
maven { url "https://mini2dx.org/maven/content/repositories/thirdparty" }
maven { url "https://mini2dx.org/maven/content/repositories/releases" }
}
dependencies {
//classpath 'com.github.mini2Dx:parcl:v1.0.10'
classpath 'org.mini2Dx:parcl:1.0.7'
// classpath 'com.github.spullara.mustache.java:compiler:0.9.4'
}
}
task runProto(type: JavaExec) {
classpath sourceSets.main.runtimeClasspath
main = "com.jme3.bootmonkey.Proto"
}
// Create a custom server start script in the distribution
task makeScript(type: CreateStartScripts) {
mainClassName = "com.jme3.bootmonkey.ui.MainWindow"
applicationName = "bootmonkey"
outputDir = new File(project.buildDir, 'scripts')
classpath = jar.outputs.files + project.configurations.runtime
// defaultJvmOpts = ['-Dlog4j.configurationFile=server-log4j2.xml']
}
// I think this is ultimately clearer than the above
distributions {
main {
contents {
from(makeScript) {
into "bin"
}
}
}
}
parcl {
exe {
exeName = "BootMonkey"
}
app {
appName = "BootMonkey"
icon = "src/main/resources/icons/icon.icns"
applicationCategory = "public.app-category.jme3-tool-suite"
displayName = 'BootMonkey'
identifier = 'com.jme3.bootmonkey'
copyright = 'Copyright 2016 jMonkeyEngine'
}
linux {
binName = "bootmonkey"
}
}
task createBundle(type: Zip, dependsOn:bundleNative) {
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
from 'build/windows'
archiveName "bootmonkey-$version-windows-app.zip"
} else if (Os.isFamily(Os.FAMILY_MAC)){
from 'build/mac'
archiveName "bootmonkey-$version-osx-app.zip"
} else {
from 'build/linux'
archiveName "bootmonkey-$version-linux-app.zip"
}
include '**/*'
}
//create a single Jar with all dependencies
task fatJar(type: Jar) {
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
exclude 'META-INF/*.RSA', 'META-INF/*.SF','META-INF/*.DSA'
baseName = project.name + '-exec'
manifest {
attributes 'Implementation-Title': 'Bootmonkey executable jar',
'Implementation-Version': version,
'Main-Class': "$mainClassName"
}
with jar
}
// Either way we end up with dupes if we don't do this
distZip {
duplicatesStrategy = 'exclude'
}