123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111 |
- apply plugin:'java'
- apply plugin: 'application'
- apply from: "$rootDir/utils/IO.gradle"
- version = '0.11.0.0-SNAPSHOT'
- mainClassName = 'de.nplusc.izc.izpl.plugins.jukebox.StandaloneMain'
- //task distZip(dependsOn: 'jar') {
- // //NO-OPtask als redirect
- //}
- startScripts {
- doLast {
- defaultJvmOpts = ["-Dlog4j.skipJansi=false"] // fahr zur hölle Log5J
- def startScriptDir = outputDir.getAbsolutePath()
- def winStartScript = startScriptDir + "/" + applicationName + ".bat"
- def winStartScriptCopy = startScriptDir + "/" + applicationName + "c.bat"
- def linuxStartScript = startScriptDir + "/" + applicationName
- def overwriteExistingFile = true
- copyFile(winStartScript, winStartScriptCopy, overwriteExistingFile)
- //:init
-
- modifyFile(winStartScript) {
- // javaw.exe doesn't have a console
- if(it.contains("java.exe")){
- return it.replace("java.exe", "javaw.exe")
- }
- // Command that launches the app
- else if(it.startsWith("\"%JAVA_EXE%\" %DEFAULT_JVM_OPTS%")){
- return "start \"\" /b " + it
- }
- else if (it.startsWith("set DEFAULT_JVM_OPTS="))
- {
- return it+" -Dlog4j.skipJansi=false"
- }
- else if(it.startsWith(":init"))
- {
- //HACK
- return it+"\n"+"set VLC_PLUGIN_PATH=%APP_HOME%\\lib\\vlcbinaries\\plugins"
- }
- // Leave the line unchanged
- else{
- return it
- }
- }
-
- modifyFile(linuxStartScript) {
- if (it.startsWith("DEFAULT_JVM_OPTS=\"\""))
- {
- return "DEFAULT_JVM_OPTS=\"-Dlog4j.skipJansi=false\""
- }
- // Leave the line unchanged
- else{
- return it
- }
- }
-
- modifyFile(winStartScriptCopy) {
- if(it.startsWith(":init"))
- {
- //HACK
- return it+"\n"+"set VLC_PLUGIN_PATH=%APP_HOME%\\lib\\vlcbinaries\\plugins"
- }
- else if (it.startsWith("set DEFAULT_JVM_OPTS="))
- {
- return it+" -Dlog4j.skipJansi=false"
- }
- // Leave the line unchanged
- else{
- return it
- }
- }
- }
- }
- distZip {
- // Include the additional start script
- into(project.name+"-"+project.version+"/bin/"){
- from(startScripts.outputDir)
- include '*c.bat'
- }
- }
- compileJava.options.encoding = 'UTF-8'
- dependencies
- {
- compile fileTree(dir: 'lib', include: '*.jar')
- compile (project(path: ':iZpl', configuration: 'apistub')){
- transitive = false
-
- // HACK for the light-mode standalone
- }
- compile(project(':ToolKit')) {
- transitive = false
- }
- compile(project(':izpl-shared')){
- transitive = false
- }
-
- compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.+'
- compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.+'
- compile group: 'org.apache.logging.log4j', name: 'log4j-iostreams', version: '2.+'
- compile group: 'org.apache.logging.log4j', name: 'log4j-slf4j-impl', version: '2.+'
- compile group: 'org.apache.logging.log4j', name: 'log4j-jul', version: '2.+'
- compile "org.yaml:snakeyaml:1.14"
- }
|