build.gradle 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  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. // create fat JAR
  13. jar {
  14. manifest {
  15. attributes "Main-Class": "$mainClassName"
  16. }
  17. from {
  18. configurations.runtimeClasspath.collect {
  19. it.isDirectory() ? it : zipTree(it)
  20. }
  21. }
  22. }
  23. // setting for all projects
  24. allprojects {
  25. // set that all projects are Java projects
  26. apply plugin: 'java'
  27. group 'io.connector'
  28. version '1.0'
  29. repositories {
  30. mavenLocal()
  31. mavenCentral()
  32. }
  33. java {
  34. sourceCompatibility = JavaVersion.VERSION_1_8
  35. targetCompatibility = JavaVersion.VERSION_1_8
  36. }
  37. dependencies {
  38. compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.12.0'
  39. compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.12.0'
  40. // compile fileTree(include: ['*.jar'], dir: 'drivers')
  41. testCompile group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.8.0-M1'
  42. }
  43. test {
  44. useJUnitPlatform()
  45. }
  46. task unitTest(type: Test) {
  47. description = 'Runs JUnit tests.'
  48. useJUnitPlatform {
  49. excludeTags 'integration'
  50. }
  51. }
  52. task integrationTest(type: Test) {
  53. description = 'Runs integration tests.'
  54. useJUnitPlatform {
  55. includeTags 'integration'
  56. }
  57. }
  58. }
  59. // settings for all modules
  60. subprojects {
  61. buildDir = '../bin'
  62. }
  63. project("connector-app") {
  64. dependencies {
  65. compile project(":connector-core")
  66. compile group: 'com.beust', name: 'jcommander', version: '1.78'
  67. }
  68. }
  69. project(":connector-core") {
  70. dependencies {
  71. compile group: 'io.vertx', name: 'vertx-core', version: '3.9.1'
  72. compile group: 'io.vertx', name: 'vertx-web', version: '3.9.1'
  73. compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.9'
  74. compile group: 'org.yaml', name: 'snakeyaml', version: '1.24'
  75. }
  76. }
  77. project(":connector-model") {
  78. dependencies {
  79. compile group: 'io.vertx', name: 'vertx-core', version: '3.9.1'
  80. }
  81. }
  82. // settings for all 'connector-module-*'
  83. configure(moduleNames) {
  84. dependencies {
  85. compile project(":connector-core")
  86. compile project(":connector-model")
  87. compile group: 'io.vertx', name: 'vertx-core', version: '3.9.1'
  88. }
  89. }
  90. // settings for each project
  91. project(":connector-module-senslog1") {
  92. dependencies {
  93. compile group: 'org.jdbi', name: 'jdbi3-core', version: '3.18.0'
  94. // compile group: 'org.jdbi', name: 'jdbi3-postgres', version: '3.18.0'
  95. compile group: 'org.postgresql', name: 'postgresql', version: '42.2.19'
  96. }
  97. }