build.gradle 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. plugins {
  2. id "io.spring.dependency-management" version "1.0.7.RELEASE" apply false
  3. id "org.springframework.boot" version "2.1.4.RELEASE" apply false
  4. id "io.freefair.lombok" version "5.0.0-rc4" apply false
  5. id 'com.bmuschko.docker-spring-boot-application' version '6.3.0' apply false
  6. }
  7. allprojects {
  8. group 'com.usoftchina.saas'
  9. version '1.0.0-SNAPSHOT'
  10. }
  11. def env = System.getProperty("profile") ?: "dev"
  12. subprojects { Project subproject ->
  13. if (!subproject.name.matches(".*-(core|common|api|service|dto|server|client|sdk|starter|task)")) {
  14. return
  15. }
  16. if (env == "dev") {
  17. subproject.version = '1.0.0.SNAPSHOT'
  18. } else {
  19. subproject.version = '1.0.0.RELEASE'
  20. }
  21. apply plugin: 'java'
  22. apply plugin: 'idea'
  23. apply plugin: 'maven'
  24. apply plugin: 'maven-publish'
  25. apply plugin: 'io.spring.dependency-management'
  26. apply plugin: 'io.freefair.lombok'
  27. sourceCompatibility = 1.8
  28. targetCompatibility = 1.8
  29. [compileJava,compileTestJava,javadoc]*.options*.encoding = 'UTF-8'
  30. ext {
  31. springBootVersion = '2.1.4.RELEASE'
  32. // dependencies
  33. alibabaThreadLocal = 'com.alibaba:transmittable-thread-local:2.10.2'
  34. mysqlConnector = 'mysql:mysql-connector-java:6.0.6'
  35. mybatisSpringBoot = 'org.mybatis.spring.boot:mybatis-spring-boot-starter:2.0.1'
  36. pageHelperSpringBoot = 'com.github.pagehelper:pagehelper-spring-boot-starter:1.2.7'
  37. fastjson = 'com.alibaba:fastjson:1.2.47'
  38. guava = 'com.google.guava:guava:18.0'
  39. fastdfs = 'com.github.tobato:fastdfs-client:1.26.3'
  40. commonCompress = 'org.apache.commons:commons-compress:1.18'
  41. jjwt = 'io.jsonwebtoken:jjwt:0.7.0'
  42. poi = 'org.apache.poi:poi-ooxml:3.17'
  43. zxing = 'com.google.zxing:javase:3.3.0'
  44. aliyunSmsCore = 'com.aliyun:aliyun-java-sdk-core:4.0.3'
  45. qcloudSmsSdk = 'com.github.qcloudsms:qcloudsms:1.0.6'
  46. repoBaseUrl = "http://maven.ubtob.com/artifactory"
  47. snapshotUrl = "$repoBaseUrl/libs-snapshot-local"
  48. releaseUrl = "$repoBaseUrl/libs-release-local"
  49. dockerGroup = System.properties['dockerGroup']
  50. dockerRegistry = env == 'dev' ? '10.1.81.48:4000' : '10.10.100.200:5000'
  51. }
  52. repositories {
  53. mavenLocal()
  54. maven { url "http://maven.aliyun.com/nexus/content/groups/public/" }
  55. maven { url "https://repo.spring.io/libs-milestone" }
  56. maven { url "http://maven.ubtob.com/artifactory/libs-release-local" }
  57. maven { url "http://maven.ubtob.com/artifactory/libs-snapshot-local" }
  58. maven { url "http://maven.ubtob.com/artifactory/ext-release-local" }
  59. maven { url "https://artifactory.uuzcc.cn/artifactory/libs-snapshot-local" }
  60. mavenCentral()
  61. }
  62. dependencyManagement {
  63. imports {
  64. mavenBom "org.springframework.boot:spring-boot-dependencies:${springBootVersion}"
  65. }
  66. }
  67. lombok {
  68. config['lombok.equalsAndHashCode.callSuper'] = 'call'
  69. }
  70. task sourcesJar(type: Jar) {
  71. from sourceSets.main.allJava
  72. classifier 'sources'
  73. }
  74. artifacts {
  75. archives sourcesJar
  76. }
  77. publishing {
  78. publications {
  79. plugins(MavenPublication) {
  80. from components.java
  81. artifact sourcesJar
  82. }
  83. }
  84. repositories {
  85. maven {
  86. url subproject.version.endsWith('-SNAPSHOT') ? snapshotUrl : releaseUrl
  87. credentials {
  88. username = 'yingp'
  89. password = '111111'
  90. }
  91. }
  92. }
  93. }
  94. }