build.gradle 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. apply plugin: "java"
  2. sourceCompatibility = 11
  3. sourceSets.main.java.srcDirs = [ "src/" ]
  4. sourceSets.main.resources.srcDirs = ["../core/assets"]
  5. project.ext.mainClassName = "de.bremen.desktop.DesktopLauncher"
  6. project.ext.assetsDir = new File("../core/assets")
  7. project.ext {
  8. visuiVersion = '1.4.2'
  9. }
  10. task run(dependsOn: classes, type: JavaExec) {
  11. main = project.mainClassName
  12. classpath = sourceSets.main.runtimeClasspath
  13. standardInput = System.in
  14. workingDir = project.assetsDir
  15. ignoreExitValue = true
  16. }
  17. task debug(dependsOn: classes, type: JavaExec) {
  18. main = project.mainClassName
  19. classpath = sourceSets.main.runtimeClasspath
  20. standardInput = System.in
  21. workingDir = project.assetsDir
  22. ignoreExitValue = true
  23. debug = true
  24. }
  25. task dist(type: Jar) {
  26. manifest {
  27. attributes 'Main-Class': project.mainClassName
  28. }
  29. dependsOn configurations.runtimeClasspath
  30. from {
  31. configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
  32. }
  33. with jar
  34. }
  35. dist.dependsOn classes
  36. eclipse.project.name = appName + "-desktop"