2020-03-22 08:12:07 +00:00
|
|
|
plugins {
|
|
|
|
id 'application'
|
|
|
|
id 'org.openjfx.javafxplugin' version '0.0.8'
|
2020-04-01 11:26:40 +00:00
|
|
|
id 'org.kordamp.gradle.jdeps' version '0.9.0'
|
|
|
|
id 'org.beryx.jlink' version '2.17.4'
|
2020-03-22 08:12:07 +00:00
|
|
|
}
|
|
|
|
|
2020-08-24 12:52:05 +00:00
|
|
|
def sparrowVersion = '0.9.1'
|
|
|
|
|
|
|
|
group "com.sparrowwallet"
|
|
|
|
version "${sparrowVersion}"
|
2020-03-22 08:12:07 +00:00
|
|
|
|
2020-04-01 11:26:40 +00:00
|
|
|
sourceCompatibility = 1.9
|
2020-03-22 08:12:07 +00:00
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
2020-08-04 10:47:29 +00:00
|
|
|
maven { url 'https://oss.sonatype.org/content/groups/public' }
|
|
|
|
maven { url 'https://mymavenrepo.com/repo/29EACwkkGcoOKnbx3bxN/' }
|
2020-03-22 08:12:07 +00:00
|
|
|
}
|
|
|
|
|
2020-08-24 12:52:05 +00:00
|
|
|
tasks.withType(AbstractArchiveTask) {
|
|
|
|
preserveFileTimestamps = false
|
|
|
|
reproducibleFileOrder = true
|
|
|
|
}
|
|
|
|
|
2020-03-22 08:12:07 +00:00
|
|
|
javafx {
|
|
|
|
version = "14"
|
2020-04-29 10:03:44 +00:00
|
|
|
modules = [ 'javafx.controls', 'javafx.fxml', 'javafx.swing', 'javafx.graphics' ]
|
2020-03-22 08:12:07 +00:00
|
|
|
}
|
|
|
|
|
2020-04-01 11:26:40 +00:00
|
|
|
java {
|
|
|
|
disableAutoTargetJvm()
|
|
|
|
}
|
|
|
|
|
2020-03-22 08:12:07 +00:00
|
|
|
dependencies {
|
2020-04-01 11:26:40 +00:00
|
|
|
implementation(project(':drongo')) {
|
|
|
|
exclude group: 'org.hamcrest'
|
|
|
|
exclude group: 'junit'
|
|
|
|
}
|
2020-04-10 12:30:11 +00:00
|
|
|
implementation('com.google.guava:guava:28.2-jre')
|
2020-04-19 17:07:46 +00:00
|
|
|
implementation('com.google.code.gson:gson:2.8.6')
|
2020-04-01 11:26:40 +00:00
|
|
|
implementation('org.fxmisc.richtext:richtextfx:0.10.4')
|
|
|
|
implementation('no.tornado:tornadofx-controls:1.0.4')
|
2020-05-26 15:55:35 +00:00
|
|
|
implementation('com.google.zxing:javase:3.4.0')
|
2020-05-30 09:22:51 +00:00
|
|
|
implementation('com.github.arteam:simple-json-rpc-client:1.0')
|
2020-06-09 09:21:34 +00:00
|
|
|
implementation('com.github.arteam:simple-json-rpc-server:1.0') {
|
|
|
|
exclude group: 'org.slf4j'
|
|
|
|
}
|
2020-08-02 15:54:51 +00:00
|
|
|
implementation('co.nstant.in:cbor:0.9')
|
2020-08-04 10:47:29 +00:00
|
|
|
implementation('com.nativelibs4java:bridj:0.7-20200803')
|
|
|
|
implementation('com.github.sarxos:webcam-capture:0.3.13-SNAPSHOT') {
|
|
|
|
exclude group: 'com.nativelibs4java', module: 'bridj'
|
|
|
|
}
|
2020-06-05 15:25:55 +00:00
|
|
|
implementation('de.codecentric.centerdevice:centerdevice-nsmenufx:2.1.7')
|
2020-08-17 14:48:31 +00:00
|
|
|
implementation('org.controlsfx:controlsfx:11.0.2' ) {
|
2020-04-01 11:26:40 +00:00
|
|
|
exclude group: 'org.openjfx', module: 'javafx-base'
|
|
|
|
exclude group: 'org.openjfx', module: 'javafx-graphics'
|
|
|
|
exclude group: 'org.openjfx', module: 'javafx-controls'
|
|
|
|
exclude group: 'org.openjfx', module: 'javafx-swing'
|
|
|
|
exclude group: 'org.openjfx', module: 'javafx-fxml'
|
|
|
|
exclude group: 'org.openjfx', module: 'javafx-web'
|
|
|
|
exclude group: 'org.openjfx', module: 'javafx-media'
|
|
|
|
}
|
|
|
|
testImplementation('junit:junit:4.12')
|
2020-03-22 08:12:07 +00:00
|
|
|
}
|
|
|
|
|
2020-04-02 11:21:15 +00:00
|
|
|
mainClassName = 'com.sparrowwallet.sparrow/com.sparrowwallet.sparrow.MainApp'
|
2020-04-01 11:26:40 +00:00
|
|
|
|
2020-06-05 11:29:43 +00:00
|
|
|
compileJava {
|
|
|
|
options.with {
|
|
|
|
fork = true
|
|
|
|
compilerArgs.addAll(["--add-exports", "org.controlsfx.controls/impl.org.controlsfx.skin=com.sparrowwallet.sparrow"])
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-04-02 10:54:41 +00:00
|
|
|
run {
|
2020-06-05 14:05:13 +00:00
|
|
|
applicationDefaultJvmArgs = ["-Xdock:name=Sparrow", "-Xdock:icon=/Users/scy/git/sparrow/src/main/resources/sparrow.png",
|
|
|
|
"--add-opens=javafx.graphics/com.sun.javafx.css=org.controlsfx.controls",
|
|
|
|
"--add-opens=javafx.graphics/javafx.scene=org.controlsfx.controls",
|
|
|
|
"--add-opens=javafx.controls/com.sun.javafx.scene.control.behavior=org.controlsfx.controls",
|
|
|
|
"--add-opens=javafx.controls/com.sun.javafx.scene.control.inputmap=org.controlsfx.controls",
|
|
|
|
"--add-opens=javafx.graphics/com.sun.javafx.scene.traversal=org.controlsfx.controls",
|
|
|
|
"--add-opens=javafx.base/com.sun.javafx.event=org.controlsfx.controls",
|
|
|
|
"--add-opens=javafx.controls/javafx.scene.control.cell=com.sparrowwallet.sparrow",
|
2020-06-05 15:25:55 +00:00
|
|
|
"--add-opens=org.controlsfx.controls/impl.org.controlsfx.skin=com.sparrowwallet.sparrow",
|
|
|
|
"--add-opens=javafx.graphics/com.sun.javafx.tk=centerdevice.nsmenufx",
|
|
|
|
"--add-opens=javafx.graphics/com.sun.javafx.tk.quantum=centerdevice.nsmenufx",
|
|
|
|
"--add-opens=javafx.graphics/com.sun.glass.ui=centerdevice.nsmenufx",
|
|
|
|
"--add-opens=javafx.controls/com.sun.javafx.scene.control=centerdevice.nsmenufx",
|
|
|
|
"--add-opens=javafx.graphics/com.sun.javafx.menu=centerdevice.nsmenufx",
|
|
|
|
"--add-opens=javafx.graphics/com.sun.glass.ui.mac=centerdevice.nsmenufx"]
|
2020-04-02 10:54:41 +00:00
|
|
|
}
|
2020-04-01 11:26:40 +00:00
|
|
|
|
|
|
|
jlink {
|
|
|
|
mergedModule {
|
2020-08-02 15:54:51 +00:00
|
|
|
requires 'javafx.graphics'
|
|
|
|
requires 'javafx.controls'
|
|
|
|
requires 'java.xml'
|
2020-04-12 15:03:25 +00:00
|
|
|
requires 'java.logging'
|
2020-08-02 15:54:51 +00:00
|
|
|
requires 'javafx.base'
|
|
|
|
requires 'com.fasterxml.jackson.databind'
|
2020-08-05 10:36:50 +00:00
|
|
|
requires 'jdk.crypto.cryptoki'
|
2020-04-01 11:26:40 +00:00
|
|
|
}
|
|
|
|
|
2020-04-10 12:30:11 +00:00
|
|
|
options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages', '--ignore-signing-information', '--exclude-files', '**.png']
|
2020-04-01 11:26:40 +00:00
|
|
|
launcher {
|
|
|
|
name = 'sparrow'
|
2020-06-05 14:05:13 +00:00
|
|
|
jvmArgs = ["--add-opens=javafx.graphics/com.sun.javafx.css=org.controlsfx.controls",
|
|
|
|
"--add-opens=javafx.graphics/javafx.scene=org.controlsfx.controls",
|
|
|
|
"--add-opens=javafx.controls/com.sun.javafx.scene.control.behavior=org.controlsfx.controls",
|
|
|
|
"--add-opens=javafx.controls/com.sun.javafx.scene.control.inputmap=org.controlsfx.controls",
|
|
|
|
"--add-opens=javafx.graphics/com.sun.javafx.scene.traversal=org.controlsfx.controls",
|
|
|
|
"--add-opens=javafx.base/com.sun.javafx.event=org.controlsfx.controls",
|
|
|
|
"--add-opens=javafx.controls/javafx.scene.control.cell=com.sparrowwallet.sparrow",
|
2020-06-05 15:25:55 +00:00
|
|
|
"--add-opens=org.controlsfx.controls/impl.org.controlsfx.skin=com.sparrowwallet.sparrow",
|
|
|
|
"--add-opens=javafx.graphics/com.sun.javafx.tk=com.sparrowwallet.merged.module",
|
|
|
|
"--add-opens=javafx.graphics/com.sun.javafx.tk.quantum=com.sparrowwallet.merged.module",
|
|
|
|
"--add-opens=javafx.graphics/com.sun.glass.ui=com.sparrowwallet.merged.module",
|
|
|
|
"--add-opens=javafx.controls/com.sun.javafx.scene.control=com.sparrowwallet.merged.module",
|
|
|
|
"--add-opens=javafx.graphics/com.sun.javafx.menu=com.sparrowwallet.merged.module",
|
2020-08-05 07:12:06 +00:00
|
|
|
"--add-opens=javafx.graphics/com.sun.glass.ui.mac=com.sparrowwallet.merged.module",
|
|
|
|
"--add-reads=com.sparrowwallet.merged.module=java.desktop"]
|
2020-04-01 11:26:40 +00:00
|
|
|
}
|
|
|
|
addExtraDependencies("javafx")
|
2020-04-02 10:54:41 +00:00
|
|
|
jpackage {
|
|
|
|
imageName = "Sparrow"
|
|
|
|
installerName = "Sparrow"
|
2020-08-24 12:52:05 +00:00
|
|
|
appVersion = "${sparrowVersion}"
|
2020-04-14 07:37:14 +00:00
|
|
|
skipInstaller = true
|
2020-04-02 10:54:41 +00:00
|
|
|
imageOptions = []
|
|
|
|
installerOptions = [
|
|
|
|
'--file-associations', 'src/main/resources/associations.properties',
|
|
|
|
]
|
|
|
|
if (org.gradle.internal.os.OperatingSystem.current().windows) {
|
|
|
|
installerOptions += ['--win-per-user-install', '--win-dir-chooser', '--win-menu']
|
|
|
|
}
|
|
|
|
if (org.gradle.internal.os.OperatingSystem.current().macOsX) {
|
2020-04-14 07:37:14 +00:00
|
|
|
installerOptions += ['--mac-sign', '--mac-signing-key-user-name', 'Craig Raw (UPLVMSK9D7)']
|
2020-08-05 07:12:06 +00:00
|
|
|
imageOptions += ['--icon', 'src/main/deploy/package/macosx/sparrow.icns', '--resource-dir', 'src/main/deploy/package/macosx/']
|
2020-04-02 10:54:41 +00:00
|
|
|
installerType = "dmg"
|
|
|
|
}
|
|
|
|
}
|
2020-04-01 11:26:40 +00:00
|
|
|
}
|