build.gradle 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. buildscript {
  2. ext {
  3. springBootVersion = '1.5.9.RELEASE'
  4. }
  5. repositories {
  6. maven { url 'https://plugins.gradle.org/m2/' }
  7. maven { url 'http://repo.spring.io/plugins-release' }
  8. maven { url 'http://113.105.74.141:8081/artifactory/libs-release-local' }
  9. jcenter()
  10. }
  11. dependencies {
  12. classpath("org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.5")
  13. classpath("com.uas.demo.mesh:spring-boot-docker-plugin:1.0.2")
  14. classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
  15. }
  16. }
  17. group 'com.uas.cloud.mall'
  18. version '0.1.6-MESH'
  19. apply plugin: 'java'
  20. apply plugin: 'maven'
  21. apply plugin: 'eclipse'
  22. apply plugin: "org.springframework.boot"
  23. apply plugin: 'com.uas.docker.spring.boot'
  24. // apply plugin: "org.sonarqube"
  25. sourceCompatibility = 1.8
  26. repositories {
  27. maven { url 'http://10.10.101.21:8081/artifactory/libs-snapshot' }
  28. maven { url 'http://10.10.101.21:8081/artifactory/libs-release' }
  29. maven { url "http://maven.aliyun.com/nexus/content/groups/public/" }
  30. jcenter()
  31. mavenCentral()
  32. }
  33. ext {
  34. springCloudVersion = 'Edgware.RELEASE'
  35. }
  36. dependencies {
  37. compile "org.springframework.boot:spring-boot-starter-web"
  38. compile "org.springframework.boot:spring-boot-actuator"
  39. compile "org.springframework.boot:spring-boot-starter-data-jpa"
  40. compile "mysql:mysql-connector-java:5.1.21"
  41. compile "org.hibernate:hibernate-validator:$hibernateValidatorVersion"
  42. compile("org.springframework.cloud:spring-cloud-starter-consul-discovery")
  43. compile "com.uas.cloud.base.commons:common:0.1.0"
  44. }
  45. dependencyManagement {
  46. imports {
  47. mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
  48. }
  49. }
  50. customDocker {
  51. baseImage 'hub.c.163.com/library/java:8-jre-alpine'
  52. registry '10.10.100.200:5000'
  53. }
  54. uploadArchives {
  55. repositories {
  56. mavenDeployer {
  57. repository(url: "http://10.10.101.21:8081/artifactory/libs-release-local") {
  58. authentication(userName: "yingp", password: "111111")
  59. }
  60. }
  61. }
  62. }.dependsOn build