build.gradle.kts 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /*
  2. * This file was generated by the Gradle 'init' task.
  3. *
  4. * This is a general purpose Gradle build.
  5. * Learn how to create Gradle builds at https://guides.gradle.org/creating-new-gradle-builds
  6. */
  7. group = "llh.svs"
  8. version = rootProject.version
  9. plugins {
  10. id("java-library")
  11. id("maven-publish")
  12. id("io.spring.dependency-management")
  13. kotlin("jvm")
  14. kotlin("plugin.spring")
  15. kotlin("plugin.jpa")
  16. }
  17. dependencies {
  18. compileOnly(platform(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES))
  19. compileOnly(platform(project(":platform")))
  20. compileOnly("org.bouncycastle:bcprov-jdk15on")
  21. compileOnly(fileTree("$rootDir/libs") { include("*.jar") })
  22. compileOnly(kotlin("reflect"))
  23. compileOnly(kotlin("stdlib-jdk8"))
  24. compileOnly("cc-lotus.gaf3:gaf-core-shared:${property("gafVersion")}")
  25. compileOnly("com.github.oshi:oshi-core:6.1.4")
  26. compileOnly("com.alibaba:fastjson:${property("fastjsonVersion")}")
  27. compileOnly("com.fasterxml.jackson.module:jackson-module-kotlin")
  28. compileOnly("org.springframework.cloud:spring-cloud-starter-openfeign")
  29. compileOnly("org.springframework.boot:spring-boot-starter-webflux")
  30. compileOnly("org.hibernate:hibernate-core")
  31. }
  32. dependencyManagement {
  33. imports {
  34. // mavenBom(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES)
  35. mavenBom("org.springframework.cloud:spring-cloud-dependencies:${property("springCloudVersion")}")
  36. }
  37. }
  38. tasks.named<Jar>("jar") {
  39. archiveBaseName.set("svs-core-${project.name}")
  40. }
  41. tasks.register<Jar>(name = "libJar") {
  42. archiveBaseName.set("svs-core-${project.name}-lib")
  43. from(sourceSets["main"].output)
  44. }
  45. tasks.build { dependsOn(tasks.named("libJar")) }
  46. configurations {
  47. create("lib")
  48. }
  49. artifacts {
  50. add("lib", tasks["libJar"])
  51. }
  52. publishing {
  53. publications {
  54. create<MavenPublication>("maven") {
  55. artifactId = "xms-core-shared"
  56. from(components["java"])
  57. }
  58. }
  59. }