build.gradle.kts 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
  2. plugins {
  3. id("org.springframework.boot") version "2.3.6.RELEASE"
  4. id("io.spring.dependency-management") version "1.0.10.RELEASE"
  5. kotlin("jvm") version "1.4.10"
  6. kotlin("plugin.spring") version "1.4.10"
  7. }
  8. group = "jit.xms"
  9. version = "1.0.1116"
  10. java.sourceCompatibility = JavaVersion.VERSION_1_8
  11. val repoConf: String = System.getProperty("repoPath") ?: "/var/repo"
  12. val repoPath: String = file("$rootDir").toPath().root.resolve(repoConf).toString()
  13. repositories {
  14. maven {
  15. name = "localRepo"
  16. url = uri("file://$repoPath")
  17. }
  18. maven {
  19. name = "cc-lotus"
  20. url = uri("https://maven.cc-lotus.info/repository/maven-public/")
  21. }
  22. // 阿里云镜像
  23. maven { url = uri("https://maven.aliyun.com/repository/public") }
  24. maven { url = uri("https://maven.aliyun.com/repository/gradle-plugin") }
  25. maven { url = uri("https://maven.aliyun.com/repository/spring") }
  26. maven { url = uri("https://maven.aliyun.com/repository/spring-plugin") }
  27. }
  28. extra["springCloudVersion"] = "Hoxton.SR5"
  29. extra["gafVersion"] = "3.0.1127"
  30. extra["fastjsonVersion"] = "1.2.71"
  31. extra["xmsVersion"] = "1.0.1125"
  32. dependencies {
  33. implementation("org.springframework.boot:spring-boot-starter-webflux")
  34. implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
  35. implementation("io.projectreactor.kotlin:reactor-kotlin-extensions")
  36. implementation("org.jetbrains.kotlin:kotlin-reflect")
  37. implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
  38. implementation("org.jetbrains.kotlinx:kotlinx-coroutines-reactor")
  39. implementation("org.springframework.cloud:spring-cloud-starter-gateway")
  40. implementation("cc-lotus.gaf3:gaf-core-shared:${property("gafVersion")}")
  41. implementation("cc-lotus.gaf3:gaf-core-services:${property("gafVersion")}")
  42. implementation("cc-lotus.gaf3:gaf-core-gateway:${property("gafVersion")}")
  43. implementation("com.alibaba:fastjson:${property("fastjsonVersion")}")
  44. implementation("jit.xms:xms-core-shared:${property("xmsVersion")}")
  45. implementation("jit.xms:xms-core-services:${property("xmsVersion")}")
  46. implementation("org.springframework.boot:spring-boot-starter-data-jpa")
  47. implementation("io.jsonwebtoken:jjwt-api:0.10.5")
  48. implementation("io.jsonwebtoken:jjwt-impl:0.10.5")
  49. implementation("io.jsonwebtoken:jjwt-jackson:0.10.5")
  50. implementation("org.webjars:webjars-locator-core")
  51. implementation("org.webjars:sockjs-client:1.0.2")
  52. implementation("org.webjars:stomp-websocket:2.3.3")
  53. implementation("org.webjars:bootstrap:3.3.7")
  54. implementation("org.webjars:jquery:3.1.1-1")
  55. testImplementation("org.springframework.boot:spring-boot-starter-test")
  56. testImplementation("io.projectreactor:reactor-test")
  57. implementation(fileTree("$rootDir/libs") { include("*.jar") })
  58. runtimeOnly("mysql:mysql-connector-java")
  59. }
  60. dependencyManagement {
  61. imports {
  62. mavenBom("org.springframework.cloud:spring-cloud-dependencies:${property("springCloudVersion")}")
  63. }
  64. }
  65. tasks.withType<Test> {
  66. useJUnitPlatform()
  67. }
  68. tasks.withType<KotlinCompile> {
  69. kotlinOptions {
  70. freeCompilerArgs = listOf("-Xjsr305=strict")
  71. jvmTarget = "1.8"
  72. }
  73. }