build.gradle 3.7 KB

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