build.gradle 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. // Capsule plugin
  2. plugins {
  3. id "us.kirchmeier.capsule" version "1.0.0"
  4. }
  5. apply plugin: 'java'
  6. sourceCompatibility = 1.8
  7. targetCompatibility = 1.8
  8. version = '1.0'
  9. ext.jacksonVer = '2.5.4'
  10. ext.quasarVer = '0.7.3'
  11. ext.comsatVer = '0.5.0'
  12. [compileJava, compileTestJava]*.options*.encoding = "UTF-8"
  13. repositories {
  14. // mavenLocal()
  15. mavenCentral()
  16. }
  17. configurations {
  18. quasar
  19. }
  20. configurations.capsule.dependencies.clear()
  21. dependencies {
  22. compile "co.paralleluniverse:quasar-core:$quasarVer:jdk8"
  23. compile "com.fasterxml.jackson.core:jackson-databind:$jacksonVer"
  24. compile "co.paralleluniverse:comsat-actors-api:$comsatVer"
  25. compile "co.paralleluniverse:comsat-actors-servlet:$comsatVer"
  26. compile "co.paralleluniverse:comsat-actors-undertow:$comsatVer"
  27. compile "co.paralleluniverse:comsat-actors-netty:$comsatVer"
  28. compile "co.paralleluniverse:comsat-test-utils:$comsatVer"
  29. capsule "co.paralleluniverse:capsule:1.0"
  30. quasar "co.paralleluniverse:quasar-core:$quasarVer:jdk8"
  31. }
  32. task capsule(type: FatCapsule) {
  33. applicationClass "servers.Main"
  34. capsuleManifest {
  35. javaAgents = [configurations.quasar.iterator().next().getName()]
  36. mode('undertow') {
  37. systemProperties['serverClass'] = 'servers.UndertowServer'
  38. }
  39. mode('netty') {
  40. systemProperties['serverClass'] = 'servers.NettyServer'
  41. }
  42. mode('servlet-undertow') {
  43. systemProperties['serverClass'] = 'servers.ServletServer'
  44. systemProperties['servletServerClass'] = 'co.paralleluniverse.embedded.containers.UndertowServer'
  45. }
  46. mode('servlet-jetty') {
  47. systemProperties['serverClass'] = 'servers.ServletServer'
  48. systemProperties['servletServerClass'] = 'co.paralleluniverse.embedded.containers.JettyServer'
  49. }
  50. mode('servlet-tomcat') {
  51. systemProperties['serverClass'] = 'servers.ServletServer'
  52. systemProperties['servletServerClass'] = 'co.paralleluniverse.embedded.containers.TomcatServer'
  53. }
  54. }
  55. }
  56. task wrapper(type: Wrapper) {
  57. gradleVersion = '2.7'
  58. }