-
Notifications
You must be signed in to change notification settings - Fork 12
/
build.gradle
85 lines (72 loc) · 2.22 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
allprojects {
apply plugin : 'groovy'
apply plugin : 'idea'
group = 'com.goodercode'
version = '1.0-SNAPSHOT'
sourceCompatibility = 1.6
targetCompatibility = 1.6
}
def jetty = 'org.eclipse.jetty'
def jettyVersion = '8.1.2.v20120308'
def orbit = [groupId : "${jetty}.orbit", artifactId : 'javax.servlet']
subprojects {
repositories {
mavenCentral ()
}
dependencies {
groovy 'org.codehaus.groovy:groovy-all:1.8.6'
}
}
project (':core') {
configurations {
jettyArtifacts
}
dependencies {
testCompile ('org.spockframework:spock-core:0.6-groovy-1.8') {
exclude module : 'groovy-all'
}
jettyArtifacts ("${jetty}:jetty-server:${jettyVersion}") {
exclude module : orbit.artifactId
exclude module : 'jetty-util'
}
jettyArtifacts ("${jetty}:jetty-webapp:${jettyVersion}") {
exclude module : orbit.artifactId
}
groovy files (project.configurations.jettyArtifacts.asPath.split(':'))
groovy 'javax.servlet:javax.servlet-api:3.0.1'
groovy 'commons-httpclient:commons-httpclient:3.1'
testCompile 'com.google.guava:guava:11.0.2'
testCompile files (project.configurations.jettyArtifacts.asPath.split(':'))
}
def jettyArtifactDependenciesNodes = {
configurations.jettyArtifacts.dependencies.collect {
def node = new Node(null, 'dependency')
node.appendNode('groupId', it.group)
node.appendNode('artifactId', it.name)
node.appendNode('version', it.version)
def exclusions = node.appendNode('exclusions')
def exclude = exclusions.appendNode('exclusion')
orbit.each {
exclude.appendNode(it.key, it.value)
}
return node
}
}
}
project (':samples') {
dependencies {
compile project(':core')
}
}
idea.project.ipr {
withXml { provider ->
def map = provider.node.component.find {
it.@name == 'VcsDirectoryMappings'
}.mapping
map.@vcs = 'Git'
map.@directory = project.properties.projectDir
}
}
task wrapper(type: Wrapper) {
gradleVersion = 1.0
}