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 5.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  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"
  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. id 'war'
  25. }
  26. apply plugin: 'org.springframework.boot'
  27. apply plugin: 'io.spring.dependency-management'
  28. apply plugin: 'com.bmuschko.docker-remote-api'
  29. apply plugin: 'com.bmuschko.docker-spring-boot-application'
  30. group 'smp'
  31. version '1.0-SNAPSHOT'
  32. repositories {
  33. maven {
  34. allowInsecureProtocol = true
  35. url "http://maven.aliyun.com/nexus/content/groups/public/"
  36. }
  37. mavenCentral()
  38. maven {
  39. allowInsecureProtocol = true
  40. url 'https://maven.aliyun.com/repository/public'
  41. }
  42. maven {
  43. credentials {
  44. username '626619cd2c14288da07d9e37'
  45. password '4Tfr(nr=4zMT'
  46. }
  47. allowInsecureProtocol = true
  48. url 'https://packages.aliyun.com/maven/repository/2221276-release-00he5T/'
  49. }
  50. maven {
  51. credentials {
  52. username '626619cd2c14288da07d9e37'
  53. password '4Tfr(nr=4zMT'
  54. }
  55. allowInsecureProtocol = true
  56. url 'https://packages.aliyun.com/maven/repository/2221276-snapshot-nkXv85/'
  57. }
  58. }
  59. dependencies {
  60. implementation group: 'com.alibaba', name: 'druid-spring-boot-starter', version: '1.2.6'
  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 'org.springframework.cloud:spring-cloud-starter-loadbalancer'
  79. implementation 'com.jcraft:jsch:0.1.55'
  80. implementation group: 'mysql', name: 'mysql-connector-java'
  81. implementation 'org.apache.httpcomponents:httpcore:4.4.6'
  82. implementation 'org.apache.httpcomponents:httpclient:4.5'
  83. implementation 'com.qtzl.record:logs:2.0.0-SNAPSHOT'
  84. implementation 'com.qtzl.record:dict:1.3.0-SNAPSHOT'
  85. implementation 'org.springframework.boot:spring-boot-starter-websocket'
  86. implementation 'com.squareup.okhttp3:okhttp:3.5.0'
  87. }
  88. dependencyManagement {
  89. imports {
  90. mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
  91. mavenBom "com.alibaba.cloud:spring-cloud-alibaba-dependencies:${springCloudAlibabaVersion}"
  92. }
  93. }
  94. task jarProtocol(type: Jar) {
  95. archiveBaseName = "${projectGroupId}"
  96. archiveAppendix = "${projectArtifactId}"
  97. archiveVersion = "${projectVersion}"
  98. // archiveClassifier = 'common'
  99. archiveExtension = 'jar'
  100. from("build/classes/java/main/com/qtzl/sample/request/")
  101. into('com/qtzl/sample/request/')
  102. }
  103. apply plugin: "maven-publish"
  104. publishing {
  105. publications {
  106. myPublication(MavenPublication) {
  107. groupId = "${projectGroupId}"
  108. artifactId = "${projectArtifactId}"
  109. version = "${projectVersion}"
  110. if (isCommon) {
  111. artifact jarProtocol
  112. } else {
  113. // 如果是war包填写components.web(需要javawar插件),如果是jar包填写components.java
  114. from components.java
  115. }
  116. }
  117. }
  118. repositories {
  119. maven {
  120. def snapshotsRepoUrl = null
  121. if ("${projectVersion}".contains("SNAPSHOT")) {
  122. snapshotsRepoUrl = "https://packages.aliyun.com/maven/repository/2221276-snapshot-nkXv85/"
  123. } else {
  124. snapshotsRepoUrl = "https://packages.aliyun.com/maven/repository/2221276-release-00he5T/"
  125. }
  126. url "$snapshotsRepoUrl"
  127. credentials {
  128. username = '626619cd2c14288da07d9e37'
  129. password = '4Tfr(nr=4zMT'
  130. }
  131. }
  132. }
  133. }