-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathbuild.gradle
236 lines (202 loc) · 7.51 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
buildscript {
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath 'org.junit.platform:junit-platform-gradle-plugin:1.0.0'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
}
}
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'idea'
apply plugin: 'org.junit.platform.gradle.plugin'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'maven-publish'
apply plugin: 'application'
group = 'com.spaceshift'
version = '1.8.0'
compileJava {
options.encoding = "UTF-8"
options.incremental = true
options.compilerArgs.addAll([
"--add-exports",
"javafx.graphics/com.sun.javafx.iio=ALL-UNNAMED"
])
options.compilerArgs.addAll([
"--add-exports",
"javafx.graphics/com.sun.javafx.iio.common=ALL-UNNAMED"
])
options.compilerArgs.addAll([
"--add-exports",
"javafx.graphics/com.sun.javafx.application=ALL-UNNAMED"
])
options.compilerArgs.addAll([
"--add-exports",
"javafx.controls/com.sun.javafx.scene.control.skin.resources=ALL-UNNAMED"
])
}
sourceCompatibility = 1.10
targetCompatibility = 1.10
compileTestJava {
sourceCompatibility = 1.10
targetCompatibility = 1.10
options.compilerArgs += '-parameters'
}
mainClassName = "com.ss.editor.JfxApplication"
ext.applicationMainClass = "com.ss.editor.JfxApplication"
ext.applicationVendor = "[email protected]"
ext.applicationTitle = "jMonkeyBuilder"
ext.jmeVersion = "3.2.1-SNAPSHOT"
ext.jmbExtVersion = "2.3.1"
ext.jme3_xbuf_version = '0.9.1'
ext.junitPlatformVersion = "1.0.0"
ext.junitJupiterVersion = "5.0.0"
ext.log4jVersion = '2.6.2'
ext.bintrayVersion = version
junitPlatform {
filters {
engines {
}
tags {
}
}
logManager 'org.apache.logging.log4j.jul.LogManager'
}
repositories {
jcenter()
mavenCentral()
mavenLocal()
maven {
url 'https://jitpack.io'
}
maven {
url 'https://dl.bintray.com/javasabr/maven'
}
}
publishing {
publications {
JmbArtifact(MavenPublication) {
from components.java
groupId 'com.spaceshift'
artifactId 'jmonkeybuilder'
version bintrayVersion
artifact sourcesJar
artifact javadocJar
}
}
}
bintray {
user = System.getProperty('bintrayUser')
key = System.getProperty('bintrayKey')
publications = ['JmbArtifact']
pkg {
repo = 'maven'
name = 'com.spaceshift.jmonkeybuilder'
licenses = ['Apache-2.0']
websiteUrl = 'https://github.com/JavaSaBr/jmonkeybuilder'
vcsUrl = 'https://github.com/JavaSaBr/jmonkeybuilder.git'
issueTrackerUrl = 'https://github.com/JavaSaBr/jmonkeybuilder/issues'
githubRepo = 'JavaSaBr/jmonkeybuilder'
githubReleaseNotesFile = 'README.md'
version {
name = bintrayVersion
desc = bintrayVersion
released = new Date()
}
}
}
javadoc {
failOnError = false
}
dependencies {
// base
compile group: 'org.fxmisc.richtext', name: 'richtextfx', version: '0.9.0'
compile 'org.controlsfx:controlsfx:9.0.0'
compile 'com.spaceshift:rlib.fx:5.0.2'
compile 'com.spaceshift:rlib.common:7.1.2'
compile ('com.jme3:jfx:2.0.0') {
exclude group: 'org.jmonkeyengine'
}
// https://mvnrepository.com/artifact/org.apache.commons/commons-lang3
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.6'
// extend image support
// https://mvnrepository.com/artifact/com.twelvemonkeys.imageio/imageio-batik
compile group: 'com.twelvemonkeys.imageio', name: 'imageio-batik', version: '3.3.2'
// https://mvnrepository.com/artifact/com.twelvemonkeys.imageio/imageio-hdr
compile group: 'com.twelvemonkeys.imageio', name: 'imageio-hdr', version: '3.3.2'
// https://mvnrepository.com/artifact/com.twelvemonkeys.imageio/imageio-tiff
compile group: 'com.twelvemonkeys.imageio', name: 'imageio-tiff', version: '3.3.2'
// SVG support
// https://mvnrepository.com/artifact/de.codecentric.centerdevice/javafxsvg
compile group: 'de.codecentric.centerdevice', name: 'javafxsvg', version: '1.2.1'
// jME
compile "com.github.JavaSaBr.jmonkeyengine:jme3-core:$jmeVersion"
compile "com.github.JavaSaBr.jmonkeyengine:jme3-effects:$jmeVersion"
compile "com.github.JavaSaBr.jmonkeyengine:jme3-bullet:$jmeVersion"
compile "com.github.JavaSaBr.jmonkeyengine:jme3-bullet-native:$jmeVersion"
compile "com.github.JavaSaBr.jmonkeyengine:jme3-lwjgl3:$jmeVersion"
compile "com.github.JavaSaBr.jmonkeyengine:jme3-desktop:$jmeVersion"
compile "com.github.JavaSaBr.jmonkeyengine:jme3-terrain:$jmeVersion"
compile "com.github.JavaSaBr.jmonkeyengine:jme3-plugins:$jmeVersion"
compile "com.github.JavaSaBr.jmonkeyengine:jme3-blender:$jmeVersion"
compile "com.github.JavaSaBr.jmonkeyengine:jme3-jogg:$jmeVersion"
compile ("com.github.JavaSaBr.jmonkeyengine:jme3-testdata:$jmeVersion") {
exclude group: 'lessvoid'
}
// http support
// https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient
compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.3'
// extensions
compile ("com.spaceshift:jmonkeybuilder-extension:$jmbExtVersion") {
exclude group: 'org.jmonkeyengine'
}
compile ("org.xbuf.jme3_xbuf:jme3_xbuf_loader:${jme3_xbuf_version}") {
exclude group: 'org.jmonkeyengine'
}
// https://mvnrepository.com/artifact/org.codehaus.groovy/groovy-all
compile group: 'org.codehaus.groovy', name: 'groovy-all', version: '2.4.13'
// TESTS
testRuntime "com.github.JavaSaBr.jmonkeyengine:jme3-lwjgl3:$jmeVersion"
testCompile ("com.spaceshift:jmonkeybuilder-extension:$jmbExtVersion") {
exclude group: 'org.jmonkeyengine'
exclude group: 'com.github.JavaSaB.jmonkeyengine'
}
testCompile "org.junit.platform:junit-platform-commons:$junitPlatformVersion"
testRuntime "org.junit.platform:junit-platform-engine:$junitPlatformVersion"
testCompile "org.junit.jupiter:junit-jupiter-api:$junitJupiterVersion"
testRuntime "org.junit.jupiter:junit-jupiter-engine:$junitJupiterVersion"
testRuntime "org.apache.logging.log4j:log4j-core:$log4jVersion"
testRuntime "org.apache.logging.log4j:log4j-jul:$log4jVersion"
// Only needed to run tests in an (IntelliJ) IDE(A) that bundles an older version
testCompile "org.junit.platform:junit-platform-launcher:$junitPlatformVersion"
}
ant.importBuild('build-native.xml')
ant.basedir = new File(buildDir.getParentFile(), "native-build")
ant.properties.javaSourceVersion = sourceCompatibility
ant.properties.javaTargetVersion = targetCompatibility
ant.properties.applicationJarName = name + ".jar"
ant.properties.applicationMainClass = ext.applicationMainClass
ant.properties.applicationVendor = ext.applicationVendor
ant.properties.applicationTitle = ext.applicationTitle
ant.properties.applicationVersion = version
task prepareDependencies(type: Copy) {
doFirst {
println("delete " + "$buildDir/dependencies")
GFileUtils.deleteDirectory(new File("$buildDir/dependencies"))
}
into "$buildDir/dependencies"
from configurations.runtime
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
task wrapper(type: Wrapper) {
gradleVersion = '4.7'
}