build.gradle 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. plugins {
  2. id "io.spring.dependency-management" version "1.0.7.RELEASE"
  3. id "org.springframework.boot" version "1.5.6.RELEASE"
  4. }
  5. group 'com.usoftchina.saas'
  6. version '1.0.0-SNAPSHOT'
  7. if (project.hasProperty('projVersion')) {
  8. project.version = project.projVersion
  9. } else {
  10. project.version = '1.0.0-SNAPSHOT'
  11. }
  12. apply plugin: 'java'
  13. apply plugin: 'idea'
  14. apply plugin: 'maven'
  15. apply plugin: 'maven-publish'
  16. apply plugin: 'org.springframework.boot'
  17. sourceCompatibility = 1.8
  18. targetCompatibility = 1.8
  19. [compileJava,compileTestJava,javadoc]*.options*.encoding = 'UTF-8'
  20. ext {
  21. springBootVersion = '1.5.6.RELEASE'
  22. repoBaseUrl = "http://maven.ubtob.com/artifactory"
  23. snapshotUrl = "$repoBaseUrl/libs-snapshot-local"
  24. releaseUrl = "$repoBaseUrl/libs-release-local"
  25. }
  26. repositories {
  27. mavenLocal()
  28. mavenCentral()
  29. maven { url "http://repo.spring.io/libs-milestone" }
  30. maven { url "http://maven.aliyun.com/nexus/content/groups/public/" }
  31. maven { url "http://maven.ubtob.com/artifactory/libs-snapshot-local" }
  32. maven { url "http://maven.ubtob.com/artifactory/libs-release-local" }
  33. maven { url "http://maven.ubtob.com/artifactory/ext-release-local" }
  34. }
  35. dependencyManagement {
  36. imports {
  37. mavenBom "org.springframework.boot:spring-boot-dependencies:${springBootVersion}"
  38. }
  39. }
  40. dependencies {
  41. compile "org.springframework.boot:spring-boot-starter-web"
  42. testCompile "org.springframework.boot:spring-boot-starter-test"
  43. compile 'org.springframework.boot:spring-boot-starter-jdbc'
  44. compile 'org.springframework.boot:spring-boot-starter-aop'
  45. compile "org.springframework.boot:spring-boot-starter-freemarker"
  46. compile "org.springframework.boot:spring-boot-starter-mail"
  47. compile "com.uas.account:sso-integration:1.2.4-SNAPSHOT"
  48. compile "com.oracle:ojdbc6:11.2.0"
  49. compile "com.belerweb:pinyin4j:2.5.1"
  50. }
  51. task sourcesJar(type: Jar) {
  52. from sourceSets.main.allJava
  53. classifier 'sources'
  54. }
  55. artifacts {
  56. archives sourcesJar
  57. }
  58. publishing {
  59. publications {
  60. plugins(MavenPublication) {
  61. from components.java
  62. artifact sourcesJar
  63. }
  64. }
  65. repositories {
  66. maven {
  67. url project.version.endsWith('-SNAPSHOT') ? snapshotUrl : releaseUrl
  68. credentials {
  69. username = 'yingp'
  70. password = '111111'
  71. }
  72. }
  73. }
  74. }