|
1 |
| -/* |
2 |
| - * Bootstrap script for the Gradle JavaFX Plugin. |
3 |
| - * (based on http://plugins.jasoft.fi/vaadin.plugin) |
4 |
| - * |
5 |
| - * The script will add the latest version of the plugin to the build script |
6 |
| - * dependencies and apply the plugin to the project. If you do not want |
7 |
| - * this behavior you can copy and paste the below configuration into your |
8 |
| - * own build script and define your own repository and version for the plugin. |
9 |
| - */ |
10 |
| - |
11 |
| -buildscript { |
12 |
| - File javaHome = new File(System.properties['java.home']) |
13 |
| - javaHome = javaHome.name == 'jre' ? javaHome.parentFile : javaHome |
14 |
| - String jfxrtLocation = new File("${javaHome}/jre/lib/jfxrt.jar").absolutePath |
15 |
| - // JavaFX locations for JDK7, JDK7, JDK8 |
16 |
| - for (location in ['lib/jfxrt.jar', 'jre/lib/jfxrt.jar', 'jre/lib/ext/jfxrt.jar']) { |
17 |
| - File file = new File(javaHome, location) |
18 |
| - if (file.exists()) { |
19 |
| - jfxrtLocation = file.absolutePath |
20 |
| - break |
21 |
| - } |
22 |
| - } |
23 |
| - |
24 |
| - repositories { |
25 |
| - jcenter() |
26 |
| - } |
27 |
| - dependencies { |
28 |
| - classpath 'org.bitbucket.shemnon.javafxplugin:gradle-javafx-plugin:8.1.1' |
29 |
| - classpath project.files("${javaHome}/lib/ant-javafx.jar") |
30 |
| - classpath project.files(jfxrtLocation) |
31 |
| - } |
32 |
| -} |
33 |
| - |
34 |
| -if (!project.plugins.findPlugin(org.bitbucket.shemnon.javafxplugin.JavaFXPlugin)) { |
35 |
| - project.apply(plugin: org.bitbucket.shemnon.javafxplugin.JavaFXPlugin) |
36 |
| -} |
| 1 | +/* |
| 2 | + * Bootstrap script for the Gradle JavaFX Plugin. |
| 3 | + * (based on http://plugins.jasoft.fi/vaadin.plugin) |
| 4 | + * |
| 5 | + * The script will add the latest version of the plugin to the build script |
| 6 | + * dependencies and apply the plugin to the project. If you do not want |
| 7 | + * this behavior you can copy and paste the below configuration into your |
| 8 | + * own build script and define your own repository and version for the plugin. |
| 9 | + */ |
| 10 | + |
| 11 | +buildscript { |
| 12 | + File javaHome = new File(System.properties['java.home']) |
| 13 | + javaHome = javaHome.name == 'jre' ? javaHome.parentFile : javaHome |
| 14 | + String jfxrtLocation = new File("${javaHome}/jre/lib/jfxrt.jar").absolutePath |
| 15 | + // JavaFX locations for JDK7, JDK7, JDK8 |
| 16 | + for (location in ['lib/jfxrt.jar', 'jre/lib/jfxrt.jar', 'jre/lib/ext/jfxrt.jar']) { |
| 17 | + File file = new File(javaHome, location) |
| 18 | + if (file.exists()) { |
| 19 | + jfxrtLocation = file.absolutePath |
| 20 | + break |
| 21 | + } |
| 22 | + } |
| 23 | + |
| 24 | + repositories { |
| 25 | + jcenter() |
| 26 | + } |
| 27 | + dependencies { |
| 28 | + classpath 'org.bitbucket.shemnon.javafxplugin:gradle-javafx-plugin:8.1.1' |
| 29 | + classpath project.files("${javaHome}/lib/ant-javafx.jar") |
| 30 | + classpath project.files(jfxrtLocation) |
| 31 | + } |
| 32 | +} |
| 33 | + |
| 34 | +if (!project.plugins.findPlugin(org.bitbucket.shemnon.javafxplugin.JavaFXPlugin)) { |
| 35 | + project.apply(plugin: org.bitbucket.shemnon.javafxplugin.JavaFXPlugin) |
| 36 | +} |
0 commit comments