build.gradle 3.6 KB

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