选装售后
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

build.gradle 5.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. buildscript {
  2. ext {
  3. springBootVersion = '2.6.3'
  4. springCloudVersion = "2021.0.1"
  5. springCloudAlibabaVersion = "2021.0.1.0"
  6. projectArtifactId = 'qtzl'
  7. projectGroupId = "com.qtzl"
  8. projectVersion = "1.0.0-SNAPSHOT"
  9. isCommon = true
  10. imageVersion = System.getProperty("image.version", "v1");
  11. }
  12. repositories {
  13. // 使用国内阿里云仓库,下载速度快
  14. maven { url 'https://maven.aliyun.com/repository/gradle-plugin'}
  15. mavenCentral()
  16. }
  17. dependencies {
  18. classpath('com.bmuschko:gradle-docker-plugin:6.7.0')
  19. classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
  20. }
  21. }
  22. plugins {
  23. id 'java'
  24. }
  25. apply plugin: 'org.springframework.boot'
  26. apply plugin: 'io.spring.dependency-management'
  27. apply plugin: 'com.bmuschko.docker-remote-api'
  28. apply plugin: 'com.bmuschko.docker-spring-boot-application'
  29. group 'smp'
  30. version '1.0-SNAPSHOT'
  31. repositories {
  32. maven {
  33. allowInsecureProtocol = true
  34. url "http://maven.aliyun.com/nexus/content/groups/public/"
  35. }
  36. mavenCentral()
  37. maven {
  38. allowInsecureProtocol = true
  39. url 'https://maven.aliyun.com/repository/public'
  40. }
  41. maven {
  42. credentials {
  43. username '64478542840f2501c40fa2ca'
  44. password '8feFcmXsAbsj'
  45. }
  46. allowInsecureProtocol = true
  47. url 'https://packages.aliyun.com/maven/repository/2221276-release-00he5T/'
  48. }
  49. maven {
  50. credentials {
  51. username '64478542840f2501c40fa2ca'
  52. password '8feFcmXsAbsj'
  53. }
  54. allowInsecureProtocol = true
  55. url 'https://packages.aliyun.com/maven/repository/2221276-snapshot-nkXv85/'
  56. }
  57. }
  58. dependencies {
  59. implementation group: 'com.alibaba', name: 'druid-spring-boot-starter', version: '1.2.6'
  60. implementation group: 'org.reflections', name: 'reflections', version: '0.9.11'
  61. implementation group: 'com.txffp.study', name: 'smp-protocol', version: '1.0.2'
  62. implementation group: 'com.txffp.study', name: 'api-core', version: '1.0.0'
  63. implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
  64. implementation 'org.springframework.boot:spring-boot-starter-web'
  65. implementation group: 'org.springframework.boot', name: 'spring-boot-starter-validation'
  66. annotationProcessor "org.springframework.boot:spring-boot-configuration-processor"
  67. implementation group: 'cn.hutool',name:'hutool-all',version: '5.7.12'
  68. implementation 'cn.com.taiji.common:gly-common:5.1'
  69. implementation group: 'com.alibaba', name: 'fastjson', version: '2.0.4'
  70. implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0'
  71. implementation group: 'org.springframework.boot', name: 'spring-boot-starter-data-redis'
  72. implementation 'org.springframework.cloud:spring-cloud-starter-openfeign'
  73. implementation 'org.mybatis.spring.boot:mybatis-spring-boot-starter:2.1.3'
  74. implementation 'tk.mybatis:mapper-spring-boot-starter:2.1.5'
  75. implementation 'com.alibaba:druid:1.1.9'
  76. implementation 'com.alibaba:druid-spring-boot-starter:1.1.9'
  77. implementation group: 'mysql', name: 'mysql-connector-java'
  78. implementation group: 'org.mariadb.jdbc', name: 'mariadb-java-client', version: '3.1.4'
  79. implementation 'org.springframework.cloud:spring-cloud-starter-loadbalancer'
  80. implementation 'com.github.wechatpay-apiv3:wechatpay-java:0.2.12'
  81. implementation group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.13'
  82. implementation 'oracle:ojdbc:7'
  83. // https://mvnrepository.com/artifact/com.squareup.okhttp3/okhttp
  84. implementation group: 'com.squareup.okhttp3', name: 'okhttp', version: '4.10.0'
  85. implementation('org.springframework.boot:spring-boot-starter-test') {
  86. //in case of versions conflict '3.1' version of hibernate wins:
  87. //force = true
  88. //excluding a particular transitive dependency:
  89. exclude module: 'jsonassert' //by artifact name
  90. //exclude group: 'org.jmock' //by group
  91. //exclude group: 'org.skyscreamer', module: 'jsonassert' //by both name and group
  92. //disabling all transitive dependencies of this dependency
  93. //transitive = false
  94. }
  95. }
  96. dependencyManagement {
  97. imports {
  98. mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
  99. mavenBom "com.alibaba.cloud:spring-cloud-alibaba-dependencies:${springCloudAlibabaVersion}"
  100. }
  101. }
  102. task jarProtocol(type: Jar) {
  103. archiveBaseName = "${projectGroupId}"
  104. archiveAppendix = "${projectArtifactId}"
  105. archiveVersion = "${projectVersion}"
  106. // archiveClassifier = 'common'
  107. archiveExtension = 'jar'
  108. from("build/classes/java/main/com/qtzl/alterSales/request/")
  109. into('com/qtzl/alterSales/request/')
  110. }
  111. apply plugin: "maven-publish"
  112. publishing {
  113. publications {
  114. myPublication(MavenPublication) {
  115. groupId = "${projectGroupId}"
  116. artifactId = "${projectArtifactId}"
  117. version = "${projectVersion}"
  118. if (isCommon) {
  119. artifact jarProtocol
  120. } else {
  121. // 如果是war包填写components.web(需要javawar插件),如果是jar包填写components.java
  122. from components.java
  123. }
  124. }
  125. }
  126. repositories {
  127. maven {
  128. def snapshotsRepoUrl = null
  129. if ("${projectVersion}".contains("SNAPSHOT")) {
  130. snapshotsRepoUrl = "https://packages.aliyun.com/maven/repository/2221276-snapshot-nkXv85/"
  131. } else {
  132. snapshotsRepoUrl = "https://packages.aliyun.com/maven/repository/2221276-release-00he5T/"
  133. }
  134. url "$snapshotsRepoUrl"
  135. credentials {
  136. username = '64478542840f2501c40fa2ca'
  137. password = '8feFcmXsAbsj'
  138. }
  139. }
  140. }
  141. }