import org.springframework.boot.gradle.tasks.bundling.BootJar group = "cc-lotus.gaf3" version = rootProject.version plugins { id("java") id("maven-publish") id("io.spring.dependency-management") id("org.springframework.boot") kotlin("jvm") kotlin("plugin.spring") // kotlin("plugin.jpa") } dependencies { implementation(project(path = ":shared:cloud")) implementation(project(path = ":shared:util")) implementation("org.springframework.boot:spring-boot-starter-webflux") implementation("com.fasterxml.jackson.module:jackson-module-kotlin") implementation("org.springframework.boot:spring-boot-configuration-processor") implementation("org.springframework.cloud:spring-cloud-starter-gateway") implementation("org.springframework.cloud:spring-cloud-gateway-webflux") implementation("io.jsonwebtoken:jjwt-api") implementation("io.jsonwebtoken:jjwt-impl") implementation("io.jsonwebtoken:jjwt-jackson") implementation("com.alibaba:fastjson") implementation("commons-io:commons-io") implementation(kotlin("reflect")) implementation(kotlin("stdlib-jdk8")) implementation(project(path = ":services:service-verify", configuration = "lib")) implementation(project(path = ":services:service-token", configuration = "lib")) runtimeOnly("mysql:mysql-connector-java") } dependencyManagement { imports { mavenBom("org.springframework.cloud:spring-cloud-dependencies:${property("springCloudVersion")}") } } tasks.named(name = "bootJar") { archiveBaseName.set("gaf3-${project.name}") } tasks.register(name = "libJar") { archiveBaseName.set("gaf3-${project.name}-lib") from(project.the()["main"].output) include("gaf3/**") exclude("gaf3/core/gateway/bean/**") exclude { it.name.endsWith("Application.class") } exclude { it.name.endsWith("ApplicationKt.class") } exclude { it.name.endsWith("Application${'$'}Companion.class") } } tasks.build { dependsOn(tasks.named("libJar")) } configurations { create("lib") } artifacts { add("lib", tasks["libJar"]) } tasks { processResources { filesMatching("application-services.yml") { // expand("db.user" to dbUser) expand(project.properties) } } } publishing { publications { create("maven") { artifact(tasks["libJar"]) artifactId = "gaf-core-${project.name}" // from(components["java"]) } } }