build.gradle 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  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. commons_fileupload_version = '1.3.2'
  12. slf4j_api_version = '1.7.25'
  13. ehcache_version = '3.4.0'
  14. ehcache_core_version = '2.6.11'
  15. mysql_connector_version = '5.1.45'
  16. alidruid_version = '1.1.6'
  17. mybatis_plus_version = '2.2.0'
  18. mybatis_plus_boot_version = '1.0.5'
  19. activiti_starter_version = '6.0.0'
  20. // rocketmq_starter_version = '1.1.0-RELEASE'
  21. rocketmq_starter_version = '0.1.0'
  22. xxljob_version = '1.9.0'
  23. swagger_version = '2.7.0'
  24. fastjson_version = '1.2.44'
  25. pinyin4j_version = '2.5.1'
  26. // kisso_version = '3.6.13'
  27. caffeine_version = '2.6.1'
  28. shiro_version = '1.4.0'
  29. dubbo_starter_version = '0.1.0'
  30. dubbo_version = "2.6.1"
  31. jsqlparser_version = '1.2'
  32. fastdfs_client_version = '1.26.2'
  33. }
  34. repositories {
  35. mavenCentral()
  36. maven { url = 'http://repo.spring.io/plugins-release' }
  37. }
  38. dependencies {
  39. classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
  40. classpath "org.jetbrains.kotlin:kotlin-allopen:$kotlin_version"
  41. classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
  42. }
  43. }
  44. allprojects {
  45. group = "com.gxzc.zen"
  46. version = "1.0-SNAPSHOT"
  47. }
  48. subprojects {
  49. apply plugin: 'java'
  50. apply plugin: 'eclipse'
  51. apply plugin: 'org.springframework.boot'
  52. apply plugin: 'io.spring.dependency-management'
  53. apply plugin: 'kotlin'
  54. apply plugin: 'kotlin-kapt'
  55. apply plugin: 'kotlin-spring'
  56. sourceCompatibility = 1.8
  57. targetCompatibility = 1.8
  58. [compileJava, compileTestJava, javadoc]*.options*.encoding = 'UTF-8'
  59. compileJava.dependsOn(processResources)
  60. repositories {
  61. mavenCentral()
  62. jcenter()
  63. maven {
  64. url("https://repo.rdc.aliyun.com/repository/33224-release-ycBLfV")
  65. credentials {
  66. username 'TbLzWL'
  67. password 'mCl1FI5SVB'
  68. }
  69. }
  70. }
  71. dependencyManagement {
  72. imports {
  73. mavenBom 'org.springframework.cloud:spring-cloud-dependencies:Finchley.SR1'
  74. }
  75. }
  76. dependencies {
  77. // Kotlin
  78. compile("org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version")
  79. compile("org.jetbrains.kotlin:kotlin-reflect:$kotlin_version")
  80. kapt("org.springframework.boot:spring-boot-configuration-processor")
  81. // SpringBoot Starter
  82. compile('org.springframework.cloud:spring-cloud-starter-netflix-eureka-client')
  83. compile('org.springframework.cloud:spring-cloud-starter-openfeign')
  84. compile("org.springframework.session:spring-session-data-redis")
  85. //
  86. compile('org.springframework.boot:spring-boot-starter-web'){
  87. exclude module:'spring-boot-starter-tomcat'
  88. }
  89. compile('org.springframework.boot:spring-boot-starter-jdbc')
  90. compile('org.springframework.boot:spring-boot-starter-actuator')
  91. compile('org.springframework.boot:spring-boot-starter-jta-atomikos')
  92. compile('org.springframework.boot:spring-boot-starter-jetty')
  93. // cache
  94. compile('org.springframework.boot:spring-boot-starter-cache')
  95. compile('org.springframework.boot:spring-boot-starter-data-redis')
  96. compile('redis.clients:jedis:2.9.0')
  97. compile('org.springframework.cloud:spring-cloud-starter-config')
  98. testCompile('org.springframework.boot:spring-boot-starter-test')
  99. // mq
  100. compile('com.fasterxml.jackson.module:jackson-module-kotlin:2.9.6')
  101. //只因用shiro核心包
  102. compile("org.apache.shiro:shiro-core:$shiro_version"){
  103. exclude group:"org.apache.shiro"
  104. }
  105. // commons
  106. compile("commons-io:commons-io:$commons_io_version")
  107. compile("org.apache.commons:commons-lang3:$commons_lang3_version")
  108. compile("commons-codec:commons-codec:$commons_codec_version")
  109. compile("commons-fileupload:commons-fileupload:$commons_fileupload_version")
  110. compile("javax.servlet:javax.servlet-api:3.1.0")
  111. compile("javax.servlet:servlet-api:2.5")
  112. // cache
  113. compile("com.github.ben-manes.caffeine:caffeine:$caffeine_version")
  114. // db
  115. compile("mysql:mysql-connector-java:$mysql_connector_version")
  116. compile("com.baomidou:mybatis-plus-boot-starter:$mybatisPlusVersion")
  117. // job
  118. compile("com.xuxueli:xxl-job-core:$xxljob_version")
  119. // swagger
  120. compile("io.springfox:springfox-swagger2:$swagger_version")
  121. compile("io.springfox:springfox-swagger-ui:$swagger_version")
  122. // utils
  123. compile("org.projectlombok:lombok:1.18.2")
  124. compile("com.alibaba:fastjson:$fastjson_version")
  125. compile("com.belerweb:pinyin4j:$pinyin4j_version")
  126. compile("org.apache.velocity:velocity-engine-core:2.0")
  127. // sql parser
  128. compile("com.github.jsqlparser:jsqlparser:$jsqlparser_version")
  129. // fastdfs
  130. compile("com.github.tobato:fastdfs-client:$fastdfs_client_version")
  131. ext.jarTree = fileTree(dir: 'libs', include: '**/*.jar')
  132. compile jarTree
  133. }
  134. tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
  135. kotlinOptions {
  136. jvmTarget = "1.8"
  137. }
  138. }
  139. bootJar { enabled = false }
  140. jar { enabled = true }
  141. }