Commit adc65cad authored by Lukas Marik's avatar Lukas Marik

#782 create method for copy jar file by buildType to app

parent 2aaa2df5
import edu.sc.seis.launch4j.tasks.Launch4jLibraryTask
import edu.sc.seis.macAppBundle.MacAppBundlePlugin
import groovy.io.FileType
/*
......@@ -283,48 +284,61 @@ task debugExe(dependsOn: debugJar, type: SetupExeTask) {
setBuildTypeInput('debug')
}
task debugMac(dependsOn: debugJar,) {
doLast {
setMacAppBundle('debug', 'debugJar')
}
macAppBundle {
mainClassName = project.mainLauncherClassName
icon = '../ios/data/Tablexia_Icon_release.icns'
bundleJRE = true
appName = 'Tablexia'
}
task releaseMac(dependsOn: releaseJar) {
doLast {
setMacAppBundle('release', 'releaseJar')
task debugMac(dependsOn: createApp){
doLast{
setupMacApp('debug')
}
}
def setMacAppBundle(String buildType, String jarTaskPath) {
task releaseMac(dependsOn: createApp){
/*doLast{
macAppBundle {
mainClassName = project.mainLauncherClassName
icon = '../ios/data/Tablexia_Icon_release.icns'
bundleJRE = true
appName = project.tablexiaAppName + '-' + buildType + '-' + project.tablexiaVersionName
jarTask = jarTaskPath
}
logger.lifecycle("COPY JAR TO MAC")
project.copy {
from project.buildDir.absolutePath + '/libs/' + project.tablexiaAppName + '-' + 'debug' + '-' + project.tablexiaVersionName + '.jar'
into project.buildDir.absolutePath + '/macApp/Tablexia.app/Contents/Java'
}
logger.lifecycle("RUN MAC: " + buildType + " BUNDLE: " + macAppBundle.appName + " - " + macAppBundle.jarTask)
}*/
}
def setupMacApp(String buildType){
def outputDit = new File(project.buildDir.absolutePath + '/outputApp')
if(!outputDit.exists()) outputDit.mkdir()
logger.lifecycle("COPY JAR TO MAC")
project.copy {
from project.buildDir.absolutePath + '/libs/' + project.tablexiaAppName + '-' + buildType + '-' + project.tablexiaVersionName + '.jar'
into project.buildDir.absolutePath + '/macApp/Tablexia.app/Contents/Java'
}
}
debugJar.dependsOn classes
debugJar.dependsOn(':util:checksum:runChecksum')
debugExe.dependsOn handleJreTask
debugExe.dependsOn classes
debugMac.dependsOn createApp
releaseJar.dependsOn classes
releaseJar.dependsOn(':util:checksum:runChecksum')
releaseExe.dependsOn handleJreTask
releaseExe.dependsOn classes
createApp.dependsOn debugMac
releaseMac.dependsOn createApp
iTestJar.dependsOn classes
iTestJar.dependsOn iTestClasses
iTestJar.dependsOn(':util:checksum:runChecksum')
assemble.dependsOn([handleJreTask, debugJar, debugExe, debugMac ,releaseJar, releaseExe,releaseMac ,iTestJar])
assemble.dependsOn([handleJreTask, debugJar, /*debugExe,*/ debugMac, releaseJar,/* releaseExe,*/ releaseMac, iTestJar])
Please register or sign in to reply
jar.enabled = false
eclipse {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment