build.gradle 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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 '2.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: 'cz.senslog', name: 'common', version: '1.0.0'
  28. }
  29. // create fat JAR
  30. jar {
  31. manifest {
  32. attributes "Main-Class": "$mainClassName"
  33. }
  34. from {
  35. configurations.runtimeClasspath.collect {
  36. it.isDirectory() ? it : zipTree(it)
  37. }
  38. }
  39. }
  40. }
  41. // settings for all modules
  42. subprojects {
  43. buildDir = '../bin'
  44. }
  45. project("connector-app") {
  46. dependencies {
  47. compile project(":connector-core")
  48. compile group: 'com.beust', name: 'jcommander', version: '1.78'
  49. }
  50. }
  51. project(":connector-core") {
  52. dependencies {
  53. compile group: 'io.vertx', name: 'vertx-core', version: '3.9.1'
  54. compile group: 'io.vertx', name: 'vertx-web', version: '3.9.1'
  55. }
  56. }
  57. project(":connector-model") {
  58. dependencies {
  59. compile group: 'io.vertx', name: 'vertx-core', version: '3.9.1'
  60. }
  61. }
  62. // settings for all 'connector-module-*'
  63. configure(moduleNames) {
  64. dependencies {
  65. compile project(":connector-core")
  66. compile project(":connector-model")
  67. compile group: 'io.vertx', name: 'vertx-core', version: '3.9.1'
  68. }
  69. }