diff --git a/.nb-gradle-properties b/.nb-gradle-properties
index 21559b52a..aa17ec6af 100755
--- a/.nb-gradle-properties
+++ b/.nb-gradle-properties
@@ -14,6 +14,15 @@
+
+ createApp
+ no
+
+ createApp
+
+
+
+
j2se
diff --git a/.travis.yml b/.travis.yml
index a32199dc9..9fce3d616 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -16,8 +16,10 @@ deploy:
file:
- HMCL/build/libs/HMCL-${HMCL_VERSION_ROOT}.${TRAVIS_BUILD_NUMBER}.jar
- HMCL/build/libs/HMCL-${HMCL_VERSION_ROOT}.${TRAVIS_BUILD_NUMBER}.exe
+ - HMCL/build/libs/HMCL-${HMCL_VERSION_ROOT}.${TRAVIS_BUILD_NUMBER}-MacOSApp.zip
- HMCSM/build/libs/HMCSM-${HMCSM_VERSION_ROOT}.${TRAVIS_BUILD_NUMBER}.jar
- HMCSM/build/libs/HMCSM-${HMCSM_VERSION_ROOT}.${TRAVIS_BUILD_NUMBER}.exe
+ - HMCSM/build/libs/HMCSM-${HMCSM_VERSION_ROOT}.${TRAVIS_BUILD_NUMBER}-MacOSApp.zip
on:
repo: huanghongxun/HMCL
tags: false
diff --git a/HMCL/build.gradle b/HMCL/build.gradle
index 7a919f65d..036cd4e04 100755
--- a/HMCL/build.gradle
+++ b/HMCL/build.gradle
@@ -15,6 +15,26 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see {http://www.gnu.org/licenses/}.
*/
+buildscript {
+ repositories {
+ mavenCentral();
+
+ maven {
+ url "https://libraries.minecraft.net"
+ }
+
+ dependencies {
+ classpath 'net.sf.proguard:proguard-gradle:4.10'
+ classpath 'edu.sc.seis.gradle:launch4j:1.0.6'
+ classpath 'me.tatarka:gradle-retrolambda:3.1.0'
+ }
+ }
+}
+
+plugins {
+ id "edu.sc.seis.macAppBundle" version "2.1.6"
+}
+
import java.util.jar.JarOutputStream
import java.util.zip.ZipEntry
import java.util.zip.ZipFile
@@ -56,6 +76,13 @@ task generateSources(type: Copy) {
compileJava.setSource "$buildDir/generated-src"
compileJava.dependsOn generateSources
+task macAppCompressed(type: Zip, dependsOn: createApp) {
+ archiveName "HMCL-$mavenVersion-MacOSApp.zip"
+ include '**'
+ destinationDir file("$buildDir/libs/")
+ from "$buildDir/macApp"
+}
+
sourceSets {
main {
java {
@@ -85,22 +112,6 @@ configurations {
coreRuntime.extendsFrom runtime
}
-buildscript {
- repositories {
- mavenCentral();
-
- maven {
- url "https://libraries.minecraft.net"
- }
-
- dependencies {
- classpath 'net.sf.proguard:proguard-gradle:4.10'
- classpath 'edu.sc.seis.gradle:launch4j:1.0.6'
- classpath 'me.tatarka:gradle-retrolambda:3.1.0'
- }
- }
-}
-
configure(install.repositories.mavenInstaller) {
pom.project {
groupId = mavenGroupId
@@ -153,3 +164,4 @@ processResources {
build.dependsOn makeExecutable
build.dependsOn makePackGZ
+build.dependsOn macAppCompressed
\ No newline at end of file
diff --git a/HMCSM/build.gradle b/HMCSM/build.gradle
index d8e6ec12d..d420f9457 100755
--- a/HMCSM/build.gradle
+++ b/HMCSM/build.gradle
@@ -15,6 +15,21 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see {http://www.gnu.org/licenses/}.
*/
+
+buildscript {
+ repositories {
+ mavenCentral();
+ dependencies {
+ classpath 'edu.sc.seis.gradle:launch4j:1.0.6'
+ classpath 'me.tatarka:gradle-retrolambda:3.1.0'
+ }
+ }
+}
+
+plugins {
+ id "edu.sc.seis.macAppBundle" version "2.1.6"
+}
+
apply plugin: 'launch4j'
apply plugin: 'me.tatarka.retrolambda'
@@ -41,14 +56,11 @@ version = mavenVersion
String mavenArtifactId = name
-buildscript {
- repositories {
- mavenCentral();
- dependencies {
- classpath 'edu.sc.seis.gradle:launch4j:1.0.6'
- classpath 'me.tatarka:gradle-retrolambda:3.1.0'
- }
- }
+task macAppCompressed(type: Zip, dependsOn: createApp) {
+ archiveName "HMCSM-$mavenVersion-MacOSApp.zip"
+ include '**'
+ destinationDir file("$buildDir/libs/")
+ from "$buildDir/macApp"
}
configure(install.repositories.mavenInstaller) {
@@ -87,3 +99,4 @@ processResources {
}
build.dependsOn makeExecutable
+build.dependsOn macAppCompressed
\ No newline at end of file
diff --git a/common.gradle b/common.gradle
index 86e061496..031d77ee2 100755
--- a/common.gradle
+++ b/common.gradle
@@ -102,4 +102,4 @@ task makePackGZ(dependsOn: jar) << {
def fileEx = new File(project.buildDir, "libs/" + makeExecutableoutjar.getName().substring(0, makeExecutableoutjar.getName().length()-4)+".pack.gz.sha1")
if (!fileEx.exists()) fileEx.createNewFile()
fileEx.append sha1Hex
-}
+}
\ No newline at end of file