-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
63 lines (51 loc) · 1.3 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
apply plugin: 'groovy'
apply plugin: 'application'
sourceCompatibility = 1.7
targetCompatibility = 1.7
mainClassName = 'com.cholick.demo.ReloadingApplication'
String springloadedVersion = '1.2.0.RELEASE'
repositories {
mavenLocal()
mavenCentral()
}
configurations {
agent
}
dependencies {
compile 'org.codehaus.groovy:groovy-all:2.3.4'
compile 'io.dropwizard:dropwizard-core:0.7.1'
//jersey-client needed due to http://issues.gradle.org/browse/GRADLE-2647
compile 'com.sun.jersey:jersey-client:1.18'
agent "org.springframework:springloaded:${springloadedVersion}"
}
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.bluepapa32:gradle-watch-plugin:0.1.3'
}
}
run {
args = ['server', 'app.yaml']
jvmArgs = ["-javaagent:${new File("$buildDir/agent/springloaded-${springloadedVersion}.jar").absolutePath}", '-noverify']
}
task copyAgent(type: Copy) {
from configurations.agent
into "$buildDir/agent"
}
run.mustRunAfter copyAgent
apply plugin: 'watch'
watch {
groovy {
files files('src/main/groovy')
tasks 'compileGroovy'
}
}
task watchThread() << {
Thread.start {
project.tasks.watch.execute()
}
}
run.mustRunAfter watchThread
task reloading(dependsOn: [watchThread, copyAgent, run])