123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124 |
- group = "llh.svs"
- version = rootProject.version
- 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 = "llh.svs.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", configuration = "lib"))
- 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("org.jetbrains.kotlinx:kotlinx-coroutines-reactive")
- implementation("com.alibaba:fastjson")
- implementation("net.sourceforge.jexcelapi:jxl")
- implementation("javax.validation:validation-api")
- runtimeOnly("org.hibernate.validator:hibernate-validator")
- testImplementation("org.springframework.boot:spring-boot-starter-test")
- testImplementation("junit", "junit", "4.12")
- }
- dependencyManagement {
- imports {
- mavenBom("org.springframework.cloud:spring-cloud-dependencies:${property("springCloudVersion")}")
- }
- }
- tasks {
- processResources {
- filesMatching("application.yml") {
- expand(project.properties)
- }
- }
- }
- tasks.register<Jar>(name = "libJar") {
- archiveBaseName.set("svs-${project.name}-lib")
- from(sourceSets["main"].output)
- include("llh/svs/**", "META-INF/**")
- 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-system" }) {
- dependencies {
- implementation("org.springframework.boot:spring-boot-starter-data-jpa")
- runtimeOnly("mysql:mysql-connector-java")
- }
- }
- project("service-system") {
- dependencies {
- implementation("com.github.oshi:oshi-core:6.1.4")
- implementation(project(path = ":services:service-task", configuration = "lib"))
- implementation(project(path = ":services:service-schedule", configuration = "lib"))
- }
- }
- tasks.jar {
- archiveBaseName.set("svs-core-${project.name}")
- configure(subprojects) {
- from(tasks.withType<JavaCompile>())
- from(tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>())
- include("llh/**")
- 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 = "svs-core-${project.name}"
- from(components["java"])
- }
- }
- }
|