summaryrefslogtreecommitdiff
path: root/java/src
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2014-10-24 14:32:25 -0230
committerDwayne Boone <dwayne@zeroc.com>2014-10-24 14:32:25 -0230
commitddaa4af1d77c9ace36722c14fbe04e352f734123 (patch)
tree52b27bf431e7ddf78cf45f467210462e013c6835 /java/src
parentICE-5780 - ruby test/Ice/proxy failure (diff)
downloadice-ddaa4af1d77c9ace36722c14fbe04e352f734123.tar.bz2
ice-ddaa4af1d77c9ace36722c14fbe04e352f734123.tar.xz
ice-ddaa4af1d77c9ace36722c14fbe04e352f734123.zip
Fixes to IceGridGUI build
Diffstat (limited to 'java/src')
-rw-r--r--java/src/IceGridGUI/build.gradle60
1 files changed, 46 insertions, 14 deletions
diff --git a/java/src/IceGridGUI/build.gradle b/java/src/IceGridGUI/build.gradle
index ae77c03ddb0..3c270d0acfd 100644
--- a/java/src/IceGridGUI/build.gradle
+++ b/java/src/IceGridGUI/build.gradle
@@ -10,26 +10,53 @@
sourceCompatibility = 1.7
targetCompatibility = 1.7
-apply plugin: 'application'
-apply from: "../../gradle/javafx7.gradle"
+def hasJavaFx = false
+def javaHome = System.getProperty('java.home')
+def javafxJar = new File(javaHome + "/lib/jfxrt.jar")
+if (javafxJar.exists()) {
+ hasJavaFx = true
+} else {
+ javafxJar = new File(javaHome + "/lib/ext/jfxrt.jar")
+ if (javafxJar.exists()) {
+ hasJavaFx = true
+ }
+}
-dependencies {
- compile project(':Ice')
- compile project(':IceBox')
- compile project(':IceGrid')
- compile 'com.jgoodies:jgoodies-common:1.8.0'
- compile 'com.jgoodies:jgoodies-looks:2.6.0'
- compile 'com.jgoodies:jgoodies-forms:1.8.0'
+if (hasJavaFx) {
+ apply plugin: 'application'
+ apply from: "../../gradle/javafx7.gradle"
+
+ mainClassName = "IceGridGUI.Main"
+} else {
+ sourceSets {
+ main {
+ java {
+ exclude '**/LiveDeployment/GraphView.java'
+ }
+ }
+ }
}
-mainClassName = "IceGridGUI.Main"
+dependencies {
+ compile project(':Ice')
+ compile project(':IceBox')
+ compile project(':IceGrid')
+ compile 'com.jgoodies:jgoodies-common:1.8.0'
+ compile 'com.jgoodies:jgoodies-looks:2.6.0'
+ compile 'com.jgoodies:jgoodies-forms:1.8.0'
+}
def tmpJarName = "IceGridGUITEMP${versionSuffix}.jar"
def jarName = "IceGridGUI${versionSuffix}.jar"
jar {
- archiveName = tmpJarName
+ archiveName = tmpJarName
destinationDir = new File("${libDir}")
+ if (!hasJavaFx) {
+ manifest {
+ attributes 'Main-Class': "IceGridGUI.Main"
+ }
+ }
}
buildscript {
@@ -43,12 +70,17 @@ buildscript {
}
}
-def javaHome = System.getProperty('java.home')
def libJars = []
-['rt.jar', 'jsse.jar', 'jfxrt.jar', 'ext/jfxrt.jar'].each {
+['rt.jar', 'jsse.jar'].each {
libJars << "${javaHome}/lib/${it}"
}
+if (hasJavaFx) {
+ ['jfxrt.jar', 'ext/jfxrt.jar'].each {
+ libJars << "${javaHome}/lib/${it}"
+ }
+}
+
task proguardJar(type: proguard.gradle.ProGuardTask, dependsOn: jar) {
injars configurations.compile.resolve(), filter: '!META-INF/**'
injars "${libDir}/${tmpJarName}"
@@ -60,7 +92,7 @@ task proguardJar(type: proguard.gradle.ProGuardTask, dependsOn: jar) {
task proguardCleanup(dependsOn: proguardJar) << {
delete("${libDir}/${tmpJarName}")
}
-build.dependsOn(proguardCleanup)
+assemble.dependsOn(proguardCleanup)
clean {
delete("${libDir}/${jarName}")