123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252 |
- 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<Jar>(name = "libJar") {
- archiveBaseName.set("xms-${project.name}-lib")
- // from(project.the<SourceSetContainer>()["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<JavaCompile>())
- from(tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>())
- include("jit/**")
- exclude {
- it.name.endsWith("Application.class")
- }
- exclude {
- it.name.endsWith("ApplicationKt.class")
- }
- exclude {
- it.name.endsWith("Application${'$'}Companion.class")
- }
- }
- }
- publishing {
- publications {
- create<MavenPublication>("maven") {
- artifactId = "xms-core-${project.name}"
- from(components["java"])
- }
- }
- }
|