build.gradle.kts 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
  2. plugins {
  3. id("org.springframework.boot") version "2.3.4.RELEASE"
  4. id("io.spring.dependency-management") version "1.0.10.RELEASE"
  5. kotlin("jvm") version "1.3.72"
  6. kotlin("plugin.spring") version "1.3.72"
  7. kotlin("plugin.jpa") version "1.3.72"
  8. }
  9. group = "com.hikari"
  10. version = "0.0.1-SNAPSHOT"
  11. java.sourceCompatibility = JavaVersion.VERSION_11
  12. val repoConf: String = System.getProperty("repoPath") ?: "/var/repo"
  13. val repoPath: String = file("$rootDir").toPath().root.resolve(repoConf).toString()
  14. repositories {
  15. // 阿里云镜像
  16. maven { url = uri("https://maven.aliyun.com/repository/public") }
  17. maven { url = uri("https://maven.aliyun.com/repository/gradle-plugin") }
  18. maven { url = uri("https://maven.aliyun.com/repository/spring") }
  19. maven { url = uri("https://maven.aliyun.com/repository/spring-plugin") }
  20. maven {
  21. name = "localRepo"
  22. url = uri("file://$repoPath")
  23. }
  24. maven {
  25. name = "cc-lotus"
  26. url = uri("https://maven.cc-lotus.info/repository/maven-public/")
  27. }
  28. }
  29. extra["springCloudVersion"] = "Hoxton.SR8"
  30. dependencies {
  31. implementation("org.springframework.boot:spring-boot-starter-data-jpa")
  32. implementation("org.springframework.boot:spring-boot-starter-webflux")
  33. implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
  34. implementation("io.projectreactor.kotlin:reactor-kotlin-extensions")
  35. implementation("org.jetbrains.kotlin:kotlin-reflect")
  36. implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
  37. implementation("org.jetbrains.kotlinx:kotlinx-coroutines-reactor")
  38. implementation("org.springframework.cloud:spring-cloud-starter-gateway")
  39. implementation("cc-lotus.gaf3:gaf-core-shared:3.0.928")
  40. runtimeOnly("mysql:mysql-connector-java")
  41. testImplementation("org.springframework.boot:spring-boot-starter-test") {
  42. exclude(group = "org.junit.vintage", module = "junit-vintage-engine")
  43. }
  44. testImplementation("io.projectreactor:reactor-test")
  45. }
  46. dependencyManagement {
  47. imports {
  48. mavenBom("org.springframework.cloud:spring-cloud-dependencies:${property("springCloudVersion")}")
  49. }
  50. }
  51. tasks.withType<Test> {
  52. useJUnitPlatform()
  53. }
  54. tasks.withType<KotlinCompile> {
  55. kotlinOptions {
  56. freeCompilerArgs = listOf("-Xjsr305=strict")
  57. jvmTarget = "11"
  58. }
  59. }