forked from ratpack/ratpack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
55 lines (46 loc) · 1.49 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
apply plugin: 'groovy'
apply plugin: 'idea'
group = 'com.bleedingwolf.ratpack'
version = '0.2-SNAPSHOT'
repositories {
mavenCentral()
}
dependencies {
groovy group: 'org.codehaus.groovy', name: 'groovy', version: '1.8.3'
compile group: 'javax.servlet', name: 'servlet-api', version: '2.5'
compile group: 'org.json', name: 'json', version: '20090211'
compile(group: 'org.mortbay.jetty', name: 'jetty', version: '6.1.26') { exclude module: 'servlet-api' }
compile(group: 'org.mortbay.jetty', name: 'jetty-util', version: '6.1.26') { exclude module: 'servlet-api' }
compile 'org.slf4j:slf4j-api:1.6.3'
testCompile group: 'junit', name: 'junit', version: '4.10'
testRuntime 'org.slf4j:slf4j-simple:1.6.3'
}
task copyToLib(type: Copy) {
into "$buildDir/libs"
from configurations.runtime
}
task deployRatpack(dependsOn: [build,copyToLib], type: Copy) {
into "${System.properties['user.home']}/.groovy/lib"
from "$buildDir/libs"
include "*.jar"
}
task buildDistro(dependsOn: assemble) << {
ant{
mkdir(dir:"$buildDir/ratpack/lib")
mkdir(dir:"$buildDir/ratpack/bin")
}
copy{
from("$projectDir/src/main/binaries")
into "$buildDir/ratpack/bin"
}
ant.chmod(file: "$buildDir/ratpack/bin/ratpack", perm: 'ugo+x')
copy{
from configurations.runtime
into "$buildDir/ratpack/lib"
}
copy{
from "$buildDir/libs"
into "$buildDir/ratpack/lib"
include "Ratpack-*.jar"
}
}