service-base.gradle 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. buildscript {
  2. ext {
  3. springBootVersion = '1.4.4.RELEASE'
  4. }
  5. repositories {
  6. maven { url "http://maven.aliyun.com/nexus/content/groups/public/" }
  7. mavenCentral()
  8. jcenter()
  9. }
  10. dependencies {
  11. classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
  12. }
  13. }
  14. apply plugin: 'idea'
  15. apply plugin: 'eclipse'
  16. apply plugin: 'java'
  17. //apply plugin: 'spring-boot'
  18. apply plugin: org.springframework.boot.gradle.plugin.SpringBootPlugin // applying a plugin by plugin id is not supported in script plugins. You must use the plugin's fully qualified class name.
  19. sourceCompatibility = 1.8 // 必须在apply java插件之后
  20. targetCompatibility = 1.8
  21. bootRun {
  22. addResources = true
  23. }
  24. idea {
  25. module {
  26. downloadSources = true
  27. downloadJavadoc = false
  28. inheritOutputDirs = false
  29. outputDir = file("$buildDir/classes/main/")
  30. }
  31. }
  32. repositories {
  33. mavenLocal()
  34. maven { url "http://maven.aliyun.com/nexus/content/groups/public/" }
  35. maven {
  36. url 'http://10.10.101.21:8081/artifactory/libs-release'
  37. }
  38. maven {
  39. url 'http://10.10.101.21:8081/artifactory/libs-snapshot'
  40. }
  41. maven {
  42. url 'http://10.10.101.21:8081/artifactory/plugins-snapshot'
  43. }
  44. mavenCentral()
  45. }
  46. dependencyManagement {
  47. imports {
  48. mavenBom 'org.springframework.cloud:spring-cloud-dependencies:Camden.SR5'
  49. }
  50. }
  51. dependencies {
  52. testCompile 'org.springframework.boot:spring-boot-starter-test'
  53. compile 'org.springframework.cloud:spring-cloud-starter-config'
  54. compile 'org.springframework.boot:spring-boot-devtools'
  55. compile 'org.springframework.cloud:spring-cloud-starter-eureka'
  56. }