选装售后
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

build.gradle 6.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  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.apache.poi', name: 'poi-ooxml', version: '3.16'
  61. implementation group: 'org.reflections', name: 'reflections', version: '0.9.11'
  62. implementation group: 'com.txffp.study', name: 'smp-protocol', version: '1.0.2'
  63. implementation group: 'com.txffp.study', name: 'api-core', version: '1.0.0'
  64. implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
  65. implementation 'org.springframework.boot:spring-boot-starter-web'
  66. implementation group: 'org.springframework.boot', name: 'spring-boot-starter-validation'
  67. annotationProcessor "org.springframework.boot:spring-boot-configuration-processor"
  68. implementation group: 'cn.hutool',name:'hutool-all',version: '5.7.12'
  69. implementation 'cn.com.taiji.common:gly-common:5.1'
  70. implementation group: 'com.alibaba', name: 'fastjson', version: '2.0.4'
  71. implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0'
  72. implementation group: 'org.springframework.boot', name: 'spring-boot-starter-data-redis'
  73. implementation 'org.springframework.cloud:spring-cloud-starter-openfeign'
  74. implementation 'org.mybatis.spring.boot:mybatis-spring-boot-starter:2.1.3'
  75. implementation 'tk.mybatis:mapper-spring-boot-starter:2.1.5'
  76. implementation 'com.alibaba:druid:1.1.9'
  77. implementation 'com.alibaba:druid-spring-boot-starter:1.1.9'
  78. implementation group: 'mysql', name: 'mysql-connector-java'
  79. implementation group: 'org.mariadb.jdbc', name: 'mariadb-java-client', version: '3.1.4'
  80. implementation 'org.springframework.cloud:spring-cloud-starter-loadbalancer'
  81. implementation 'com.github.wechatpay-apiv3:wechatpay-java:0.2.12'
  82. implementation group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.13'
  83. implementation 'oracle:ojdbc:7'
  84. // https://mvnrepository.com/artifact/com.squareup.okhttp3/okhttp
  85. implementation group: 'com.squareup.okhttp3', name: 'okhttp', version: '4.10.0'
  86. implementation group: 'org.apache.httpcomponents', name: 'httpmime', version: '4.4'
  87. implementation('org.springframework.boot:spring-boot-starter-test') {
  88. //in case of versions conflict '3.1' version of hibernate wins:
  89. //force = true
  90. //excluding a particular transitive dependency:
  91. exclude module: 'jsonassert' //by artifact name
  92. //exclude group: 'org.jmock' //by group
  93. //exclude group: 'org.skyscreamer', module: 'jsonassert' //by both name and group
  94. //disabling all transitive dependencies of this dependency
  95. //transitive = false
  96. }
  97. }
  98. dependencyManagement {
  99. imports {
  100. mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
  101. mavenBom "com.alibaba.cloud:spring-cloud-alibaba-dependencies:${springCloudAlibabaVersion}"
  102. }
  103. }
  104. task jarProtocol(type: Jar) {
  105. archiveBaseName = "${projectGroupId}"
  106. archiveAppendix = "${projectArtifactId}"
  107. archiveVersion = "${projectVersion}"
  108. // archiveClassifier = 'common'
  109. archiveExtension = 'jar'
  110. from("build/classes/java/main/com/qtzl/alterSales/request/")
  111. into('com/qtzl/alterSales/request/')
  112. }
  113. apply plugin: "maven-publish"
  114. publishing {
  115. publications {
  116. myPublication(MavenPublication) {
  117. groupId = "${projectGroupId}"
  118. artifactId = "${projectArtifactId}"
  119. version = "${projectVersion}"
  120. if (isCommon) {
  121. artifact jarProtocol
  122. } else {
  123. // 如果是war包填写components.web(需要javawar插件),如果是jar包填写components.java
  124. from components.java
  125. }
  126. }
  127. }
  128. repositories {
  129. maven {
  130. def snapshotsRepoUrl = null
  131. if ("${projectVersion}".contains("SNAPSHOT")) {
  132. snapshotsRepoUrl = "https://packages.aliyun.com/maven/repository/2221276-snapshot-nkXv85/"
  133. } else {
  134. snapshotsRepoUrl = "https://packages.aliyun.com/maven/repository/2221276-release-00he5T/"
  135. }
  136. url "$snapshotsRepoUrl"
  137. credentials {
  138. username = '64478542840f2501c40fa2ca'
  139. password = '8feFcmXsAbsj'
  140. }
  141. }
  142. }
  143. }