forked from mockito/testing-workshop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
43 lines (36 loc) · 959 Bytes
/
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
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'java'
dependencies {
//We are using checked-in dependencies to avoid poor internet connectivity
// when we run this workshop at a conference.
//In real life, don't check in your dependencies!
testCompile fileTree(dir: "libs")
}
repositories {
jcenter()
}
configurations {
libs
}
task refreshLibs(type: Sync) {
from configurations.libs
into "libs"
}
dependencies {
libs 'junit:junit:4.12'
libs 'eu.codearte.catch-exception:catch-exception:1.4.6'
libs 'org.assertj:assertj-core:3.8.0'
libs 'org.mockito:mockito-core:2.11.0'
}
eclipse.classpath.file.withXml {
//relativize the paths
def node = it.asNode()
node.classpathentry.findAll { it.@kind == 'lib' }.each {
def relPath = relativePath(project.projectDir, project.file(it.@path))
it.@path = relPath
}
}
File relativePath(File from, File to) {
new File(from.toURI().relativize(to.toURI()).toString())
}