forked from getgauge/gauge-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
59 lines (49 loc) · 1.61 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
plugins {
id 'java'
id 'org.gauge' version '2.1.0'
}
repositories {
mavenCentral()
mavenLocal()
}
dependencies {
testImplementation("org.junit.jupiter:junit-jupiter:5.+")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
testImplementation 'com.thoughtworks.gauge:gauge-java:+'
testImplementation 'org.htmlunit:htmlunit:4.6.0'
testImplementation 'se.fishtank:css-selectors:2.0'
testImplementation 'org.jsoup:jsoup:1.18.1'
testImplementation 'org.assertj:assertj-core:3.26.3'
testImplementation 'org.json:json:20240303'
}
group = 'com.thoughtworks.gauge.test'
version = '0.4.0-SNAPSHOT'
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
import org.gauge.gradle.GaugeTask
def languages = ['java', 'js', 'csharp', 'dotnet', 'ruby', 'python']
languages.each {lang ->
tasks.register("${lang}FT", GaugeTask) {
doFirst {
gauge {
specsDir = 'specs'
inParallel = true
env = "ci-${lang}"
tags = "${lang}"
additionalFlags = "--simple-console"
}
}
}
}
tasks.withType(Test).configureEach {
// https://docs.gradle.org/8.4/userguide/upgrading_version_8.html#test_framework_implementation_dependencies
// Using JUnitPlatform for running tests
useJUnitPlatform()
}
tasks.withType(GaugeTask).configureEach {
// https://docs.gradle.org/8.4/userguide/upgrading_version_8.html#test_task_default_classpath
testClassesDirs = sourceSets.test.output
classpath = sourceSets.test.runtimeClasspath
}