apply plugin:'java' apply plugin: 'application' apply from: "$rootDir/utils/IO.gradle" version = '0.10.2.0' 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.11.1' compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.11.1' compile group: 'org.apache.logging.log4j', name: 'log4j-iostreams', version: '2.11.1' compile group: 'org.apache.logging.log4j', name: 'log4j-slf4j-impl', version: '2.11.1' compile group: 'org.apache.logging.log4j', name: 'log4j-jul', version: '2.11.1' compile "org.yaml:snakeyaml:1.14" }