-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
105 lines (92 loc) · 3.72 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
group 'com.roger.springcloud.gradle.example'
version '1.0-SNAPSHOT'
apply plugin: 'java'
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
task wrapper(type: Wrapper) {
gradleVersion = '3.3'
distributionUrl = "https://downloads.gradle.org/distributions/gradle-3.3-bin.zip"
}
repositories {
// mavenLocal()
maven { url "http://maven.aliyun.com/nexus/content/groups/public/" }
maven { url "http://maven.aliyun.com/nexus/content/repositories/gradleplugins/" }
maven { url "http://maven.aliyun.com/nexus/content/repositories/jcenter/" }
mavenCentral()
jcenter()
}
buildscript {
ext {
// springBootVersion = '1.4.0.RELEASE'
springBootVersion = '1.4.3.RELEASE'
}
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
options.incremental = true
}
repositories {
// mavenLocal()
maven { url "d:/repo/maven"}
maven { url "http://maven.aliyun.com/nexus/content/groups/public/" }
maven { url "http://maven.aliyun.com/nexus/content/repositories/gradleplugins/" }
jcenter { url "http://maven.aliyun.com/nexus/content/repositories/jcenter/" }
mavenCentral()
// jcenter()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath('com.bmuschko:gradle-docker-plugin:3.0.5')
// classpath("com.jdroidframework:jdroid-gradle-plugin:0.10.1")
}
}
dependencies {
testCompile group: 'org.hamcrest', name: 'hamcrest-core', version: '1.3'
testCompile group: 'junit', name: 'junit', version: '4.11'
}
subprojects {
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'org.springframework.boot'
apply plugin: "io.spring.dependency-management"
apply plugin: 'com.bmuschko.docker-remote-api'
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
ext {
springBootVersion = '1.4.3.RELEASE'
}
repositories {
// mavenLocal()
maven { url "d:/repo/maven"}
maven { url "http://maven.aliyun.com/nexus/content/groups/public/" }
maven { url "http://maven.aliyun.com/nexus/content/repositories/gradleplugins/" }
jcenter { url "http://maven.aliyun.com/nexus/content/repositories/jcenter/" }
mavenCentral()
// jcenter()
}
buildscript {
repositories {
// mavenLocal() 让 Gradle使用与Maven相同的策略去定位本地Maven缓存的位置。如果在settings.xml中定义了本地Maven仓库的地址,则使用该地址。在USER_HOME/.m2下的settings.xml文件中的配置会覆盖存放在M2_HOME/conf下的settings.xml文件中的配置。如果没有settings.xml配置文件,Gradle会使用默认的USER_HOME/.m2/repository地址。
maven { url "d:/repo/maven"}
maven { url "http://maven.aliyun.com/nexus/content/groups/public/" }
maven { url "http://maven.aliyun.com/nexus/content/repositories/gradleplugins/" }
jcenter { url "http://maven.aliyun.com/nexus/content/repositories/jcenter/" }
mavenCentral()
// jcenter()
}
dependencies {
//classpath 相当于maven的插件
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath('com.bmuschko:gradle-docker-plugin:3.0.5')
}
}
dependencyManagement {
imports {
mavenBom 'org.springframework.cloud:spring-cloud-dependencies:Camden.SR4'
}
}
if (project.parent == null) {
buildDir = new File(rootProject.buildDir, project.name)
} else {
buildDir = new File(project.parent.buildDir, project.name)
}
}