group = "jit.xms" version = rootProject.version // val databasePlatform: String by project val dbUser: String by project plugins { id("java") id("maven-publish") id("io.spring.dependency-management") kotlin("jvm") kotlin("plugin.spring") kotlin("plugin.jpa") } subprojects { group = "jit.xms.services" version = rootProject.version apply(plugin = "java") apply(plugin = "org.springframework.boot") apply(plugin = "io.spring.dependency-management") apply(plugin = "org.jetbrains.kotlin.jvm") apply(plugin = "org.jetbrains.kotlin.plugin.spring") apply(plugin = "org.jetbrains.kotlin.plugin.jpa") dependencies { api(platform(project(":platform"))) implementation(project(path = ":shared")) implementation(kotlin("reflect")) implementation(kotlin("stdlib-jdk8")) implementation("org.springframework.boot:spring-boot-starter-webflux") implementation("com.fasterxml.jackson.module:jackson-module-kotlin") implementation("org.springframework.cloud:spring-cloud-starter-openfeign") implementation("org.springframework.boot:spring-boot-configuration-processor") implementation("cc-lotus.gaf3:gaf-core-shared") implementation("cc-lotus.gaf3:gaf-core-services") implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core") implementation("com.alibaba:fastjson") implementation("net.sourceforge.jexcelapi:jxl") implementation("javax.validation:validation-api") implementation("org.mongodb:bson") runtimeOnly("org.hibernate.validator:hibernate-validator") testImplementation("org.springframework.boot:spring-boot-starter-test") // testImplementation("io.projectreactor:reactor-test") testImplementation("junit", "junit", "4.12") } dependencyManagement { imports { mavenBom("org.springframework.cloud:spring-cloud-dependencies:${property("springCloudVersion")}") } } tasks { processResources { // expand("db.user" to dbUser) filesMatching("application.yml") { expand(project.properties) } } } tasks.register(name = "libJar") { archiveBaseName.set("xms-${project.name}-lib") // from(project.the()["main"].output) from(sourceSets["main"].output) include("jit/xms/**") exclude { it.name.endsWith("Application.class") } exclude { it.name.endsWith("ApplicationKt.class") } } tasks.build { dependsOn(tasks.named("libJar")) } configurations { create("lib") } artifacts { add("lib", tasks["libJar"]) } } configure(subprojects.filter { it.name != "service-api" && it.name != "service-util" }) { dependencies { implementation("org.springframework.boot:spring-boot-starter-data-jpa") runtimeOnly("mysql:mysql-connector-java") } } project("service-all") { dependencies { implementation(project(path = ":services:service-app", configuration = "lib")) implementation(project(path = ":services:service-app-res", configuration = "lib")) implementation(project(path = ":services:service-app-role", configuration = "lib")) implementation(project(path = ":services:service-user", configuration = "lib")) implementation(project(path = ":services:service-user-acct", configuration = "lib")) implementation(project(path = ":services:service-user-cert", configuration = "lib")) implementation(project(path = ":services:service-user-cred", configuration = "lib")) implementation(project(path = ":services:service-user-group", configuration = "lib")) implementation(project(path = ":services:service-user-org", configuration = "lib")) implementation(project(path = ":services:service-bind", configuration = "lib")) implementation(project(path = ":services:service-bff", configuration = "lib")) implementation(project(path = ":services:service-app-policy", configuration = "lib")) implementation(project(path = ":services:service-user-register", configuration = "lib")) implementation(project(path = ":services:service-device", configuration = "lib")) implementation(project(path = ":services:service-task", configuration = "lib")) implementation(project(path = ":services:service-sync", configuration = "lib")) implementation(project(path = ":services:service-util", configuration = "lib")) implementation(project(path = ":services:service-file", configuration = "lib")) implementation(fileTree("$rootDir/libs") { include("xms-auth-util-*.jar", "xms-multi-factor-api-*.jar") }) implementation(project(path = ":services:service-user-rule", configuration = "lib")) } } project("service-bind") { dependencies { implementation(project(path = ":services:service-user", configuration = "lib")) implementation(project(path = ":services:service-user-org", configuration = "lib")) implementation(project(path = ":services:service-user-group", configuration = "lib")) implementation(project(path = ":services:service-user-acct", configuration = "lib")) implementation(project(path = ":services:service-user-cred", configuration = "lib")) implementation(project(path = ":services:service-user-cert", configuration = "lib")) implementation(project(path = ":services:service-app", configuration = "lib")) implementation(project(path = ":services:service-app-res", configuration = "lib")) implementation(project(path = ":services:service-app-role", configuration = "lib")) } } project("service-bff") { dependencies { implementation(project(path = ":services:service-bind", configuration = "lib")) implementation(project(path = ":services:service-user", configuration = "lib")) implementation(project(path = ":services:service-user-org", configuration = "lib")) implementation(project(path = ":services:service-user-group", configuration = "lib")) implementation(project(path = ":services:service-user-acct", configuration = "lib")) implementation(project(path = ":services:service-user-cred", configuration = "lib")) implementation(project(path = ":services:service-app", configuration = "lib")) implementation(project(path = ":services:service-app-res", configuration = "lib")) implementation(project(path = ":services:service-app-role", configuration = "lib")) implementation(project(path = ":services:service-user-cert", configuration = "lib")) implementation(project(path = ":services:service-user-register", configuration = "lib")) implementation(project(path = ":services:service-app-policy", configuration = "lib")) implementation(project(path = ":services:service-device", configuration = "lib")) implementation(project(path = ":services:service-user-rule", configuration = "lib")) implementation(project(path = ":services:service-terminal", configuration = "lib")) } } project("service-user-acct") { dependencies { implementation(project(path = ":services:service-user", configuration = "lib")) } } project("service-user-cert") { dependencies { implementation(project(path = ":services:service-user", configuration = "lib")) } } project("service-user-cred") { dependencies { implementation(project(path = ":services:service-user", configuration = "lib")) } } project("service-app-res") { dependencies { implementation(project(path = ":services:service-app", configuration = "lib")) } } project("service-app-role") { dependencies { implementation(project(path = ":services:service-app", configuration = "lib")) } } project("service-app-policy") { dependencies { implementation(project(path = ":services:service-app", configuration = "lib")) } } project("service-user-register") { dependencies { implementation(project(path = ":services:service-user", configuration = "lib")) implementation(project(path = ":services:service-user-acct", configuration = "lib")) implementation(project(path = ":services:service-user-cred", configuration = "lib")) implementation(project(path = ":services:service-user-org", configuration = "lib")) implementation(project(path = ":services:service-bind", configuration = "lib")) implementation(project(path = ":services:service-file", configuration = "lib")) } } project("service-user") { dependencies { implementation(project(path = ":services:service-file", configuration = "lib")) } } // data-sync configure configure(listOf( project("service-user"), project("service-user-acct"), project("service-user-cert"), project("service-user-acct"), project("service-user-cred"), project("service-user-group"), project("service-user-org"), project("service-user-rule"), project("service-app"), project("service-app-policy"), project("service-app-res"), project("service-app-role"), project("service-device"), project("service-bind"), project("service-file") )) { dependencies { implementation(project(path = ":services:service-sync", configuration = "lib")) } } tasks.jar { archiveBaseName.set("xms-core-${project.name}") configure(subprojects.filter{ it.name != "service-graphql" }) { from(tasks.withType()) from(tasks.withType()) include("jit/**") exclude { it.name.endsWith("Application.class") } exclude { it.name.endsWith("ApplicationKt.class") } exclude { it.name.endsWith("Application${'$'}Companion.class") } } } publishing { publications { create("maven") { artifactId = "xms-core-${project.name}" from(components["java"]) } } }