build.gradle 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. plugins {
  2. id 'application'
  3. }
  4. mainClassName = 'io.connector.Main'
  5. buildDir = 'bin'
  6. def moduleNames = subprojects.findAll {
  7. it.name.startsWith("connector-module-")
  8. }
  9. dependencies {
  10. compile project(":connector-app")
  11. }
  12. // setting for all projects
  13. allprojects {
  14. // set that all projects are Java projects
  15. apply plugin: 'java'
  16. group 'io.connector'
  17. version '1.0'
  18. repositories {
  19. mavenLocal()
  20. mavenCentral()
  21. }
  22. java {
  23. sourceCompatibility = JavaVersion.VERSION_1_8
  24. targetCompatibility = JavaVersion.VERSION_1_8
  25. }
  26. dependencies {
  27. compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.12.0'
  28. compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.12.0'
  29. }
  30. // create fat JAR
  31. jar {
  32. manifest {
  33. attributes "Main-Class": "$mainClassName"
  34. }
  35. from {
  36. configurations.runtimeClasspath.collect {
  37. it.isDirectory() ? it : zipTree(it)
  38. }
  39. }
  40. }
  41. }
  42. // settings for all modules
  43. subprojects {
  44. buildDir = '../bin'
  45. }
  46. project("connector-app") {
  47. dependencies {
  48. compile project(":connector-core")
  49. compile group: 'com.beust', name: 'jcommander', version: '1.78'
  50. }
  51. }
  52. project(":connector-core") {
  53. dependencies {
  54. compile group: 'io.vertx', name: 'vertx-core', version: '3.9.1'
  55. compile group: 'io.vertx', name: 'vertx-web', version: '3.9.1'
  56. compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.9'
  57. compile group: 'org.yaml', name: 'snakeyaml', version: '1.24'
  58. }
  59. }
  60. project(":connector-model") {
  61. dependencies {
  62. compile group: 'io.vertx', name: 'vertx-core', version: '3.9.1'
  63. }
  64. }
  65. // settings for all 'connector-module-*'
  66. configure(moduleNames) {
  67. dependencies {
  68. compile project(":connector-core")
  69. compile project(":connector-model")
  70. compile group: 'io.vertx', name: 'vertx-core', version: '3.9.1'
  71. }
  72. }