build.gradle 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. buildscript {
  2. ext {
  3. kotlin_version = '1.3.21'
  4. springBootVersion = '2.1.7.RELEASE'
  5. junit_version = '4.12'
  6. commons_io_version = '2.5'
  7. commons_lang3_version = '3.5'
  8. commons_codec_version = '1.10'
  9. commons_fileupload_version = '1.3.2'
  10. mysql_connector_version = '5.1.45'
  11. mybatisPlusVersion = '3.0.3'
  12. slf4j_api_version = '1.7.25'
  13. rxJavaVersion = '2.2.3'
  14. jwtVersion = '1.4.0'
  15. authVersion = '1.2'
  16. shiro_version = '1.4.0'
  17. swagger_version = '2.7.0'
  18. }
  19. repositories {
  20. maven { url 'https://maven.aliyun.com/repository/central' }
  21. maven { url = 'http://repo.spring.io/plugins-release' }
  22. maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
  23. }
  24. dependencies {
  25. classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
  26. classpath "org.jetbrains.kotlin:kotlin-allopen:$kotlin_version"
  27. classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
  28. }
  29. }
  30. allprojects {
  31. group = "cn.gygxzc.cloud.tina"
  32. version = "2.1"
  33. }
  34. subprojects {
  35. apply plugin: 'java'
  36. apply plugin: 'eclipse'
  37. apply plugin: 'org.springframework.boot'
  38. apply plugin: 'io.spring.dependency-management'
  39. apply plugin: 'kotlin'
  40. apply plugin: 'kotlin-kapt'
  41. apply plugin: 'kotlin-spring'
  42. sourceCompatibility = 1.8
  43. targetCompatibility = 1.8
  44. [compileJava, compileTestJava, javadoc]*.options*.encoding = 'UTF-8'
  45. compileJava.dependsOn(processResources)
  46. ext {
  47. set('springCloudVersion', 'Greenwich.SR2')
  48. set('springBootAdminVersion', '2.1.4')
  49. }
  50. repositories {
  51. maven { url 'https://maven.aliyun.com/repository/public' }
  52. maven { url 'https://maven.aliyun.com/repository/central' }
  53. maven { url 'https://maven.aliyun.com/repository/jcenter' }
  54. }
  55. dependencyManagement {
  56. imports {
  57. mavenBom "de.codecentric:spring-boot-admin-dependencies:${springBootAdminVersion}"
  58. mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
  59. }
  60. }
  61. configurations {
  62. all*.exclude group: 'org.springframework.boot', module: 'spring-boot-starter-tomcat'
  63. }
  64. dependencies {
  65. // Kotlin
  66. compile("org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version")
  67. compile("org.jetbrains.kotlin:kotlin-reflect:$kotlin_version")
  68. kapt("org.springframework.boot:spring-boot-configuration-processor")
  69. // SpringBoot Starter
  70. compile 'org.springframework.cloud:spring-cloud-starter-bus-amqp'
  71. compile('org.springframework.boot:spring-boot-starter-web')
  72. compile('org.springframework.boot:spring-boot-starter-thymeleaf')
  73. compile('org.springframework.cloud:spring-cloud-config-server')
  74. compile('org.springframework.cloud:spring-cloud-config-monitor')
  75. compile('org.springframework.boot:spring-boot-starter-jetty')
  76. compile('org.springframework.boot:spring-boot-starter-jdbc')
  77. compile('org.springframework.boot:spring-boot-starter-cache')
  78. compile("org.springframework.session:spring-session-data-redis")
  79. compile('org.springframework.boot:spring-boot-starter-data-redis')
  80. compile('redis.clients:jedis:2.9.0')
  81. compile('org.springframework.cloud:spring-cloud-starter-netflix-eureka-server')
  82. compile('org.springframework.cloud:spring-cloud-starter-openfeign')
  83. //
  84. // commons
  85. compile("commons-io:commons-io:$commons_io_version")
  86. compile("org.apache.commons:commons-lang3:$commons_lang3_version")
  87. compile("commons-codec:commons-codec:$commons_codec_version")
  88. compile("cn.gygxzc.cloud:jwt-session:$jwtVersion")
  89. compile("cn.gygxzc.cloud:tina-auth:$authVersion")
  90. compile("io.reactivex.rxjava2:rxjava:$rxJavaVersion")
  91. compile("org.apache.shiro:shiro-spring:$shiro_version")
  92. // logger
  93. compile("org.slf4j:slf4j-api:$slf4j_api_version")
  94. compile("javax.servlet:javax.servlet-api:3.1.0")
  95. compile("javax.servlet:servlet-api:2.5")
  96. compile("mysql:mysql-connector-java:$mysql_connector_version")
  97. compile("com.baomidou:mybatis-plus-boot-starter:$mybatisPlusVersion")
  98. // swagger
  99. compile("io.springfox:springfox-swagger2:$swagger_version")
  100. compile("io.springfox:springfox-swagger-ui:$swagger_version")
  101. compile 'io.jsonwebtoken:jjwt-api:0.10.5'
  102. runtime 'io.jsonwebtoken:jjwt-impl:0.10.5',
  103. 'io.jsonwebtoken:jjwt-jackson:0.10.5'
  104. ext.jarTree = fileTree(dir: 'libs', include: '**/*.jar')
  105. compile jarTree
  106. }
  107. tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
  108. kotlinOptions {
  109. jvmTarget = "1.8"
  110. }
  111. }
  112. bootJar { enabled = false }
  113. jar { enabled = true }
  114. }