-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
66 lines (53 loc) · 1.87 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
group 'SalesTax'
version '1.0-SNAPSHOT'
apply plugin: 'java'
apply plugin: 'groovy'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
test {
useJUnitPlatform()
}
sourceSets {
integrationTest {
groovy.srcDir "$projectDir/src/integration-test/groovy"
resources.srcDir "$projectDir/src/integration-test/resources"
compileClasspath += main.output + test.output
runtimeClasspath += main.output + test.output
}
}
configurations {
integrationTestImplementation.extendsFrom testImplementation
integrationTestRuntime.extendsFrom testRuntime
}
task integrationTest(type: Test) {
testClassesDirs = sourceSets.integrationTest.output.classesDirs
classpath = sourceSets.integrationTest.runtimeClasspath
}
check.dependsOn integrationTest
ext {
jGivenVersion = '0.18.2'
junitVersion = '5.3.1'
mockitoVersion = '2.28.2'
}
dependencies {
testImplementation "org.junit.jupiter:junit-jupiter-api:$junitVersion"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junitVersion"
testImplementation "org.junit.jupiter:junit-jupiter-params:$junitVersion"
testImplementation "org.mockito:mockito-core:$mockitoVersion"
testImplementation "org.mockito:mockito-junit-jupiter:$mockitoVersion"
testImplementation 'org.assertj:assertj-core:3.16.1'
integrationTestImplementation "org.codehaus.groovy:groovy-all:2.5.12"
integrationTestImplementation "com.tngtech.jgiven:jgiven-core:$jGivenVersion"
integrationTestImplementation "com.tngtech.jgiven:jgiven-html5-report:$jGivenVersion"
integrationTestImplementation "com.tngtech.jgiven:jgiven-spock:$jGivenVersion"
}
compileGroovy {
dependsOn tasks.getByPath('compileJava')
classpath += files(compileJava.destinationDir)
}
compileTestGroovy {
dependsOn tasks.getByPath('compileTestJava')
classpath += files(compileTestJava.destinationDir)
}