build.gradle 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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. project(":connector-module-senslog1") {
  66. dependencies {
  67. compile group: 'org.jdbi', name: 'jdbi3-core', version: '3.17.0'
  68. compile group: 'org.postgresql', name: 'postgresql', version: '42.1.4'
  69. }
  70. }
  71. // settings for all 'connector-module-*'
  72. configure(moduleNames) {
  73. dependencies {
  74. compile project(":connector-core")
  75. compile project(":connector-model")
  76. compile group: 'io.vertx', name: 'vertx-core', version: '3.9.1'
  77. }
  78. }