Applied macosapp. Closes #63

This commit is contained in:
huangyuhui 2016-05-16 12:55:35 +08:00
parent 61a8ab5199
commit ca3ed47d21
5 changed files with 61 additions and 25 deletions

View File

@ -14,6 +14,15 @@
<task-args/> <task-args/>
<task-jvm-args/> <task-jvm-args/>
</task> </task>
<task>
<display-name>createApp</display-name>
<non-blocking>no</non-blocking>
<task-names>
<name must-exist="yes">createApp</name>
</task-names>
<task-args/>
<task-jvm-args/>
</task>
</common-tasks> </common-tasks>
<script-platform> <script-platform>
<spec-name>j2se</spec-name> <spec-name>j2se</spec-name>

View File

@ -16,8 +16,10 @@ deploy:
file: file:
- HMCL/build/libs/HMCL-${HMCL_VERSION_ROOT}.${TRAVIS_BUILD_NUMBER}.jar - 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}.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}.jar
- HMCSM/build/libs/HMCSM-${HMCSM_VERSION_ROOT}.${TRAVIS_BUILD_NUMBER}.exe - HMCSM/build/libs/HMCSM-${HMCSM_VERSION_ROOT}.${TRAVIS_BUILD_NUMBER}.exe
- HMCSM/build/libs/HMCSM-${HMCSM_VERSION_ROOT}.${TRAVIS_BUILD_NUMBER}-MacOSApp.zip
on: on:
repo: huanghongxun/HMCL repo: huanghongxun/HMCL
tags: false tags: false

View File

@ -15,6 +15,26 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see {http://www.gnu.org/licenses/}. * 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.jar.JarOutputStream
import java.util.zip.ZipEntry import java.util.zip.ZipEntry
import java.util.zip.ZipFile import java.util.zip.ZipFile
@ -56,6 +76,13 @@ task generateSources(type: Copy) {
compileJava.setSource "$buildDir/generated-src" compileJava.setSource "$buildDir/generated-src"
compileJava.dependsOn generateSources compileJava.dependsOn generateSources
task macAppCompressed(type: Zip, dependsOn: createApp) {
archiveName "HMCL-$mavenVersion-MacOSApp.zip"
include '**'
destinationDir file("$buildDir/libs/")
from "$buildDir/macApp"
}
sourceSets { sourceSets {
main { main {
java { java {
@ -85,22 +112,6 @@ configurations {
coreRuntime.extendsFrom runtime 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) { configure(install.repositories.mavenInstaller) {
pom.project { pom.project {
groupId = mavenGroupId groupId = mavenGroupId
@ -153,3 +164,4 @@ processResources {
build.dependsOn makeExecutable build.dependsOn makeExecutable
build.dependsOn makePackGZ build.dependsOn makePackGZ
build.dependsOn macAppCompressed

View File

@ -15,6 +15,21 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see {http://www.gnu.org/licenses/}. * 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: 'launch4j'
apply plugin: 'me.tatarka.retrolambda' apply plugin: 'me.tatarka.retrolambda'
@ -41,14 +56,11 @@ version = mavenVersion
String mavenArtifactId = name String mavenArtifactId = name
buildscript { task macAppCompressed(type: Zip, dependsOn: createApp) {
repositories { archiveName "HMCSM-$mavenVersion-MacOSApp.zip"
mavenCentral(); include '**'
dependencies { destinationDir file("$buildDir/libs/")
classpath 'edu.sc.seis.gradle:launch4j:1.0.6' from "$buildDir/macApp"
classpath 'me.tatarka:gradle-retrolambda:3.1.0'
}
}
} }
configure(install.repositories.mavenInstaller) { configure(install.repositories.mavenInstaller) {
@ -87,3 +99,4 @@ processResources {
} }
build.dependsOn makeExecutable build.dependsOn makeExecutable
build.dependsOn macAppCompressed