123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156 |
- evaluationDependsOn(':iZplPlugins:GameRadio')
- evaluationDependsOn(':iZplPlugins:WMP')
- evaluationDependsOn(':iZplPlugins:Editor')
- evaluationDependsOn(':iZplPlugins:rtsslink')
- evaluationDependsOn(':iZplPlugins:JukeBox')
- evaluationDependsOn(':iZplPlugins:Extractor')
- evaluationDependsOn(':iZplPlugins:discordjukebox')
- defaultTasks 'distZip'
- apply plugin: 'java'
- apply plugin: 'application'
- apply from: "$rootDir/utils/IO.gradle"
- version = '0.11.0.0-SNAPSHOT'
- mainClassName = 'de.nplusc.izc.iZpl.Main'
- //'de.nplusc.izc.iZpl.Main'
- jar{
- manifest{
- attributes 'Implementation-Title': 'iZPlaylist',
- 'Implementation-Version': version,
- 'Main-Class': 'de.nplusc.izc.iZpl.Main'
-
- }
- }
- 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'
- }
- into(project.name+"-"+project.version+"/plugins/"){
- from project(':iZplPlugins:GameRadio').jar
- from project(':iZplPlugins:WMP').jar
- from project(':iZplPlugins:Editor').jar
- from project(':iZplPlugins:rtsslink').jar
- from project(':iZplPlugins:JukeBox').jar
- from project(':iZplPlugins:Extractor').jar
- from project(':iZplPlugins:discordjukebox').jar
- }
- }
- task apiJar(type: Jar, dependsOn: compileJava) {
- baseName = project.name + '-apistub'
- from sourceSets.main.output
- include '**/iZpl/API/*'
- }
- sourceSets{
- main{
- resources{
- exclude '**/*.xcf'
- }
- }
- }
- dependencies{
- compile fileTree(dir: 'lib', include: '*.jar')
- compile "net.rubygrapefruit:native-platform:0.9"
- compile "commons-io:commons-io:2.+"
- compile 'org.apache.commons:commons-exec:1.3'
- compile "org.yaml:snakeyaml:1.14"
- compile "commons-net:commons-net:3.3"
- compile 'uk.co.caprica:vlcj:4+'
- compile 'com.googlecode.mp4parser:isoparser:1.0-RC-1'
- compile 'net.java.truevfs:truevfs-profile-default_2.11:0.12.0'
- compile 'commons-cli:commons-cli:1.3'
- 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.fusesource.jansi:jansi:1.11'
- compile 'org.jgrapht:jgrapht-core:0.9.0'
- compile(project(':external:java-progressbar'))
-
- compile(project(':ToolKit')) {
- transitive = false
- }
- compile(project(':izpl-shared'))
- }
- configurations {
- apistub
- }
- artifacts {
- apistub apiJar
- }
|