-
Notifications
You must be signed in to change notification settings - Fork 23
/
build.gradle
270 lines (218 loc) · 7.8 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
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
/*
* This file was generated by the Gradle 'init' task.
*
* This generated file contains a sample Java project to get you started.
* For more details take a look at the Java Quickstart chapter in the Gradle
* User Manual available at https://docs.gradle.org/5.2.1/userguide/tutorial_java_projects.html
*/
plugins {
// Apply the java plugin to add support for Java
id 'java'
// Apply the application plugin to add support for building an application
id 'application'
//id 'org.openjfx.javafxplugin' version '0.0.9'
}
version '3.0.2'
sourceSets {
main {
}
}
/*
javafx {
version = '12'
modules = [ 'javafx.swing', 'javafx.controls', 'javafx.media', 'javafx.web' ]
configuration = 'compileOnly'
}
*/
repositories {
// Use jcenter for resolving your dependencies.
// You can declare any Maven/Ivy/file repository here.
//jcenter()
mavenCentral()
// Needed for the EPUB lib artifact.
/*
maven {
url 'http://maven.openkm.com/'
}
*/
maven {
//id 'psiegman-repo'
url 'https://github.com/psiegman/mvn-repo/raw/master/releases'
}
maven {
url 'https://oss.sonatype.org/content/repositories/snapshots/'
}
}
dependencies {
implementation fileTree('3rd-party-jars') {
//include 'jdom-1.0.jar'
//include 'jgoodies-forms-1.8.0.jar'
//include 'JoSQL-2.2.jar'
include 'josql-2.3.jar'
//include 'gentlyWEB-utils-1.1.jar'
//include 'gentlyWEB-xml-1.1.jar'
//include 'gentlyWEB-properties-1.2.jar'
//include 'gentlyWEB-logging-1.0.jar'
include 'gentlyweb-properties-3.jar'
include 'javadiff.jar'
// Spellchecker
include 'suggester-1.1.2.jar'
// TODO Investigate using maven?
include 'jazzy-core.jar'
include 'suggester-1.1.2.jar'
include 'GWordCram-0.1.jar'
// TODO Remove when no longer using Swing/AWT
include 'jcalendar-1.4.jar'
include 'h2mig_pagestore_addon.jar'
}
//compile 'org.jsoup:jsoup:1.11.3'
implementation 'org.jsoup:jsoup:1.11.3'
// Use JUnit test framework
testImplementation 'junit:junit:4.12'
// XML Parser
implementation 'pull-parser:pull-parser:2.1.10'
// Docx4J
implementation 'org.docx4j:docx4j-JAXB-ReferenceImpl:11.1.8'
// Bouncy castle crypto
implementation 'org.bouncycastle:bcprov-jdk15on:1.62'
implementation 'org.bouncycastle:bcpg-jdk15on:1.62'
// TODO This is probably not needed now since we can scale images via JavaFX.
implementation 'org.imgscalr:imgscalr-lib:4.2'
// DBCP implementation (Apache)
implementation 'org.apache.commons:commons-dbcp2:2.6.0'
// Apache Commons IO
implementation 'commons-io:commons-io:2.11.0'
// H2 DB
implementation 'com.h2database:h2:1.3.175'
// EPUB lib
implementation 'nl.siegmann.epublib:epublib-core:3.1'
// POI hwpf (.doc file reading)
//implementation 'org.apache.poi:poi-scratchpad:4.1.0'
// JFreeChart
implementation 'org.jfree:jfreechart:1.5.0'
// JFreeChart-FX
implementation 'org.jfree:jfreechart-fx:1.0.1'
// Smack
implementation 'org.igniterealtime.smack:smack-core:4.4.4'
implementation 'org.igniterealtime.smack:smack-extensions:4.4.4'
implementation 'org.igniterealtime.smack:smack-tcp:4.4.4'
implementation 'org.igniterealtime.smack:smack-im:4.4.4'
implementation 'org.igniterealtime.smack:smack-java8:4.4.4'
// RichtextFX
implementation 'org.fxmisc.richtext:richtextfx:0.11.0'
//implementation 'org.fxmisc.richtext:richtextfx:0.10.9'
//implementation 'org.fxmisc.richtext:richtextfx:1.0.0-SNAPSHOT'
// This is temporary for testing changes to a local version of richtextfx. Ignore.
// TEMP ADD RICHTEXTFX JARS AND DEPS
/*
implementation fileTree('d:/reference/java/afester-richtextfx/RichTextFX/richtextfx/build/libs/') {
//include 'richtextfx-1.0.0-SNAPSHOT.jar'
include 'richtextfx-0.10.8-rc1.jar'
include 'flowless-0.6.7.jar'
include 'reactfx-2.0-M5.jar'
include 'undofx-2.1.1.jar'
include 'wellbehavedfx-0.3.3.jar'
}
*/
// Flying Saucer (can be removed when no longer using Swing)
implementation 'org.xhtmlrenderer:flying-saucer-core:9.1.18'
// JGoodies (remove when no longer using Swing)
implementation 'com.jgoodies:jgoodies-looks:2.7.0'
implementation 'com.jgoodies:jgoodies-forms:1.9.0'
// AnimateFX (test)
//implementation 'io.github.typhon0:AnimateFX:1.2.1'
// SVG support
//implementation 'de.codecentric.centerdevice:javafxsvg:1.3.0'
// PDF support
//implementation 'org.apache.pdfbox:pdfbox:2.0.20'
// DOM4J
implementation 'org.dom4j:dom4j:2.1.3'
// AWS s3 - testing
//implementation 'software.amazon.awssdk:s3:2.19.24'
// Patreon - testing
//implementation 'com.patreon:patreon:0.4.2'
}
compileJava {
options.incremental = true
options.compilerArgs =
[
'--add-modules',
'java.base,javafx.swing,javafx.controls,javafx.media,javafx.web,java.instrument,jdk.attach',
'--add-exports',
'javafx.graphics/com.sun.javafx.iio=ALL-UNNAMED',
'--add-exports',
'javafx.graphics/com.sun.javafx.iio.common=ALL-UNNAMED',
'--add-exports',
'javafx.web/com.sun.javafx.webkit=ALL-UNNAMED',
'--add-exports',
'javafx.web/com.sun.webkit=ALL-UNNAMED',
'--module-path',
// This is a property that should be defined (usually) in gradle.prpoerties, i.e. module_path=/usr/share/lib/javafx-sdk-12/lib
module_path,
'-Xmaxerrs',
'1000'
]
}
jar {
doFirst {
file("${sourceSets.main.output.resourcesDir}/data/version.txt").text = "$version"
}
}
javadoc {
doFirst {
options.addStringOption ('-module-path', module_path)
options.addStringOption ('-add-modules', 'javafx.controls,javafx.swing,javafx.media,javafx.web,java.instrument,jdk.attach')
}
}
application {
applicationDefaultJvmArgs =
[
'-Djava.locale.providers=COMPAT',
'--module-path',
// This is a property that should be defined (usually) in gradle.prpoerties, i.e. module_path=/usr/share/lib/javafx-sdk-12/lib
module_path,
'--add-modules=javafx.controls,javafx.swing,javafx.media,javafx.web,java.instrument,jdk.attach',
'--add-exports',
'javafx.graphics/com.sun.javafx.iio=ALL-UNNAMED',
'--add-exports',
'javafx.graphics/com.sun.javafx.iio.common=ALL-UNNAMED',
'--add-exports',
'javafx.graphics/com.sun.javafx.scene.text=ALL-UNNAMED',
'--add-exports',
'javafx.graphics/com.sun.javafx.geom=ALL-UNNAMED',
'--add-opens',
'javafx.graphics/javafx.scene.text=ALL-UNNAMED',
'--add-opens',
'javafx.graphics/com.sun.javafx.text=ALL-UNNAMED',
'--add-exports',
'javafx.graphics/com.sun.javafx.geom=ALL-UNNAMED',
'--add-exports',
'javafx.graphics/com.sun.javafx.scene.text=ALL-UNNAMED',
'--add-exports',
'javafx.graphics/com.sun.javafx.tk=ALL-UNNAMED',
'--add-exports',
'javafx.web/com.sun.javafx.webkit=ALL-UNNAMED',
'--add-exports',
'javafx.web/com.sun.webkit=ALL-UNNAMED'
]
// Define the main class for the application
mainClassName 'com.quollwriter.Startup'
}
run {
dependsOn jar
}
task copyToLib(type: Copy) {
delete "$buildDir/libs"
into "$buildDir/libs"
from configurations.runtimeClasspath
}
configurations.all {
resolutionStrategy {
//failOnVersionConflict()
// This is to try and fix some of the dependency conflicts between siegmann and dom4j.
force 'commons-codec:commons-codec:1.15',
'commons-io:commons-io:2.11.0',
'org.slf4j:slf4j-api:1.8.0-beta4',
'pull-parser:pull-parser:2.1.10'
}
}