1
0

build.gradle 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. evaluationDependsOn(':iZplPlugins:GameRadio')
  2. evaluationDependsOn(':iZplPlugins:WMP')
  3. evaluationDependsOn(':iZplPlugins:Editor')
  4. evaluationDependsOn(':iZplPlugins:rtsslink')
  5. evaluationDependsOn(':iZplPlugins:JukeBox')
  6. defaultTasks 'distZip'
  7. apply plugin: 'java'
  8. apply plugin: 'application'
  9. apply from: "$rootDir/utils/IO.gradle"
  10. version = '0.9.0.0-snapshot'
  11. mainClassName = 'de.nplusc.izc.iZpl.Main'
  12. //'de.nplusc.izc.iZpl.Main'
  13. jar{
  14. manifest{
  15. attributes 'Implementation-Title': 'iZPlaylist',
  16. 'Implementation-Version': version,
  17. 'Main-Class': 'de.nplusc.izc.iZpl.Main'
  18. }
  19. }
  20. startScripts << {
  21. def startScriptDir = outputDir.getAbsolutePath()
  22. def winStartScript = startScriptDir + "/" + applicationName + ".bat"
  23. def winStartScriptCopy = startScriptDir + "/" + applicationName + "c.bat"
  24. def overwriteExistingFile = true
  25. copyFile(winStartScript, winStartScriptCopy, overwriteExistingFile)
  26. //:init
  27. modifyFile(winStartScript) {
  28. // javaw.exe doesn't have a console
  29. if(it.contains("java.exe")){
  30. return it.replace("java.exe", "javaw.exe")
  31. }
  32. // Command that launches the app
  33. else if(it.startsWith("\"%JAVA_EXE%\" %DEFAULT_JVM_OPTS%")){
  34. return "start \"\" /b " + it
  35. }
  36. else if(it.startsWith(":init"))
  37. {
  38. //HACK
  39. return it+"\n"+"set VLC_PLUGIN_PATH=%APP_HOME%\\lib\\vlcbinaries\\plugins"
  40. }
  41. // Leave the line unchanged
  42. else{
  43. return it
  44. }
  45. }
  46. modifyFile(winStartScriptCopy) {
  47. if(it.startsWith(":init"))
  48. {
  49. //HACK
  50. return it+"\n"+"set VLC_PLUGIN_PATH=%APP_HOME%\\lib\\vlcbinaries\\plugins"
  51. }
  52. // Leave the line unchanged
  53. else{
  54. return it
  55. }
  56. }
  57. }
  58. distZip {
  59. // Include the additional start script
  60. into(project.name+"-"+project.version+"/bin/"){
  61. from(startScripts.outputDir)
  62. include '*c.bat'
  63. }
  64. into(project.name+"-"+project.version+"/plugins/"){
  65. from project(':iZplPlugins:GameRadio').jar
  66. from project(':iZplPlugins:WMP').jar
  67. from project(':iZplPlugins:Editor').jar
  68. from project(':iZplPlugins:rtsslink').jar
  69. from project(':iZplPlugins:JukeBox').jar
  70. }
  71. }
  72. sourceSets{
  73. main{
  74. resources{
  75. exclude '**/*.xcf'
  76. }
  77. }
  78. }
  79. dependencies{
  80. compile fileTree(dir: 'lib', include: '*.jar')
  81. compile "net.rubygrapefruit:native-platform:0.9"
  82. compile "commons-io:commons-io:2.+"
  83. compile 'org.apache.commons:commons-exec:1.3'
  84. compile "org.yaml:snakeyaml:1.14"
  85. compile "commons-net:commons-net:3.3"
  86. compile 'uk.co.caprica:vlcj:+'
  87. compile 'com.googlecode.mp4parser:isoparser:1.0-RC-1'
  88. compile 'de.schlichtherle.truezip:truezip-file:7.7.7'
  89. compile 'de.schlichtherle.truezip:truezip-driver-zip:7.7.7'
  90. compile 'de.schlichtherle.truezip:truezip-driver-file:7.7.7'
  91. compile 'de.schlichtherle.truezip:truezip-driver-tar:7.7.7'
  92. compile 'de.schlichtherle.truezip:truezip-kernel:7.7.7'
  93. compile 'de.schlichtherle.truezip:truezip-path:7.7.7'
  94. compile 'de.schlichtherle.truezip:truezip-driver-tzp:7.7.7'
  95. compile 'de.schlichtherle.truezip:truezip-driver-http:7.7.7'
  96. compile 'commons-cli:commons-cli:1.3'
  97. compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.1'
  98. compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.1'
  99. compile group: 'org.apache.logging.log4j', name: 'log4j-iostreams', version: '2.1'
  100. compile group: 'org.apache.logging.log4j', name: 'log4j-slf4j-impl', version: '2.1'
  101. compile 'org.fusesource.jansi:jansi:1.11'
  102. compile 'org.jgrapht:jgrapht-core:0.9.0'
  103. compile(project(':ToolKit')) {
  104. transitive = false
  105. }
  106. compile(project(':izpl-shared')) {
  107. transitive = false
  108. }
  109. }