build.gradle 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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. }
  5. allprojects {
  6. group 'com.usoftchina.uas'
  7. version '1.0.0-SNAPSHOT'
  8. }
  9. subprojects { Project subproject ->
  10. if (subproject.hasProperty('projVersion')) {
  11. subproject.version = subproject.projVersion
  12. } else {
  13. subproject.version = '1.0.0-SNAPSHOT'
  14. }
  15. apply plugin: 'java'
  16. apply plugin: 'idea'
  17. apply plugin: 'maven'
  18. apply plugin: 'maven-publish'
  19. apply plugin: 'io.spring.dependency-management'
  20. sourceCompatibility = 1.8
  21. targetCompatibility = 1.8
  22. [compileJava,compileTestJava,javadoc]*.options*.encoding = 'UTF-8'
  23. ext {
  24. springBootVersion = '2.1.4.RELEASE'
  25. // dependencies
  26. ojdbc = 'com.oracle:ojdbc6:11.2.0'
  27. fastjson = 'com.alibaba:fastjson:1.2.47'
  28. threadLocal = 'com.alibaba:transmittable-thread-local:2.2.0'
  29. // repoBaseUrl = "https://maven.ubtob.net/artifactory"
  30. repoBaseUrl = "http://10.1.81.211:8082/artifactory"
  31. snapshotUrl = "$repoBaseUrl/libs-snapshot-local"
  32. releaseUrl = "$repoBaseUrl/libs-release-local"
  33. }
  34. repositories {
  35. mavenLocal()
  36. mavenCentral()
  37. maven { url "https://repo.spring.io/libs-milestone" }
  38. maven { url "http://maven.aliyun.com/nexus/content/groups/public/" }
  39. maven {
  40. url "https://maven.ubtob.net/artifactory/libs-snapshot-local"
  41. credentials {
  42. username 'admin'
  43. password 'Admin2020yourkj2021'
  44. }
  45. }
  46. maven {
  47. url "https://maven.ubtob.net/artifactory/libs-release-local"
  48. credentials {
  49. username 'admin'
  50. password 'Admin2020yourkj2021'
  51. }
  52. }
  53. maven {
  54. url "https://maven.ubtob.net/artifactory/ext-release-local"
  55. credentials {
  56. username 'admin'
  57. password 'Admin2020yourkj2021'
  58. }
  59. }
  60. }
  61. dependencyManagement {
  62. imports {
  63. mavenBom "org.springframework.boot:spring-boot-dependencies:${springBootVersion}"
  64. }
  65. }
  66. task sourcesJar(type: Jar) {
  67. from sourceSets.main.allJava
  68. classifier 'sources'
  69. }
  70. artifacts {
  71. archives sourcesJar
  72. }
  73. publishing {
  74. publications {
  75. plugins(MavenPublication) {
  76. from components.java
  77. artifact sourcesJar
  78. }
  79. }
  80. repositories {
  81. maven {
  82. url project.version.endsWith('-SNAPSHOT') ? snapshotUrl : releaseUrl
  83. credentials {
  84. username = 'admin'
  85. password = 'Admin2020yourkj2021'
  86. }
  87. }
  88. }
  89. }
  90. }