diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2014-10-29 14:04:05 -0230 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2014-10-29 14:04:05 -0230 |
commit | d67700618b53faffd842f33ab0d63b0662eb215d (patch) | |
tree | 5043f14504471514e09ebc8da0c940de81bcf7ae | |
parent | ICE-5698 - Stop using IceBox ServiceManager OA in IceStormUtil script (diff) | |
download | ice-d67700618b53faffd842f33ab0d63b0662eb215d.tar.bz2 ice-d67700618b53faffd842f33ab0d63b0662eb215d.tar.xz ice-d67700618b53faffd842f33ab0d63b0662eb215d.zip |
Added running of AppBundler to gradle for OSX
-rw-r--r-- | java/gradle.properties | 6 | ||||
-rw-r--r-- | java/src/IceGridGUI/build.gradle | 53 |
2 files changed, 54 insertions, 5 deletions
diff --git a/java/gradle.properties b/java/gradle.properties index 2f3c1f86830..6e54613d1a3 100644 --- a/java/gradle.properties +++ b/java/gradle.properties @@ -34,11 +34,7 @@ debug = true // Gradle build properties // org.gradle.daemon = true - -# -# This is disabled as currently slice2java crashes with parallel builds. -# -#org.gradle.parallel = true +org.gradle.parallel = true // // Package build properties diff --git a/java/src/IceGridGUI/build.gradle b/java/src/IceGridGUI/build.gradle index 58d1260393d..28c65e562b4 100644 --- a/java/src/IceGridGUI/build.gradle +++ b/java/src/IceGridGUI/build.gradle @@ -10,6 +10,8 @@ sourceCompatibility = iceSourceCompatibility targetCompatibility = iceTargetCompatibility +def macosx = System.properties['os.name'] == "Mac OS X" + def hasJavaFx = false def javaHome = System.getProperty('java.home') def javafxJar = new File(javaHome + "/lib/jfxrt.jar") @@ -37,6 +39,10 @@ if (hasJavaFx) { } } +configurations { + bundleapp +} + dependencies { compile project(':Ice') compile project(':IceBox') @@ -44,6 +50,7 @@ dependencies { compile 'com.jgoodies:jgoodies-common:1.8.0' compile 'com.jgoodies:jgoodies-looks:2.6.0' compile 'com.jgoodies:jgoodies-forms:1.8.0' + bundleapp 'com.oracle:appbundler:1.0' } def tmpJarName = "IceGridGUITEMP${versionSuffix}.jar" @@ -89,12 +96,58 @@ task proguardJar(type: proguard.gradle.ProGuardTask, dependsOn: jar) { } assemble.dependsOn(proguardJar) +if(macosx) +{ + def appName = "IceGrid Admin" + task bundleapp(dependsOn: proguardJar) << { + ant.taskdef(name: 'bundleapp', + classname: 'com.oracle.appbundler.AppBundlerTask', + classpath: configurations.bundleapp.asPath) + + ant.bundleapp(outputdirectory: "${libDir}", + name: appName, + displayname: appName, + identifier: "com.zeroc.IceGridGUI", + icon: "${projectDir}/src/main/resources/icons/icegrid.icns", + shortversion: "${iceVersion}", + applicationCategory: "public.app-category.utilities", + mainclassname: "com/javafx/main/Main", + copyright: "Copyright © 2005-2014 ZeroC, Inc. All rights reserved.") { + classpath(file: "${libDir}/${jarName}") { + } + option(value: "-Dapple.laf.useScreenMenuBar=true") { + } + option(value: "-Dcom.apple.macos.use-file-dialog-packages=true") { + } + option(value: "-Dcom.apple.macos.useScreenMenuBar=true") { + } + option(value: "-Xdock:name=IceGrid Admin") { + } + option(value: "-Dcom.apple.mrj.application.apple.menu.about.name=${appName}") { + } + } + } + assemble.dependsOn(bundleapp) + + task copyBundle(type: Copy, dependsOn: bundleapp) { + from "${libDir}/${appName}.app" + into "${DESTDIR}${prefix}/bin/${appName}.app" + } +} + clean { delete("${libDir}/${jarName}") + delete("${libDir}/IceGrid Admin.app") } task copyJars(type: Copy, dependsOn: proguardJar) { from new File("${libDir}/${jarName}") into "${DESTDIR}${prefix}/lib" } + + task install(dependsOn: copyJars) +if(macosx) { + install.dependsOn(copyBundle) +} + |