diff --git a/.travis.yml b/.travis.yml index ccaa08947c..d5419e15fe 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,12 @@ language: java jdk: oraclejdk8 +install: + - "sudo apt-get purge openjdk*" + - "sudo add-apt-repository -y ppa:webupd8team/java" + - "sudo apt-get update" + - "sudo apt-get install oracle-java8-installer" + notifications: irc: channels: chat.freenode.net#bitsquare diff --git a/build.gradle b/build.gradle index c7c61f6b3b..aa4421143e 100644 --- a/build.gradle +++ b/build.gradle @@ -1,25 +1,25 @@ -buildscript { - repositories { - jcenter() - } - dependencies { - classpath 'com.github.rholder:gradle-one-jar:1.0.4' - } -} - apply plugin: 'java' apply plugin: 'application' -apply plugin: 'gradle-one-jar' +apply from: 'gradle/javafx.gradle' version = '0.1.0-SNAPSHOT' sourceCompatibility = 1.8 -mainClassName = 'io.bitsquare.BitSquare' sourceSets.main.resources.srcDirs += 'src/main/java' -task executableJar(type: OneJar) { - mainClass = project.mainClassName - archiveName = 'bitsquare.jar' +javafx { + appID 'Bitsquare' + appName 'Bitsquare' + mainClass 'io.bitsquare.BitSquare' + + profiles { + windows { + javaRuntime = 'C:/Program Files/Java/jdk1.8.0_20/jre' + bundleArguments = [ + 'win.msi.productVersion' : '0.1.0' + ] + } + } } repositories { diff --git a/gradle/javafx.gradle b/gradle/javafx.gradle new file mode 100644 index 0000000000..ee41360af8 --- /dev/null +++ b/gradle/javafx.gradle @@ -0,0 +1,95 @@ +/* + * Bootstrap script for the Gradle JavaFX Plugin. + * (based on http://plugins.jasoft.fi/vaadin.plugin) + * + * The script will add the plugin to the build script + * dependencies and apply the plugin to the project. If you do not want + * this behavior you can copy and paste the below configuration into your + * own build script and define your own repository and version for the plugin. + */ + +import org.gradle.api.GradleException; + +buildscript { + repositories { + maven { + name = 'JavaFX Gradle plugin' + url = 'http://dl.bintray.com/content/shemnon/javafx-gradle/' + } + maven { + name = 'CloudBees snapshots' + url = 'http://repository-javafx-gradle-plugin.forge.cloudbees.com/snapshot' + } + ivy { + name = 'CloudBees snapshots' + url = 'http://repository-javafx-gradle-plugin.forge.cloudbees.com/snapshot' + } + jcenter() + } + dependencies { + try { + assert (jfxrtDir != null) + } catch (RuntimeException re) { + ext.jfxrtDir = "." + } + + ext.searchFile = {Map places, List searchPaths, String searchID -> + File result = null; + places.each { k, v -> + if (result != null) return; + project.logger.debug("Looking for $searchID in $k") + def dir = v() + if (dir == null) { + project.logger.debug("$k not set") + } else { + project.logger.debug("$k is $dir") + searchPaths.each { s -> + if (result != null) return; + File f = new File(dir, s); + project.logger.debug("Trying $f.path") + if (f.exists() && f.file) { + project.logger.debug("found $searchID as $result") + result = f; + } + } + } + } + if (!result?.file) { + throw new GradleException("Could not find $searchID, please set one of ${places.keySet()}"); + } else { + project.logger.info("$searchID: ${result}") + return result + } + } + ext.findJFXJar = { + return searchFile([ + 'jfxrtDir in Gradle Properties': {jfxrtDir}, + 'JFXRT_HOME in System Environment': {System.env['JFXRT_HOME']}, + 'JAVA_HOME in System Environment': {System.env['JAVA_HOME']}, + 'java.home in JVM properties': {System.properties['java.home']} + ], + ['jfxrt.jar', 'lib/jfxrt.jar', 'lib/ext/jfxrt.jar', 'jre/lib/jfxrt.jar', 'jre/lib/ext/jfxrt.jar'], + 'JavaFX Runtime Jar') + } + + ext.findAntJavaFXJar = { + return searchFile([ + 'jfxrtDir in Gradle Properties': {jfxrtDir}, + 'JFXRT_HOME in System Environment': {System.env['JFXRT_HOME']}, + 'JAVA_HOME in System Environment': {System.env['JAVA_HOME']}, + 'java.home in JVM properties': {System.properties['java.home']} + ], + ['ant-javafx.jar', 'lib/ant-javafx.jar', '../lib/ant-javafx.jar'], + 'JavaFX Packager Tools') + } + + + classpath 'org.bitbucket.shemnon.javafxplugin:gradle-javafx-plugin:8.1.1' + classpath project.files(findAntJavaFXJar()) + classpath project.files(findJFXJar()) + } +} + +if (!project.plugins.findPlugin(org.bitbucket.shemnon.javafxplugin.JavaFXPlugin)) { + project.apply(plugin: org.bitbucket.shemnon.javafxplugin.JavaFXPlugin) +} diff --git a/src/deploy/package/shortcut-128.png b/src/deploy/package/shortcut-128.png new file mode 100644 index 0000000000..f41ea3a3d2 Binary files /dev/null and b/src/deploy/package/shortcut-128.png differ diff --git a/src/deploy/package/shortcut-128@2x.png b/src/deploy/package/shortcut-128@2x.png new file mode 100644 index 0000000000..d21ccf0179 Binary files /dev/null and b/src/deploy/package/shortcut-128@2x.png differ diff --git a/src/deploy/package/shortcut-16.png b/src/deploy/package/shortcut-16.png new file mode 100644 index 0000000000..8534c3e6b9 Binary files /dev/null and b/src/deploy/package/shortcut-16.png differ diff --git a/src/deploy/package/shortcut-16@2x.png b/src/deploy/package/shortcut-16@2x.png new file mode 100644 index 0000000000..b814586be3 Binary files /dev/null and b/src/deploy/package/shortcut-16@2x.png differ diff --git a/src/deploy/package/shortcut-256.png b/src/deploy/package/shortcut-256.png new file mode 100644 index 0000000000..d21ccf0179 Binary files /dev/null and b/src/deploy/package/shortcut-256.png differ diff --git a/src/deploy/package/shortcut-256@2x.png b/src/deploy/package/shortcut-256@2x.png new file mode 100644 index 0000000000..85c9f4e0b3 Binary files /dev/null and b/src/deploy/package/shortcut-256@2x.png differ diff --git a/src/deploy/package/shortcut-32.png b/src/deploy/package/shortcut-32.png new file mode 100644 index 0000000000..feab2dc4cc Binary files /dev/null and b/src/deploy/package/shortcut-32.png differ diff --git a/src/deploy/package/shortcut-32@2x.png b/src/deploy/package/shortcut-32@2x.png new file mode 100644 index 0000000000..7103550b9f Binary files /dev/null and b/src/deploy/package/shortcut-32@2x.png differ diff --git a/src/deploy/package/shortcut-512.png b/src/deploy/package/shortcut-512.png new file mode 100644 index 0000000000..85c9f4e0b3 Binary files /dev/null and b/src/deploy/package/shortcut-512.png differ diff --git a/src/deploy/package/shortcut-512@2x.png b/src/deploy/package/shortcut-512@2x.png new file mode 100644 index 0000000000..5f2ce15db0 Binary files /dev/null and b/src/deploy/package/shortcut-512@2x.png differ diff --git a/src/deploy/package/shortcut-64.png b/src/deploy/package/shortcut-64.png new file mode 100644 index 0000000000..62c25a2963 Binary files /dev/null and b/src/deploy/package/shortcut-64.png differ diff --git a/src/deploy/package/shortcut-64@2x.png b/src/deploy/package/shortcut-64@2x.png new file mode 100644 index 0000000000..4ed5be848d Binary files /dev/null and b/src/deploy/package/shortcut-64@2x.png differ diff --git a/src/deploy/package/shortcut.sketch b/src/deploy/package/shortcut.sketch new file mode 100644 index 0000000000..2ff0993627 Binary files /dev/null and b/src/deploy/package/shortcut.sketch differ