build.gradle 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. buildscript {
  2. ext {
  3. springBootVersion = '1.5.7.RELEASE'
  4. dockerVersion = '0.12.0'
  5. dcokerRegistry = "10.10.100.200:5000"
  6. }
  7. repositories {
  8. mavenLocal()
  9. maven { url "https://plugins.gradle.org/m2/" }
  10. maven { url "http://maven.aliyun.com/nexus/content/groups/public/" }
  11. maven { url 'http://10.10.101.21:8081/artifactory/ext-release-local' }
  12. jcenter()
  13. mavenCentral()
  14. }
  15. dependencies {
  16. classpath "org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}"
  17. classpath "gradle.plugin.com.palantir.gradle.docker:gradle-docker:${dockerVersion}"
  18. }
  19. }
  20. group 'com.uas.platform.oos'
  21. version '1.0.3'
  22. apply plugin: "com.palantir.docker"
  23. apply plugin: 'org.springframework.boot'
  24. apply plugin: 'maven-publish'
  25. apply from: "$rootDir/gradle/tasks.gradle"
  26. dependencies {
  27. compile project(":oos-core")
  28. compile "org.springframework.boot:spring-boot-starter-web"
  29. compile "org.springframework.boot:spring-boot-starter-thymeleaf"
  30. compile "org.webjars:webjars-locator"
  31. compile "org.webjars:jquery:2.1.1"
  32. compile "org.webjars:angularjs:1.4.3"
  33. compile "org.webjars:bootstrap:3.2.0"
  34. testCompile "org.springframework.boot:spring-boot-starter-test"
  35. }
  36. jar {
  37. baseName = project.name
  38. version = ''
  39. }
  40. publishing {
  41. publications {
  42. // Publish maven snapshot
  43. coreSnapshot(MavenPublication) {
  44. groupId project.group
  45. artifactId project.name
  46. version project.version
  47. artifact source: "${buildDir}/libs/${project.name}.jar", extension: 'jar'
  48. // artifact "${buildDir}/libs/${project.name}.jar"
  49. }
  50. }
  51. repositories {
  52. maven {
  53. credentials {
  54. username "yingp"
  55. password "111111"
  56. }
  57. url "http://10.10.101.21:8081/artifactory/libs-release-local"
  58. }
  59. }
  60. }
  61. build.finalizedBy(publish, publishToMavenLocal)