build.gradle 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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. sourceCompatibility = 1.8
  15. // set that all projects are Java projects
  16. apply plugin: 'java'
  17. group 'io.connector'
  18. version '2.0'
  19. repositories {
  20. mavenLocal()
  21. mavenCentral()
  22. }
  23. dependencies {
  24. compile group: 'cz.senslog', name: 'common', version: '1.0.0'
  25. }
  26. // create fat JAR
  27. jar {
  28. manifest {
  29. attributes "Main-Class": "$mainClassName"
  30. }
  31. from {
  32. configurations.runtimeClasspath.collect {
  33. it.isDirectory() ? it : zipTree(it)
  34. }
  35. }
  36. }
  37. }
  38. // settings for all modules
  39. subprojects {
  40. buildDir = '../bin'
  41. }
  42. project("connector-app") {
  43. dependencies {
  44. compile project(":connector-core")
  45. compile group: 'com.beust', name: 'jcommander', version: '1.78'
  46. }
  47. }
  48. project(":connector-core") {
  49. dependencies {
  50. compile group: 'io.vertx', name: 'vertx-core', version: '3.9.1'
  51. compile group: 'io.vertx', name: 'vertx-web', version: '3.9.1'
  52. }
  53. }
  54. project(":connector-model") {
  55. dependencies {
  56. compile group: 'io.vertx', name: 'vertx-core', version: '3.9.1'
  57. }
  58. }
  59. // settings for all 'connector-module-*'
  60. configure(moduleNames) {
  61. dependencies {
  62. compile project(":connector-core")
  63. compile project(":connector-model")
  64. compile group: 'io.vertx', name: 'vertx-core', version: '3.9.1'
  65. }
  66. }