build.gradle 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. apply plugin: 'java'
  2. apply plugin: 'eclipse'
  3. apply plugin: 'application'
  4. // compiler options
  5. sourceCompatibility = JavaVersion.VERSION_1_8
  6. targetCompatibility = JavaVersion.VERSION_1_8
  7. mainClassName = 'app.UndertowMain'
  8. repositories {
  9. mavenCentral()
  10. //snapshot repository - not actually needed to run this example
  11. maven {
  12. url 'http://oss.sonatype.org/content/repositories/snapshots'
  13. }
  14. }
  15. dependencies {
  16. // Framework
  17. compile 'net.javapla.jawn:jawn-server-undertow:0.8.7-SNAPSHOT'
  18. //compile project(':jawn-server'), project(':jawn-server-undertow'), project(':jawn-server-jetty')
  19. // Database
  20. compile 'mysql:mysql-connector-java:5.1.35'
  21. //Logging
  22. runtime group: 'ch.qos.logback', name: 'logback-classic', version: '1.1.3' exclude group: 'org.slf4j'
  23. }
  24. /* ****************** */
  25. /* Application */
  26. /* ****************** */
  27. run {
  28. if(project.hasProperty('args')){
  29. args project.args.split(',')
  30. }
  31. }
  32. applicationDistribution.from("webapp") {
  33. into "webapp"
  34. }
  35. /* ****************** */
  36. /* Eclipse */
  37. /* ****************** */
  38. eclipse {
  39. classpath {
  40. // we need the output dir to be the same as the one gradle uses when running Jetty
  41. // or else the dynamic loading does not apply
  42. defaultOutputDir = file('build/classes/main')
  43. }
  44. }