build.gradle 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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. snapshotUrl = "$repoBaseUrl/libs-snapshot-local"
  31. releaseUrl = "$repoBaseUrl/libs-release-local"
  32. }
  33. repositories {
  34. mavenLocal()
  35. mavenCentral()
  36. maven { url "https://repo.spring.io/libs-milestone" }
  37. maven { url "http://maven.aliyun.com/nexus/content/groups/public/" }
  38. maven {
  39. url "https://maven.ubtob.net/artifactory/libs-snapshot-local"
  40. credentials {
  41. username 'admin'
  42. password 'Admin2020yourkj2021'
  43. }
  44. }
  45. maven {
  46. url "https://maven.ubtob.net/artifactory/libs-release-local"
  47. credentials {
  48. username 'admin'
  49. password 'Admin2020yourkj2021'
  50. }
  51. }
  52. maven {
  53. url "https://maven.ubtob.net/artifactory/ext-release-local"
  54. credentials {
  55. username 'admin'
  56. password 'Admin2020yourkj2021'
  57. }
  58. }
  59. }
  60. dependencyManagement {
  61. imports {
  62. mavenBom "org.springframework.boot:spring-boot-dependencies:${springBootVersion}"
  63. }
  64. }
  65. task sourcesJar(type: Jar) {
  66. from sourceSets.main.allJava
  67. classifier 'sources'
  68. }
  69. artifacts {
  70. archives sourcesJar
  71. }
  72. publishing {
  73. publications {
  74. plugins(MavenPublication) {
  75. from components.java
  76. artifact sourcesJar
  77. }
  78. }
  79. repositories {
  80. maven {
  81. url project.version.endsWith('-SNAPSHOT') ? snapshotUrl : releaseUrl
  82. credentials {
  83. username = 'admin'
  84. password = 'Admin2020yourkj2021'
  85. }
  86. }
  87. }
  88. }
  89. }