From 48c657b648dc8d24b06512d58b2bec3793422e47 Mon Sep 17 00:00:00 2001 From: Andreas Billmann Date: Thu, 6 Oct 2016 14:01:52 +0200 Subject: [PATCH 1/3] fxlauncher without customization --- build.gradle | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 82879bb..63d49ef 100644 --- a/build.gradle +++ b/build.gradle @@ -1,14 +1,33 @@ group 'ninja.javafx' version '0.8-SNAPSHOT' +buildscript { + repositories { + mavenCentral() + } + dependencies { + classpath 'no.tornado:fxlauncher-gradle-plugin:1.0.12' + } +} + apply plugin: 'java' apply plugin: 'groovy' -apply plugin:'application' +apply plugin: 'application' apply plugin: 'idea' +apply plugin: 'no.tornado.fxlauncher' sourceCompatibility = 1.8 mainClassName = 'ninja.javafx.smartcsv.fx.SmartCSV' + +fxlauncher { + applicationVendor 'Andreas Billmann (andreas.billmann@javafx.ninja)' + applicationUrl 'http://javafx.ninja/SmartCSV.fx/' + applicationMainClass mainClassName + acceptDowngrade false + cacheDir 'USERLIB/SmartCSV.fx' +} + repositories { mavenCentral() jcenter() @@ -34,4 +53,5 @@ dependencies { task wrapper(type: Wrapper) { gradleVersion = '2.14.1' //version required -} \ No newline at end of file +} + From e9e71b54743cb86efbbc4e26bbfc65152b00a518 Mon Sep 17 00:00:00 2001 From: Andreas Billmann Date: Thu, 6 Oct 2016 15:33:00 +0200 Subject: [PATCH 2/3] gradle task to rename the fxlauncher.jar and launcher without own ui --- README.md | 3 ++- build.gradle | 11 +++++++++-- gradle/wrapper/gradle-wrapper.properties | 4 ++-- .../ninja/javafx/smartcsv/fx/application.properties | 2 +- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 0f24a2d..9ad60d2 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,8 @@ even in a "normal" CSV editor. So I decided to write this simple JavaFX applicat [Wiki & Documentation](https://github.com/frosch95/SmartCSV.fx/wiki) -binary distribution of the [latest release (0.8)](https://github.com/frosch95/SmartCSV.fx/releases/download/0.8/SmartCSV.fx-0.8-SNAPSHOT.zip) +binary distribution of the [SmartCSV.fx launcher](http://www.javafx.ninja/SmartCSV.fx/SmartCSV.fx.jar) +copy the jar to an appropriate place and start the application with a double click on the jar (or java -jar SmartCSV.fx.jar on command line) ##Talks [Introduction](http://javafx.ninja/talks/introduction/) diff --git a/build.gradle b/build.gradle index 63d49ef..7c8862c 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ group 'ninja.javafx' -version '0.8-SNAPSHOT' +version '0.9-SNAPSHOT' buildscript { repositories { @@ -52,6 +52,13 @@ dependencies { } task wrapper(type: Wrapper) { - gradleVersion = '2.14.1' //version required + gradleVersion = '3.1' //version required } +task buildSmartCSV(dependsOn: 'embedApplicationManifest') { + def pathName = getBuildDir().absolutePath + File.separatorChar + 'fxlauncher' + File.separatorChar + def file = new File(pathName + 'fxlauncher.jar') + file.renameTo(pathName + 'SmartCSV.fx.jar') +} + +defaultTasks 'buildSmartCSV' \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 96684ad..caa1c6b 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Sat Jul 23 09:35:51 CEST 2016 +#Thu Oct 06 15:00:38 CEST 2016 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip diff --git a/src/main/resources/ninja/javafx/smartcsv/fx/application.properties b/src/main/resources/ninja/javafx/smartcsv/fx/application.properties index c53d4b9..5075cf8 100644 --- a/src/main/resources/ninja/javafx/smartcsv/fx/application.properties +++ b/src/main/resources/ninja/javafx/smartcsv/fx/application.properties @@ -1,5 +1,5 @@ application.name = SmartCSV.fx -application.version = 0.8 +application.version = 0.9 # fxml views fxml.smartcvs.view = /ninja/javafx/smartcsv/fx/smartcsv.fxml From 16373a033afb7e98086949b44f358fbffe991a84 Mon Sep 17 00:00:00 2001 From: Andreas Billmann Date: Thu, 6 Oct 2016 21:07:01 +0200 Subject: [PATCH 3/3] change updating text in fxlauncher --- build.gradle | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index 7c8862c..6022370 100644 --- a/build.gradle +++ b/build.gradle @@ -19,6 +19,7 @@ apply plugin: 'no.tornado.fxlauncher' sourceCompatibility = 1.8 mainClassName = 'ninja.javafx.smartcsv.fx.SmartCSV' +def fxlauncherPathName = getBuildDir().absolutePath + File.separatorChar + 'fxlauncher' + File.separatorChar fxlauncher { applicationVendor 'Andreas Billmann (andreas.billmann@javafx.ninja)' @@ -55,10 +56,18 @@ task wrapper(type: Wrapper) { gradleVersion = '3.1' //version required } -task buildSmartCSV(dependsOn: 'embedApplicationManifest') { - def pathName = getBuildDir().absolutePath + File.separatorChar + 'fxlauncher' + File.separatorChar - def file = new File(pathName + 'fxlauncher.jar') - file.renameTo(pathName + 'SmartCSV.fx.jar') +task buildSmartCSV(dependsOn: ['clean','embedApplicationManifest']) << { + def file = new File(fxlauncherPathName + 'fxlauncher.jar') + file.renameTo(fxlauncherPathName + 'SmartCSV.fx.jar') } +task modifyAppXML(dependsOn: 'generateApplicationManifest') << { + String contents = new File( fxlauncherPathName + 'app.xml' ).getText( 'UTF-8' ) + contents = contents.replaceAll( 'Updating...', 'Updating SmartCSV.fx ...' ) + contents = contents.replaceAll( '-fx-spacing: 10; -fx-padding: 25;', '-fx-spacing: 10; -fx-padding: 25;-fx-font-size: 0.9em;' ) + new File( fxlauncherPathName + 'app.xml' ).write( contents, 'UTF-8' ) +} + +embedApplicationManifest.dependsOn modifyAppXML + defaultTasks 'buildSmartCSV' \ No newline at end of file