-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
134 lines (117 loc) · 3.51 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
group 'com.dish.external'
version '0.0.2'
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'spring-boot'
allprojects {
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
buildscript {
ext {
springBootVersion = '1.3.3.RELEASE'
configClientVersion = '1.0.2.RELEASE'
dishZipkinVersion = '1.0.0'
lombokVersion = '1.12.2'
gradleGitPropertiesVersion = '1.4.11'
}
repositories {
maven {
//external repo
url "http://repo1.maven.org/maven2"
//Dish internal repo
//url 'https://.....dish.com/artifactory/repo'
}
}
dependencies {
classpath "org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion"
}
}
task wrapper(type: Wrapper) {
gradleVersion = '2.13'
}
repositories {
//external repos
maven {
url "http://repo.spring.io/release"
}
maven {
url "http://repo1.maven.org/maven2"
}
maven {
url "http://repo.spring.io/snapshot"
}
maven {
url "http://repo.spring.io/milestone"
}
jcenter {
url "http://jcenter.bintray.com/"
}
//Dish internal repo
maven {
url "http://repo.spring.io/release"
//url 'https://.....dish.com/artifactory/repo'
}
}
task genJaxb {
ext.sourcesDir = "${buildDir}/generated-sources/jaxb"
ext.classesDir = "${buildDir}/classes/jaxb"
ext.schema = "src/main/resources/wsdl/Demo-v1.wsdl"
outputs.dir classesDir
doLast() {
project.ant {
taskdef name: "xjc", classname: "com.sun.tools.xjc.XJCTask",
classpath: configurations.jaxb.asPath
mkdir(dir: sourcesDir)
mkdir(dir: classesDir)
xjc(destdir: sourcesDir, schema: schema) {
arg(value: "-wsdl")
produces(dir: sourcesDir, includes: "**/*.java")
}
javac(destdir: classesDir, source: 1.8, target: 1.8, debug: true,
debugLevel: "lines,vars,source",
classpath: configurations.jaxb.asPath) {
src(path: sourcesDir)
include(name: "**/*.java")
include(name: "*.java")
}
copy(todir: classesDir) {
fileset(dir: sourcesDir, erroronmissingdir: false) {
exclude(name: "**/*.java")
}
}
}
}
}
configurations {
jaxb
}
jar {
baseName = 'springone-demo-app'
from genJaxb.classesDir
}
dependencies {
compile(
"org.springframework.boot:spring-boot-starter",
"org.springframework.boot:spring-boot-starter-actuator",
"io.pivotal.spring.cloud:spring-cloud-services-starter-config-client:$configClientVersion",
"org.projectlombok:lombok:$lombokVersion",
"ch.qos.logback:logback-classic",
"org.springframework.cloud:spring-cloud-starter-zipkin:1.0.0.RC2",
"io.springfox:springfox-swagger-ui:2.4.0",
"io.springfox:springfox-swagger2:2.4.0",
"org.springframework.ws:spring-ws-core:2.2.2.RELEASE",
"org.apache.httpcomponents:httpclient:4.5.2",
"wsdl4j:wsdl4j:1.6.1",
files(genJaxb.classesDir).builtBy(genJaxb)
//"org.springframework.boot:spring-boot-starter-jdbc:$springBootVersion",
//"ojdbc6:ojdbc6:11.2.0.4"
)
jaxb("com.sun.xml.bind:jaxb-xjc:2.2.4-1")
testCompile(
'org.springframework.boot:spring-boot-starter-test'
)
bootRun {
systemProperties System.properties
}
}