sparrow/build.gradle

88 lines
3.6 KiB
Groovy
Raw Normal View History

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-04-01 11:26:40 +00:00
group 'com.sparrowwallet'
2020-03-22 08:12:07 +00:00
version '1.0-SNAPSHOT'
2020-04-01 11:26:40 +00:00
sourceCompatibility = 1.9
2020-03-22 08:12:07 +00:00
repositories {
mavenCentral()
}
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'
}
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-04-29 10:03:44 +00:00
implementation('org.apache.commons:commons-compress:1.20')
2020-04-01 11:26:40 +00:00
implementation('org.controlsfx:controlsfx:11.0.1' ) {
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-04-02 10:54:41 +00:00
run {
2020-04-17 08:03:50 +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"]
2020-04-02 10:54:41 +00:00
}
2020-04-01 11:26:40 +00:00
jlink {
mergedModule {
requires 'javafx.graphics';
requires 'javafx.controls';
requires 'java.xml';
requires 'java.logging'
2020-04-01 11:26:40 +00:00
requires 'javafx.base';
}
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-04-17 08:03:50 +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"]
2020-04-01 11:26:40 +00:00
}
addExtraDependencies("javafx")
2020-04-02 10:54:41 +00:00
jpackage {
imageName = "Sparrow"
installerName = "Sparrow"
2020-04-14 07:37:14 +00:00
appVersion = "0.51"
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)']
imageOptions += ['--icon', 'src/main/deploy/package/macosx/sparrow.icns']
2020-04-02 10:54:41 +00:00
installerType = "dmg"
}
}
2020-04-01 11:26:40 +00:00
}