build.gradle 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. group 'com.uas.erp'
  2. version '1.0.0'
  3. buildscript {
  4. ext {
  5. springBootVersion = '1.4.4.RELEASE'
  6. dockerVersion = '0.12.0'
  7. dockerRegistry = "10.1.81.48:5000"
  8. }
  9. repositories {
  10. maven {
  11. url "https://maven.ubtob.net/artifactory/libs-release-local"
  12. credentials {
  13. username 'admin'
  14. password 'Admin2020yourkj2021'
  15. }
  16. }
  17. maven {
  18. url "https://maven.ubtob.net/artifactory/libs-snapshot-local"
  19. credentials {
  20. username 'admin'
  21. password 'Admin2020yourkj2021'
  22. }
  23. }
  24. maven { url "http://maven.aliyun.com/nexus/content/groups/public/" }
  25. maven { url "https://plugins.gradle.org/m2/" }
  26. maven { url "https://repo.spring.io/libs-release" }
  27. mavenCentral()
  28. jcenter()
  29. }
  30. dependencies {
  31. classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
  32. classpath "gradle.plugin.com.palantir.gradle.docker:gradle-docker:${dockerVersion}"
  33. }
  34. }
  35. apply plugin: 'idea'
  36. apply plugin: 'java'
  37. apply plugin: 'maven'
  38. apply plugin: 'org.springframework.boot'
  39. apply plugin: "com.palantir.docker"
  40. jar {
  41. baseName = project.name
  42. version = ''
  43. }
  44. sourceCompatibility = 1.7
  45. repositories {
  46. mavenLocal()
  47. maven {
  48. url "https://maven.ubtob.net/artifactory/libs-release-local"
  49. credentials {
  50. username 'admin'
  51. password 'Admin2020yourkj2021'
  52. }
  53. }
  54. maven {
  55. url "https://maven.ubtob.net/artifactory/ext-release-local"
  56. credentials {
  57. username 'admin'
  58. password 'Admin2020yourkj2021'
  59. }
  60. }
  61. maven {
  62. url "https://maven.ubtob.net/artifactory/libs-snapshot-local"
  63. credentials {
  64. username 'admin'
  65. password 'Admin2020yourkj2021'
  66. }
  67. }
  68. maven { url "https://maven.aliyun.com/nexus/content/groups/public/" }
  69. maven { url "https://repo.spring.io/libs-milestone" }
  70. maven { url "https://repo.spring.io/libs-release" }
  71. mavenCentral()
  72. }
  73. dependencyManagement {
  74. imports {
  75. mavenBom 'org.springframework.cloud:spring-cloud-dependencies:Camden.SR5'
  76. }
  77. }
  78. dependencies {
  79. compile 'org.springframework.boot:spring-boot-starter-data-jpa'
  80. compile "org.springframework.boot:spring-boot-starter-web"
  81. testCompile "org.springframework.boot:spring-boot-starter-test"
  82. compile "com.h2database:h2"
  83. compile "com.alibaba:fastjson:$fastjsonVersion"
  84. compile "com.uas.api:b2c-erp-api:$mallApiVersion"
  85. compile "org.projectlombok:lombok:1.18.4"
  86. compile "commons-io:commons-io:2.6"
  87. compile "com.usoft.framework:usoft-security-utils:dev-1.0-SNAPSHOT"
  88. }
  89. bootRun {
  90. addResources = true
  91. }
  92. docker {
  93. name "${dockerRegistry}/${project.name}:${project.version}"
  94. dockerfile "${projectDir}/src/main/docker/Dockerfile"
  95. files "${buildDir}/libs/${project.name}.jar"
  96. }.dependsOn build
  97. uploadArchives {
  98. repositories {
  99. mavenDeployer {
  100. repository(url: "https://maven.ubtob.net/artifactory/libs-release-local") {
  101. authentication(userName: "admin", password: "Admin2020yourkj2021")
  102. }
  103. }
  104. }
  105. }.dependsOn build