2
0

build_standard.gradle 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477
  1. /*
  2. * Copyright [2021] [MaxKey of copyright http://www.maxkey.top]
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. /*
  17. * MaxKey build file was auto generated by running the Gradle release.bat
  18. */
  19. defaultTasks "clean", "build"
  20. //Version define
  21. ext {
  22. }
  23. configurations.all {
  24. transitive = false// 为本依赖关闭依赖传递特性
  25. }
  26. //add support for Java
  27. //apply plugin: 'java'
  28. allprojects {
  29. apply plugin: "java"
  30. apply plugin: "eclipse"
  31. //apply plugin: "pmd"
  32. //apply plugin: "findbugs"
  33. //apply plugin: "jdepend"
  34. configurations.all {
  35. transitive = false// 为本依赖关闭依赖传递特性
  36. }
  37. //java Version
  38. sourceCompatibility = 1.8
  39. targetCompatibility = 1.8
  40. compileJava.options.encoding = 'UTF-8'
  41. /*
  42. eclipse {
  43. 第一次时请注释这段eclipse设置,可能报错,设置工程字符集
  44. jdt {
  45. File f = file('.settings/org.eclipse.core.resources.prefs')
  46. f.write('eclipse.preferences.version=1\n')
  47. f.append('encoding/<project>=UTF-8') //use UTF-8
  48. }
  49. }
  50. */
  51. }
  52. buildscript {
  53. repositories {
  54. mavenCentral()
  55. }
  56. }
  57. // In this section you declare where to find the dependencies of your project
  58. repositories {
  59. // Use 'jcenter' for resolving your dependencies.
  60. // You can declare any Maven/Ivy/file repository here.
  61. mavenCentral()
  62. }
  63. subprojects {
  64. /*
  65. eclipse {
  66. 第一次时请注释这段eclipse设置,可能报错,设置工程字符集
  67. jdt {
  68. File f = file('.settings/org.eclipse.core.resources.prefs')
  69. f.write('eclipse.preferences.version=1\n')
  70. f.append('encoding/<project>=UTF-8') //use UTF-8
  71. }
  72. }
  73. */
  74. processResources {
  75. from ('src/main/resources') {
  76. include 'src/main/resources/*.*'
  77. }
  78. }
  79. sourceSets {
  80. main {
  81. java {
  82. srcDir 'src/main/java' // 指定源码目录
  83. }
  84. }
  85. }
  86. repositories {
  87. mavenLocal()
  88. maven { url 'https://maven.aliyun.com/nexus/content/groups/public/'}
  89. maven { url "https://repo.spring.io/plugins-release/" }
  90. maven { url "https://repo.spring.io/milestone" }
  91. maven { url "https://repo1.maven.org/maven2/" }
  92. maven { url "https://build.shibboleth.net/nexus/content/repositories/releases/" }
  93. maven { url "https://mvnrepository.com/repos/central/" }
  94. maven { url "https://jcenter.bintray.com" }
  95. maven { url "https://mvn.gt.igexin.com/nexus/content/repositories/releases"}
  96. maven { url "https://plugins.gradle.org/m2/" }
  97. maven { url "https://oss.sonatype.org/content/repositories/releases/" }
  98. maven { url "https://maven.repository.redhat.com/ga/" }
  99. maven { url "https://repository.apache.org/content/repositories/releases/" }
  100. mavenCentral()
  101. }
  102. //all dependencies
  103. dependencies {
  104. //for Test and Compile
  105. testImplementation 'junit:junit:4.11'
  106. compileOnly 'junit:junit:4.11'
  107. testImplementation group: 'javax.servlet', name: 'javax.servlet-api', version: '3.0.1'
  108. compileOnly group: 'javax.servlet', name: 'javax.servlet-api', version: '3.0.1'
  109. testImplementation group: 'org.mockito', name: 'mockito-all', version: '1.10.19'
  110. testImplementation group: 'xmlunit', name: 'xmlunit', version: '1.6'
  111. //apache
  112. implementation group: 'commons-beanutils', name: 'commons-beanutils', version: '1.9.3'
  113. implementation group: 'commons-codec', name: 'commons-codec', version: '1.15'
  114. implementation group: 'commons-collections', name: 'commons-collections', version: '3.2.2'
  115. implementation group: 'org.apache.commons', name: 'commons-collections4', version: '4.4'
  116. //implementation group: 'org.apache.commons', name: 'commons-csv', version: '1.7'
  117. implementation group: 'org.apache.commons', name: 'commons-text', version: '1.9'
  118. implementation group: 'org.apache.commons', name: 'commons-dbcp2', version: '2.6.0'
  119. implementation group: 'commons-dbutils', name: 'commons-dbutils', version: '1.7'
  120. implementation group: 'org.apache.commons', name: 'commons-digester3', version: '3.2'
  121. implementation group: 'commons-digester', name: 'commons-digester', version: '2.1'
  122. implementation group: 'commons-io', name: 'commons-io', version: '2.8.0'
  123. implementation group: 'commons-lang', name: 'commons-lang', version: '2.6'
  124. implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.11'
  125. implementation group: 'commons-logging', name: 'commons-logging', version: '1.2'
  126. implementation group: 'org.apache.commons', name: 'commons-pool2', version: '2.6.2'
  127. implementation group: 'commons-httpclient', name: 'commons-httpclient', version: '3.1'
  128. implementation group: 'commons-fileupload', name: 'commons-fileupload', version: '1.4'
  129. implementation group: 'org.apache.commons', name: 'commons-email', version: '1.5'
  130. implementation group: 'org.apache.httpcomponents', name: 'httpclient', version: "${httpcomponentsVersion}"
  131. implementation group: 'org.apache.httpcomponents', name: 'fluent-hc', version: "${httpcomponentsVersion}"
  132. implementation group: 'org.apache.httpcomponents', name: 'httpclient-cache', version: "${httpcomponentsVersion}"
  133. implementation group: 'org.apache.httpcomponents', name: 'httpmime', version: "${httpcomponentsVersion}"
  134. implementation group: 'org.apache.httpcomponents', name: 'httpcore', version: '4.4.13'
  135. implementation group: 'org.apache.velocity', name: 'velocity', version: '1.7'
  136. implementation group: 'velocity', name: 'velocity-dep', version: '1.4'
  137. implementation group: 'org.freemarker', name: 'freemarker', version: '2.3.31'
  138. implementation group: 'org.apache.xmlbeans', name: 'xmlbeans', version: '3.0.1'
  139. implementation group: 'org.apache.commons', name: 'commons-compress', version: '1.20'
  140. implementation group: 'org.apache.poi', name: 'poi', version: "${poiVersion}"
  141. implementation group: 'org.apache.poi', name: 'poi-ooxml', version: "${poiVersion}"
  142. implementation group: 'org.apache.poi', name: 'poi-ooxml-schemas', version: "${poiVersion}"
  143. implementation group: 'org.apache.poi', name: 'poi-scratchpad', version: "${poiVersion}"
  144. //implementation group: 'org.apache.commons', name: 'not-yet-commons-ssl', version: '0.3.9'
  145. //logs
  146. implementation group: 'org.apache.logging.log4j', name: 'log4j-1.2-api', version: "${log4jVersion}"
  147. implementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: "${log4jVersion}"
  148. implementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: "${log4jVersion}"
  149. implementation group: 'org.apache.logging.log4j', name: 'log4j-jcl', version: "${log4jVersion}"
  150. implementation group: 'org.apache.logging.log4j', name: 'log4j-jul', version: "${log4jVersion}"
  151. implementation group: 'org.apache.logging.log4j', name: 'log4j-slf4j-impl', version: "${log4jVersion}"
  152. implementation group: 'org.apache.logging.log4j', name: 'log4j-web', version: "${log4jVersion}"
  153. implementation group: 'org.slf4j', name: 'slf4j-api', version: "${slf4jVersion}"
  154. implementation group: 'org.jboss.logging', name: 'jboss-logging', version: '3.4.1.Final'
  155. //spring
  156. implementation group: 'org.springframework', name: 'spring-aop', version: "${springVersion}"
  157. implementation group: 'org.springframework', name: 'spring-aspects', version: "${springVersion}"
  158. implementation group: 'org.springframework', name: 'spring-beans', version: "${springVersion}"
  159. implementation group: 'org.springframework', name: 'spring-core', version: "${springVersion}"
  160. implementation group: 'org.springframework', name: 'spring-context', version: "${springVersion}"
  161. implementation group: 'org.springframework', name: 'spring-context-indexer', version: "${springVersion}"
  162. implementation group: 'org.springframework', name: 'spring-context-support', version: "${springVersion}"
  163. implementation group: 'org.springframework', name: 'spring-expression', version: "${springVersion}"
  164. //implementation group: 'org.springframework', name: 'spring-instrument', version: "${springVersion}"
  165. //implementation group: 'org.springframework', name: 'spring-jcl', version: "${springVersion}"
  166. implementation group: 'org.springframework', name: 'spring-jdbc', version: "${springVersion}"
  167. //implementation group: 'org.springframework', name: 'spring-jms', version: "${springVersion}"
  168. implementation group: 'org.springframework', name: 'spring-messaging', version: "${springVersion}"
  169. //implementation group: 'org.springframework', name: 'spring-orm', version: "${springVersion}"
  170. implementation group: 'org.springframework', name: 'spring-oxm', version: "${springVersion}"
  171. implementation group: 'org.springframework', name: 'spring-tx', version: "${springVersion}"
  172. implementation group: 'org.springframework', name: 'spring-web', version: "${springVersion}"
  173. //implementation group: 'org.springframework', name: 'spring-webflux', version: "${springVersion}"
  174. implementation group: 'org.springframework', name: 'spring-webmvc', version: "${springVersion}"
  175. //implementation group: 'org.springframework', name: 'spring-websocket', version: "${springVersion}"
  176. testImplementation group: 'org.springframework', name: 'spring-test', version: "${springVersion}"
  177. //kafka support
  178. // https://mvnrepository.com/artifact/org.apache.kafka/kafka-clients
  179. implementation group: 'org.apache.kafka', name: 'kafka-clients', version: '2.6.1'
  180. // https://mvnrepository.com/artifact/org.springframework.kafka/spring-kafka
  181. implementation group: 'org.springframework.kafka', name: 'spring-kafka', version: '2.6.6'
  182. // https://mvnrepository.com/artifact/org.springframework.retry/spring-retry
  183. implementation group: 'org.springframework.retry', name: 'spring-retry', version: '1.3.0'
  184. //spring-security
  185. implementation group: 'org.springframework.security', name: 'spring-security-core', version: "${springSecurityVersion}"
  186. implementation group: 'org.springframework.security', name: 'spring-security-web', version: "${springSecurityVersion}"
  187. implementation group: 'org.springframework.security', name: 'spring-security-crypto', version: "${springSecurityVersion}"
  188. //srpingboot
  189. implementation group: 'org.springframework.boot', name: 'spring-boot', version: "${springBootVersion}"
  190. implementation group: 'org.springframework.boot', name: 'spring-boot-starter', version: "${springBootVersion}"
  191. implementation group: 'org.springframework.boot', name: 'spring-boot-actuator', version: "${springBootVersion}"
  192. implementation group: 'org.springframework.boot', name: 'spring-boot-starter-actuator', version: "${springBootVersion}"
  193. implementation group: 'org.springframework.boot', name: 'spring-boot-actuator-autoconfigure', version: "${springBootVersion}"
  194. implementation group: 'org.springframework.boot', name: 'spring-boot-autoconfigure', version: "${springBootVersion}"
  195. implementation group: 'org.springframework.boot', name: 'spring-boot-starter-freemarker', version: "${springBootVersion}"
  196. implementation group: 'org.springframework.boot', name: 'spring-boot-starter-log4j2', version: "${springBootVersion}"
  197. implementation group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: "${springBootVersion}"
  198. implementation group: 'org.springframework.boot', name: 'spring-boot-starter-tomcat', version: "${springBootVersion}"
  199. implementation group: 'org.springframework.boot', name: 'spring-boot-starter-data-redis', version: "${springBootVersion}"
  200. testImplementation group: 'org.springframework.boot', name: 'spring-boot-starter-test', version: "${springBootVersion}"
  201. //spring-data
  202. implementation group: 'org.springframework.data', name: 'spring-data-commons', version: "${springDataVersion}"
  203. implementation group: 'org.springframework.data', name: 'spring-data-keyvalue', version: "${springDataVersion}"
  204. implementation group: 'org.springframework.data', name: 'spring-data-redis', version: "${springDataVersion}"
  205. //spring-session
  206. implementation group: 'org.springframework.session', name: 'spring-session-core', version: "${springSessionVersion}"
  207. implementation group: 'org.springframework.session', name: 'spring-session-data-redis', version: "${springSessionVersion}"
  208. implementation group: 'org.springframework.plugin', name: 'spring-plugin-core', version: '2.0.0.RELEASE'
  209. implementation group: 'org.springframework.plugin', name: 'spring-plugin-metadata', version: '2.0.0.RELEASE'
  210. //saml
  211. implementation group: 'org.opensaml', name: 'opensaml', version: '2.6.6'
  212. implementation group: 'org.opensaml', name: 'openws', version: '1.5.6'
  213. implementation group: 'org.opensaml', name: 'xmltooling', version: '1.4.6'
  214. implementation group: 'net.shibboleth.utilities', name: 'java-support', version: '7.5.1'
  215. //jose-jwt
  216. implementation group: 'com.nimbusds', name: 'nimbus-jose-jwt', version: '9.4.1'
  217. implementation group: 'net.jcip', name: 'jcip-annotations', version: '1.0'
  218. implementation group: 'net.minidev', name: 'json-smart', version: '2.3'
  219. implementation group: 'net.minidev', name: 'asm', version: '1.0.2'
  220. //oauth third party JustAuth
  221. implementation group: 'com.xkcoding.http', name: 'simple-http', version: '1.0.3'
  222. implementation group: 'me.zhyd.oauth', name: 'JustAuth', version: '1.15.9'
  223. //common
  224. implementation group: 'org.javassist', name: 'javassist', version: '3.23.0-GA'
  225. implementation group: 'org.owasp.esapi', name: 'esapi', version: '2.2.0.0'
  226. implementation group: 'com.sun.mail', name: 'javax.mail', version: '1.6.2'
  227. // https://mvnrepository.com/artifact/org.eclipse.persistence/javax.persistence
  228. // for mybatis-jpa-extra
  229. implementation group: 'org.eclipse.persistence', name: 'javax.persistence', version: '2.2.1'
  230. implementation group: 'javax.activation', name: 'activation', version: '1.1.1'
  231. implementation group: 'javax.annotation', name: 'javax.annotation-api', version: '1.3.2'
  232. implementation group: 'javax.transaction', name: 'jta', version: '1.1'
  233. implementation group: 'javax.transaction', name: 'javax.transaction-api', version: '1.3'
  234. implementation group: 'javax.validation', name: 'validation-api', version: '2.0.1.Final'
  235. implementation group: 'javax.xml', name: 'jsr173', version: '1.0'
  236. implementation group: 'javax.xml.bind', name: 'jaxb-api', version: '2.3.1'
  237. implementation group: 'com.sun.xml.bind', name: 'jaxb-core', version: '2.3.0.1'
  238. implementation group: 'com.sun.xml.bind', name: 'jaxb-impl', version: '2.3.2'
  239. implementation group: 'com.sun.xml.bind', name: 'jaxb-xjc', version: '2.3.2'
  240. //crypto
  241. implementation group: 'org.bouncycastle', name: 'bcpkix-jdk15on', version: "${bouncycastleVersion}"
  242. implementation group: 'org.bouncycastle', name: 'bcprov-jdk15on', version: "${bouncycastleVersion}"
  243. implementation group: 'org.bouncycastle', name: 'bcprov-ext-jdk15on', version: "${bouncycastleVersion}"
  244. implementation group: 'com.google.crypto.tink', name: 'tink', version: '1.4.0'
  245. //kaptcha
  246. implementation group: 'com.jhlabs', name: 'filters', version: '2.0.235-1'
  247. implementation group: 'com.github.penggle', name: 'kaptcha', version: '2.3.2'
  248. //json
  249. implementation group: 'com.google.code.gson', name: 'gson', version: '2.8.6'
  250. implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: "${jacksonVersion}"
  251. implementation group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: "${jacksonVersion}"
  252. implementation group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: "${jacksonVersion}"
  253. implementation group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jsr310', version: "${jacksonVersion}"
  254. implementation group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-yaml', version: "${jacksonVersion}"
  255. implementation group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-xml', version: "${jacksonVersion}"
  256. implementation group: 'com.fasterxml', name: 'classmate', version: '1.5.0'
  257. implementation group: 'com.alibaba', name: 'fastjson', version: '1.2.74'
  258. //reactive
  259. implementation group: 'org.reactivestreams', name: 'reactive-streams', version: '1.0.2'
  260. implementation group: 'io.projectreactor', name: 'reactor-core', version: '3.2.10.RELEASE'
  261. implementation group: 'eu.tekul', name: 'szxcvbn_2.9.2', version: '0.2'
  262. //quartz
  263. implementation group: 'org.quartz-scheduler', name: 'quartz', version: '2.3.2'
  264. //database
  265. implementation group: 'mysql', name: 'mysql-connector-java', version: '8.0.21'
  266. implementation group: 'com.alibaba', name: 'druid', version: '1.2.5'
  267. implementation group: 'com.alibaba', name: 'druid-spring-boot-starter', version: '1.2.5'
  268. implementation group: 'redis.clients', name: 'jedis', version: '3.4.1'
  269. implementation group: 'org.ehcache', name: 'ehcache', version: '3.9.0'
  270. //mybatis
  271. implementation group: 'org.mybatis', name: 'mybatis', version: '3.5.6'
  272. implementation group: 'org.mybatis', name: 'mybatis-spring', version: '2.0.6'
  273. //hibernate
  274. implementation group: 'org.hibernate.validator', name: 'hibernate-validator', version: "${hibernateVersion}"
  275. implementation group: 'org.hibernate', name: 'hibernate-validator-cdi', version: "${hibernateVersion}"
  276. implementation group: 'org.hibernate.validator', name: 'hibernate-validator-annotation-processor', version: "${hibernateVersion}"
  277. //usefull
  278. implementation group: 'joda-time', name: 'joda-time', version: '2.10.9'
  279. implementation group: 'org.yaml', name: 'snakeyaml', version: '1.26'
  280. implementation group: 'net.sourceforge.nekohtml', name: 'nekohtml', version: '1.9.22'
  281. implementation group: 'org.jdom', name: 'jdom', version: '2.0.2'
  282. implementation group: 'com.google.zxing', name: 'core', version: '3.4.1'
  283. implementation group: 'com.google.guava', name: 'guava', version: '30.1-jre'
  284. implementation group: 'ognl', name: 'ognl', version: '3.2.14'
  285. implementation group: 'cglib', name: 'cglib', version: '3.3.0'
  286. implementation group: 'org.ow2.asm', name: 'asm', version: '7.3.1'
  287. implementation group: 'aopalliance', name: 'aopalliance', version: '1.0'
  288. implementation group: 'org.aspectj', name: 'aspectjtools', version: '1.9.4'
  289. implementation group: 'dom4j', name: 'dom4j', version: '1.6.1'
  290. implementation group: 'xalan', name: 'serializer', version: '2.7.2'
  291. implementation group: 'xml-resolver', name: 'xml-resolver', version: '1.2'
  292. implementation group: 'org.apache.santuario', name: 'xmlsec', version: '1.5.8'
  293. implementation group: 'org.ogce', name: 'xpp3', version: '1.1.6'
  294. implementation group: 'com.thoughtworks.xstream', name: 'xstream', version: '1.4.10'
  295. implementation group: 'org.passay', name: 'passay', version: '1.6.0'
  296. implementation group: 'io.micrometer', name: 'micrometer-core', version: '1.6.4'
  297. implementation group: 'org.latencyutils', name: 'LatencyUtils', version: '2.0.3'
  298. implementation group: 'org.codehaus.woodstox', name: 'stax2-api', version: '4.2.1'
  299. //docs
  300. implementation group: 'org.mapstruct', name: 'mapstruct', version: '1.4.1.Final'
  301. implementation group: 'io.swagger', name: 'swagger-annotations', version: "${swaggerVersion}"
  302. implementation group: 'io.swagger', name: 'swagger-models', version: "${swaggerVersion}"
  303. implementation group: 'io.swagger.core.v3', name: 'swagger-annotations', version: "${swaggerV3Version}"
  304. implementation group: 'io.swagger.core.v3', name: 'swagger-core', version: "${swaggerV3Version}"
  305. implementation group: 'io.swagger.core.v3', name: 'swagger-integration', version: "${swaggerV3Version}"
  306. implementation group: 'io.swagger.core.v3', name: 'swagger-models', version: "${swaggerV3Version}"
  307. //springfox
  308. implementation group: 'io.springfox', name: 'springfox-bean-validators', version: "${springfoxVersion}"
  309. implementation group: 'io.springfox', name: 'springfox-core', version: "${springfoxVersion}"
  310. implementation group: 'io.springfox', name: 'springfox-data-rest', version: "${springfoxVersion}"
  311. implementation group: 'io.springfox', name: 'springfox-spi', version: "${springfoxVersion}"
  312. implementation group: 'io.springfox', name: 'springfox-oas', version: "${springfoxVersion}"
  313. implementation group: 'io.springfox', name: 'springfox-schema', version: "${springfoxVersion}"
  314. implementation group: 'io.springfox', name: 'springfox-swagger2', version: "${springfoxVersion}"
  315. implementation group: 'io.springfox', name: 'springfox-swagger-ui', version: "${springfoxVersion}"
  316. implementation group: 'io.springfox', name: 'springfox-swagger-common', version: "${springfoxVersion}"
  317. implementation group: 'io.springfox', name: 'springfox-spring-webmvc', version: "${springfoxVersion}"
  318. implementation group: 'io.springfox', name: 'springfox-spring-web', version: "${springfoxVersion}"
  319. implementation group: 'io.springfox', name: 'springfox-spring-webflux', version: "${springfoxVersion}"
  320. implementation group: 'io.springfox', name: 'springfox-boot-starter', version: "${springfoxVersion}"
  321. //knife4j
  322. implementation group: 'com.github.xiaoymin', name: 'knife4j-annotations', version: "${knife4jVersion}"
  323. implementation group: 'com.github.xiaoymin', name: 'knife4j-core', version: "${knife4jVersion}"
  324. implementation group: 'com.github.xiaoymin', name: 'knife4j-spring-mvc', version: "${knife4jVersion}"
  325. implementation group: 'com.github.xiaoymin', name: 'knife4j-spring', version: "${knife4jVersion}"
  326. implementation group: 'com.github.xiaoymin', name: 'knife4j-spring-ui', version: "${knife4jVersion}"
  327. implementation group: 'com.github.xiaoymin', name: 'knife4j-spring-boot-starter', version: "${knife4jVersion}"
  328. implementation group: 'com.github.xiaoymin', name: 'knife4j-spring-boot-autoconfigure', version: "${knife4jVersion}"
  329. //local jars
  330. implementation fileTree(dir: "${rootDir}/maxkey-lib/", include: '*.jar')
  331. //阿里云
  332. implementation group: 'com.aliyun', name: 'aliyun-java-sdk-core', version: '4.5.1'
  333. //腾讯云
  334. implementation group: 'com.tencentcloudapi', name: 'tencentcloud-sdk-java', version: '3.1.33'
  335. //tomcat embed Core Tomcat implementation
  336. implementation group: 'org.apache.tomcat.embed', name: 'tomcat-embed-core', version: "${tomcatVersion}"
  337. //JULI logging implementation for embedded Tomcat
  338. implementation group: 'org.apache.tomcat.embed', name: 'tomcat-embed-logging-juli', version: '8.5.2'
  339. }
  340. jar {
  341. def currentTime = java.time.ZonedDateTime.now()
  342. manifest {
  343. attributes(
  344. "Implementation-Title": project.name,
  345. "Implementation-Vendor": project.vendor,
  346. "Created-By": project.author,
  347. "Implementation-Date": currentTime,
  348. "Implementation-Version": project.version
  349. )
  350. }
  351. }
  352. task copyjar2Release(type: Copy) {
  353. println "$buildDir/libs/ to $rootDir/build/maxkey-jars/"
  354. into "$rootDir/build/maxkey-jars/"
  355. from "$buildDir/libs/"
  356. include '*.jar'
  357. }
  358. task buildRelease(dependsOn:['build','jar']) {
  359. //项目名 项目所在的group version 版本号
  360. println "project " + project.name + ", group " + project.group +" , version " + project.version
  361. }
  362. }
  363. //copy Dep Jars to /build/maxkey-depjars,only maxkey-common deps
  364. project('maxkey-common') {
  365. task copyDepJars(type: Copy){
  366. def paths = ["$rootDir/build/MaxKey-v${project.version}GA",
  367. "$rootDir/build/MaxKey-v${project.version}GA/maxkey",
  368. "$rootDir/build/MaxKey-v${project.version}GA/maxkey_mgt",
  369. "$rootDir/build/MaxKey-v${project.version}GA/maxkey_lib"];
  370. //遍历数组,调用createDir闭包,创建目录
  371. paths.forEach(){path->
  372. File dir=new File(path);
  373. if (!dir.exists()){
  374. print("create "+path+"\n")
  375. dir.mkdirs();
  376. }
  377. };
  378. println "copy Dep Jars to $rootDir/build/MaxKey-v${project.version}GA/maxkey_lib"
  379. from configurations.runtimeClasspath
  380. into "$rootDir/build/MaxKey-v${project.version}GA/maxkey_lib";
  381. }
  382. }
  383. task copyMaxKey(type: Copy) {
  384. from "$rootDir/build/maxkey-jars/maxkey-authentication-social-${project.version}.jar"
  385. from "$rootDir/build/maxkey-jars/maxkey-web-maxkey-${project.version}.jar"
  386. into "$rootDir/build/MaxKey-v${project.version}GA/maxkey/";
  387. }
  388. task copyMaxKeyMgt(type: Copy) {
  389. from "$rootDir/build/maxkey-jars/maxkey-identity-rest-${project.version}.jar"
  390. from "$rootDir/build/maxkey-jars/maxkey-identity-scim-${project.version}.jar"
  391. from "$rootDir/build/maxkey-jars/maxkey-web-manage-${project.version}.jar"
  392. into "$rootDir/build/MaxKey-v${project.version}GA/maxkey_mgt/";
  393. }
  394. task copyMaxKeyLibs(type: Copy) {
  395. from "$rootDir/build/maxkey-jars/maxkey-authentication-otp-${project.version}.jar"
  396. from "$rootDir/build/maxkey-jars/maxkey-authentication-captcha-${project.version}.jar"
  397. from "$rootDir/build/maxkey-jars/maxkey-authentication-core-${project.version}.jar"
  398. from "$rootDir/build/maxkey-jars/maxkey-common-${project.version}.jar"
  399. from "$rootDir/build/maxkey-jars/maxkey-core-${project.version}.jar"
  400. from "$rootDir/build/maxkey-jars/maxkey-persistence-${project.version}.jar"
  401. from "$rootDir/build/maxkey-jars/maxkey-protocol-authorize-${project.version}.jar"
  402. from "$rootDir/build/maxkey-jars/maxkey-protocol-cas-${project.version}.jar"
  403. from "$rootDir/build/maxkey-jars/maxkey-protocol-desktop-${project.version}.jar"
  404. from "$rootDir/build/maxkey-jars/maxkey-protocol-extendapi-${project.version}.jar"
  405. from "$rootDir/build/maxkey-jars/maxkey-protocol-formbased-${project.version}.jar"
  406. from "$rootDir/build/maxkey-jars/maxkey-protocol-jwt-${project.version}.jar"
  407. from "$rootDir/build/maxkey-jars/maxkey-protocol-oauth-2.0-${project.version}.jar"
  408. from "$rootDir/build/maxkey-jars/maxkey-protocol-saml-2.0-${project.version}.jar"
  409. from "$rootDir/build/maxkey-jars/maxkey-protocol-tokenbased-${project.version}.jar"
  410. into "$rootDir/build/MaxKey-v${project.version}GA/maxkey_lib";
  411. }
  412. task copyMaxKeyShellScript(type: Copy) {
  413. from "$rootDir/shellscript"
  414. into "$rootDir/build/MaxKey-v${project.version}GA/";
  415. }
  416. task buildReleaseCopy(dependsOn:['copyMaxKey','copyMaxKeyMgt','copyMaxKeyLibs','copyMaxKeyShellScript']) {
  417. //项目名
  418. println "project ReleaseCopy ."
  419. }
  420. task buildRelease(dependsOn:['build']) {
  421. //项目名 项目所在的group version 版本号
  422. println "project " + project.name + ", group " + project.group +" , version " + project.version
  423. //项目的绝对路径
  424. println "project projectDir " + project.projectDir
  425. //项目的build文件绝对路径
  426. println "project buildDir " + project.buildDir
  427. }
  428. // In this section you declare the dependencies for your production and test code
  429. dependencies {
  430. }