build.gradle 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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 = "http://maven.ubtob.com/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 { url "http://maven.ubtob.com/artifactory/libs-snapshot-local" }
  39. maven { url "http://maven.ubtob.com/artifactory/libs-release-local" }
  40. maven { url "http://maven.ubtob.com/artifactory/ext-release-local" }
  41. }
  42. dependencyManagement {
  43. imports {
  44. mavenBom "org.springframework.boot:spring-boot-dependencies:${springBootVersion}"
  45. }
  46. }
  47. task sourcesJar(type: Jar) {
  48. from sourceSets.main.allJava
  49. classifier 'sources'
  50. }
  51. artifacts {
  52. archives sourcesJar
  53. }
  54. publishing {
  55. publications {
  56. plugins(MavenPublication) {
  57. from components.java
  58. artifact sourcesJar
  59. }
  60. }
  61. repositories {
  62. maven {
  63. url project.version.endsWith('-SNAPSHOT') ? snapshotUrl : releaseUrl
  64. credentials {
  65. username = 'yingp'
  66. password = '111111'
  67. }
  68. }
  69. }
  70. }
  71. }