build.gradle 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. buildscript {
  2. ext {
  3. kotlin_version = '1.2.61'
  4. springBootVersion = '2.0.1.RELEASE'
  5. springCloudVersion = 'Finchley.SR1'
  6. mybatisPlusVersion = '3.0.3'
  7. junit_version = '4.12'
  8. commons_io_version = '2.5'
  9. commons_lang3_version = '3.5'
  10. commons_codec_version = '1.10'
  11. slf4j_api_version = '1.7.25'
  12. mysql_connector_version = '5.1.45'
  13. mybatis_plus_version = '2.2.0'
  14. mybatis_plus_boot_version = '1.0.5'
  15. swagger_version = '2.7.0'
  16. caffeine_version = '2.6.1'
  17. shiro_version = '1.4.0'
  18. pinyin4j_version = '2.5.1'
  19. rxJavaVersion='2.2.3'
  20. jwtVersion = '1.4.1'
  21. authVersion='1.2.3'
  22. }
  23. repositories {
  24. maven { url 'https://maven.aliyun.com/repository/public' }
  25. mavenCentral()
  26. maven { url = 'http://repo.spring.io/plugins-release' }
  27. }
  28. dependencies {
  29. classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
  30. classpath "org.jetbrains.kotlin:kotlin-allopen:$kotlin_version"
  31. classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
  32. }
  33. }
  34. allprojects {
  35. group = "cn.gygxzc.cloud"
  36. version = "1.1"
  37. }
  38. subprojects {
  39. apply plugin: 'java'
  40. apply plugin: 'eclipse'
  41. apply plugin: 'org.springframework.boot'
  42. apply plugin: 'io.spring.dependency-management'
  43. apply plugin: 'kotlin'
  44. apply plugin: 'kotlin-kapt'
  45. apply plugin: 'kotlin-spring'
  46. sourceCompatibility = 1.8
  47. targetCompatibility = 1.8
  48. [compileJava, compileTestJava, javadoc]*.options*.encoding = 'UTF-8'
  49. compileJava.dependsOn(processResources)
  50. ext{
  51. set('springBootAdminVersion', '2.1.4')
  52. }
  53. repositories {
  54. maven { url 'https://maven.aliyun.com/repository/public' }
  55. mavenCentral()
  56. jcenter()
  57. maven {
  58. url("https://repo.rdc.aliyun.com/repository/37165-release-a3lssL")
  59. credentials {
  60. username 'Dz38pq'
  61. password 'U1oB2RJOJa'
  62. }
  63. }
  64. maven {
  65. credentials {
  66. username 'TbLzWL'
  67. password 'mCl1FI5SVB'
  68. }
  69. url 'https://repo.rdc.aliyun.com/repository/33224-snapshot-okrj8B/'
  70. }
  71. }
  72. dependencyManagement {
  73. imports {
  74. mavenBom 'org.springframework.cloud:spring-cloud-dependencies:Finchley.SR1'
  75. }
  76. }
  77. configurations{
  78. all*.exclude group: 'org.springframework.boot', module: 'spring-boot-starter-tomcat'
  79. }
  80. dependencies {
  81. // Kotlin
  82. compile("org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version")
  83. compile("org.jetbrains.kotlin:kotlin-reflect:$kotlin_version")
  84. kapt("org.springframework.boot:spring-boot-configuration-processor")
  85. // SpringBoot Starter
  86. compile('org.springframework.cloud:spring-cloud-starter-netflix-eureka-client')
  87. compile('org.springframework.cloud:spring-cloud-starter-openfeign')
  88. compile("org.springframework.session:spring-session-data-redis")
  89. //
  90. compile('org.springframework.boot:spring-boot-starter-web')
  91. compile('org.springframework.boot:spring-boot-starter-jdbc')
  92. compile('org.springframework.boot:spring-boot-starter-actuator')
  93. compile("de.codecentric:spring-boot-admin-starter-client:${springBootAdminVersion}")
  94. compile('org.springframework.boot:spring-boot-starter-jta-atomikos')
  95. compile('org.springframework.boot:spring-boot-starter-jetty')
  96. // cache
  97. compile('org.springframework.boot:spring-boot-starter-cache')
  98. compile('org.springframework.boot:spring-boot-starter-data-redis')
  99. compile('redis.clients:jedis:2.9.0')
  100. compile('org.springframework.cloud:spring-cloud-starter-config')
  101. testCompile('org.springframework.boot:spring-boot-starter-test')
  102. // mq
  103. compile('com.fasterxml.jackson.module:jackson-module-kotlin:2.9.6')
  104. compile("io.reactivex.rxjava2:rxjava:$rxJavaVersion")
  105. //只因用shiro核心包
  106. compile("org.apache.shiro:shiro-spring:$shiro_version")
  107. compile("com.belerweb:pinyin4j:$pinyin4j_version")
  108. // commons
  109. compile("commons-io:commons-io:$commons_io_version")
  110. compile("org.apache.commons:commons-lang3:$commons_lang3_version")
  111. compile("commons-codec:commons-codec:$commons_codec_version")
  112. compile("javax.servlet:javax.servlet-api:3.1.0")
  113. compile("javax.servlet:servlet-api:2.5")
  114. // cache
  115. compile("com.github.ben-manes.caffeine:caffeine:$caffeine_version")
  116. // db
  117. compile("mysql:mysql-connector-java:$mysql_connector_version")
  118. compile("com.baomidou:mybatis-plus-boot-starter:$mybatisPlusVersion")
  119. // swagger
  120. compile("io.springfox:springfox-swagger2:$swagger_version")
  121. compile("io.springfox:springfox-swagger-ui:$swagger_version")
  122. compile("cn.gygxzc.cloud:jwt-session:$jwtVersion")
  123. compile("cn.gygxzc.cloud:tina-auth:$authVersion")
  124. ext.jarTree = fileTree(dir: 'libs', include: '**/*.jar')
  125. compile jarTree
  126. }
  127. tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
  128. kotlinOptions {
  129. jvmTarget = "1.8"
  130. }
  131. }
  132. bootJar { enabled = false }
  133. jar { enabled = true }
  134. }