From 17eca9dd2f69b97558ca06b1ffbb9b3ea055c73e Mon Sep 17 00:00:00 2001 From: huangyuhui Date: Fri, 24 Feb 2017 19:08:12 +0800 Subject: [PATCH] mac os app --- HMCL/build.gradle | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/HMCL/build.gradle b/HMCL/build.gradle index d0a5f9325..ed87f3db0 100755 --- a/HMCL/build.gradle +++ b/HMCL/build.gradle @@ -21,6 +21,7 @@ import java.util.zip.GZIPOutputStream import java.security.MessageDigest plugins { + id "edu.sc.seis.macAppBundle" version "2.1.6" id "me.tatarka.retrolambda" version "3.5.0" id 'edu.sc.seis.launch4j' version '2.3.0' } @@ -161,5 +162,19 @@ task makePackGZ(dependsOn: jar) doLast { fileEx.append sha1Hex } +task macAppCompressed(type: Zip, dependsOn: createApp) doLast { + archiveName "HMCL-$mavenVersion-MacOSApp.zip" + include '**' + destinationDir file("$buildDir/libs/") + from "$buildDir/macApp" +} + +macAppBundle { + mainClassName = mainClass + icon = "src/main/icon.icns" + javaProperties.put("apple.laf.useScreenMenuBar", "true") +} + build.dependsOn makeExecutable -build.dependsOn makePackGZ \ No newline at end of file +build.dependsOn makePackGZ +build.dependsOn macAppCompressed \ No newline at end of file