build.gradle.kts 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
  2. group = "cc-lotus.gaf3"
  3. version = rootProject.version
  4. plugins {
  5. id("java-library")
  6. id("maven-publish")
  7. id("io.spring.dependency-management")
  8. kotlin("jvm")
  9. kotlin("plugin.spring")
  10. kotlin("plugin.jpa")
  11. }
  12. project(":shared") {
  13. tasks.jar {
  14. subprojects {
  15. from(tasks.withType<JavaCompile>())
  16. from(tasks.withType<KotlinCompile>())
  17. }
  18. }
  19. // tasks.sourcesJar {
  20. // subprojects {
  21. // from(sourceSets.main.get().allSource)
  22. // }
  23. // }
  24. }
  25. subprojects {
  26. apply(plugin = "java")
  27. apply(plugin = "maven-publish")
  28. apply(plugin = "io.spring.dependency-management")
  29. apply(plugin = "org.jetbrains.kotlin.jvm")
  30. apply(plugin = "org.jetbrains.kotlin.plugin.spring")
  31. apply(plugin = "org.jetbrains.kotlin.plugin.jpa")
  32. dependencies {
  33. api(platform(project(":platform")))
  34. implementation(kotlin("reflect"))
  35. implementation(kotlin("stdlib-jdk8"))
  36. implementation("org.bouncycastle:bcprov-jdk15on")
  37. implementation("org.bouncycastle:bcpkix-jdk15on")
  38. implementation("com.alibaba:fastjson")
  39. implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
  40. implementation("org.springframework.boot:spring-boot-starter-webflux")
  41. implementation("org.springframework.cloud:spring-cloud-starter-openfeign")
  42. implementation("javax.validation:validation-api")
  43. }
  44. dependencyManagement {
  45. imports {
  46. mavenBom("org.springframework.cloud:spring-cloud-dependencies:${property("springCloudVersion")}")
  47. mavenBom(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES)
  48. }
  49. }
  50. tasks.named<Jar>("jar") {
  51. archiveBaseName.set("gaf3-core-${project.name}")
  52. }
  53. }
  54. project("cloud") {
  55. dependencies {
  56. implementation(project(path = ":shared:util"))
  57. implementation("io.github.openfeign:feign-jackson")
  58. annotationProcessor("org.springframework.boot:spring-boot-configuration-processor")
  59. }
  60. }
  61. publishing {
  62. publications {
  63. create<MavenPublication>("maven") {
  64. artifactId = "gaf-core-shared"
  65. from(components["java"])
  66. // artifact(tasks["sourcesJar"])
  67. }
  68. }
  69. }
  70. tasks.named<Jar>("jar") {
  71. archiveBaseName.set("gaf3-core-${project.name}")
  72. }