build.gradle 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. defaultTasks 'distZip'
  2. apply plugin: 'java'
  3. apply plugin: 'application'
  4. apply from: "$rootDir/utils/IO.gradle"
  5. version = 'SNAPSHOT'
  6. mainClassName = 'de.nplusc.izc.iZpl.Main'
  7. //'de.nplusc.izc.iZpl.Main'
  8. jar{
  9. manifest{
  10. attributes 'Implementation-Title': 'iZPlaylist',
  11. 'Implementation-Version': 'SNAPSHOT',
  12. 'Main-Class': 'de.nplusc.izc.iZpl.Main'
  13. }
  14. }
  15. startScripts << {
  16. def startScriptDir = outputDir.getAbsolutePath()
  17. def winStartScript = startScriptDir + "/" + applicationName + ".bat"
  18. def winStartScriptCopy = startScriptDir + "/" + applicationName + "dbg.bat"
  19. def overwriteExistingFile = true
  20. copyFile(winStartScript, winStartScriptCopy, overwriteExistingFile)
  21. modifyFile(winStartScript) {
  22. // javaw.exe doesn't have a console
  23. if(it.contains("java.exe")){
  24. return it.replace("java.exe", "javaw.exe")
  25. }
  26. // Command that launches the app
  27. else if(it.startsWith("\"%JAVA_EXE%\" %DEFAULT_JVM_OPTS%")){
  28. return "start \"\" /b " + it
  29. }
  30. // Leave the line unchanged
  31. else{
  32. return it
  33. }
  34. }
  35. }
  36. distZip {
  37. // Include the additional start script
  38. into(project.name+"-"+project.version+"/bin/"){
  39. from(startScripts.outputDir)
  40. include '*dbg.bat'
  41. }
  42. }
  43. sourceSets{
  44. main{
  45. resources{
  46. exclude '**/*.xcf'
  47. }
  48. }
  49. }
  50. dependencies{
  51. compile fileTree(dir: 'lib', include: '*.jar')
  52. compile "net.rubygrapefruit:native-platform:0.9"
  53. compile "commons-io:commons-io:2.+"
  54. compile 'org.apache.commons:commons-exec:1.3'
  55. compile "org.yaml:snakeyaml:1.14"
  56. compile "commons-net:commons-net:3.3"
  57. compile 'uk.co.caprica:vlcj:3.0.1'
  58. compile 'com.googlecode.mp4parser:isoparser:1.0-RC-1'
  59. compile 'de.schlichtherle.truezip:truezip-file:7.7.7'
  60. compile 'de.schlichtherle.truezip:truezip-driver-zip:7.7.7'
  61. compile 'de.schlichtherle.truezip:truezip-driver-file:7.7.7'
  62. compile 'de.schlichtherle.truezip:truezip-driver-tar:7.7.7'
  63. compile 'de.schlichtherle.truezip:truezip-kernel:7.7.7'
  64. compile 'de.schlichtherle.truezip:truezip-path:7.7.7'
  65. compile 'de.schlichtherle.truezip:truezip-driver-tzp:7.7.7'
  66. compile 'de.schlichtherle.truezip:truezip-driver-http:7.7.7'
  67. compile 'commons-cli:commons-cli:1.3-SNAPSHOT'
  68. compile(project(':ToolKit')) {
  69. transitive = false
  70. }
  71. }