plugins { id 'application' } mainClassName = 'io.connector.Main' buildDir = 'bin' def moduleNames = subprojects.findAll { it.name.startsWith("connector-module-") } dependencies { compile project(":connector-app") } // create fat JAR jar { manifest { attributes "Main-Class": "$mainClassName" } from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } } } // setting for all projects allprojects { // set that all projects are Java projects apply plugin: 'java' group 'io.connector' version '1.0' repositories { mavenLocal() mavenCentral() } java { sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 } dependencies { compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.12.0' compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.12.0' // compile fileTree(include: ['*.jar'], dir: 'drivers') testCompile group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.8.0-M1' } test { useJUnitPlatform() } task unitTest(type: Test) { description = 'Runs JUnit tests.' useJUnitPlatform { excludeTags 'integration' } } task integrationTest(type: Test) { description = 'Runs integration tests.' useJUnitPlatform { includeTags 'integration' } } } // settings for all modules subprojects { buildDir = '../bin' } project("connector-app") { dependencies { compile project(":connector-core") compile group: 'com.beust', name: 'jcommander', version: '1.78' } } project(":connector-core") { dependencies { compile group: 'io.vertx', name: 'vertx-core', version: '3.9.1' compile group: 'io.vertx', name: 'vertx-web', version: '3.9.1' compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.9' compile group: 'org.yaml', name: 'snakeyaml', version: '1.24' } } project(":connector-model") { dependencies { compile group: 'io.vertx', name: 'vertx-core', version: '3.9.1' } } // settings for all 'connector-module-*' configure(moduleNames) { dependencies { compile project(":connector-core") compile project(":connector-model") compile group: 'io.vertx', name: 'vertx-core', version: '3.9.1' } } // settings for each project project(":connector-module-senslog1") { dependencies { compile group: 'org.jdbi', name: 'jdbi3-core', version: '3.18.0' // compile group: 'org.jdbi', name: 'jdbi3-postgres', version: '3.18.0' compile group: 'org.postgresql', name: 'postgresql', version: '42.2.19' } }