build.gradle 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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. apply plugin: 'java'
  11. apply plugin: 'idea'
  12. apply plugin: 'maven'
  13. apply plugin: 'maven-publish'
  14. apply plugin: 'io.spring.dependency-management'
  15. sourceCompatibility = 1.8
  16. targetCompatibility = 1.8
  17. [compileJava,compileTestJava,javadoc]*.options*.encoding = 'UTF-8'
  18. ext {
  19. springBootVersion = '2.1.4.RELEASE'
  20. // dependencies
  21. ojdbc = 'com.oracle:ojdbc6:11.2.0'
  22. fastjson = 'com.alibaba:fastjson:1.2.47'
  23. repoBaseUrl = "http://maven.ubtob.com/artifactory"
  24. snapshotUrl = "$repoBaseUrl/libs-snapshot-local"
  25. releaseUrl = "$repoBaseUrl/libs-release-local"
  26. }
  27. repositories {
  28. mavenLocal()
  29. mavenCentral()
  30. maven { url "http://repo.spring.io/libs-milestone" }
  31. maven { url "http://maven.aliyun.com/nexus/content/groups/public/" }
  32. maven { url "http://maven.ubtob.com/artifactory/libs-snapshot-local" }
  33. }
  34. dependencyManagement {
  35. imports {
  36. mavenBom "org.springframework.boot:spring-boot-dependencies:${springBootVersion}"
  37. }
  38. }
  39. task sourcesJar(type: Jar) {
  40. from sourceSets.main.allJava
  41. classifier 'sources'
  42. }
  43. artifacts {
  44. archives sourcesJar
  45. }
  46. publishing {
  47. publications {
  48. plugins(MavenPublication) {
  49. from components.java
  50. artifact sourcesJar
  51. }
  52. }
  53. repositories {
  54. maven {
  55. url project.version.endsWith('-SNAPSHOT') ? snapshotUrl : releaseUrl
  56. credentials {
  57. username = 'yingp'
  58. password = '111111'
  59. }
  60. }
  61. }
  62. }
  63. }