-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
62 lines (51 loc) · 1.31 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
ext {
springBootVersion = '1.1.8.RELEASE'
}
apply plugin: 'java'
apply plugin: 'spring-boot'
sourceCompatibility = 1.8
repositories {
mavenLocal()
mavenCentral()
jcenter()
}
buildscript {
repositories {
maven {
url 'http://maven.springframework.org/release'
}
maven {
url 'http://maven.springframework.org/milestone'
}
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.1.6.RELEASE")
}
}
dependencies {
compile group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: springBootVersion
compile 'io.reactivex:rxjava:1.0.0'
testCompile 'junit:junit:4.10'
}
task stage(type: Copy, dependsOn: [clean, build]) {
from jar.archivePath
into project.rootDir
rename {
'app.jar'
}
}
stage.mustRunAfter(clean)
clean << {
project.file('app.jar').delete()
}
task wrapper(type: Wrapper) {
description = "Generates gradlew scripts"
gradleVersion = "2.1"
doLast() {
def gradleOpts = "-Xmx512m -Dfile.encoding=utf8"
File wrapperFile = file("gradlew")
wrapperFile.text = wrapperFile.text.replace("DEFAULT_JVM_OPTS=",
"GRADLE_OPTS=\"$gradleOpts \$GRADLE_OPTS\"\nDEFAULT_JVM_OPTS=")
}
}