forked from serenity-bdd/serenity-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
85 lines (71 loc) · 2.42 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
import org.ajoberstar.grgit.Grgit
import org.ajoberstar.grgit.Tag
import java.util.regex.Pattern
group = 'net.serenity-bdd'
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.5'
classpath 'org.ajoberstar:gradle-git:1.4.0-rc.1'
classpath 'org.pegdown:pegdown:1.4.1'
classpath 'com.github.ben-manes:gradle-versions-plugin:0.11.3'
classpath("net.serenity-bdd:serenity-gradle-plugin:1.1.37-SNAPSHOT")
}
}
repositories {
mavenLocal()
jcenter()
}
ext {
grgit = Grgit.open()
def tags = grgit.tag.list()
tags.sort(new Comparator() {
@Override
int compare(Object o1, Object o2) {
def Tag left=(Tag)o1
def Tag right=(Tag)o2
return left.commit.time.compareTo(right.commit.time)
}
})
def Tag last = tags.last()
def pattern = Pattern.compile("\\d+\\S+")
def matcher = pattern.matcher(last.fullName)
def String version = "not found"
if (matcher.find()) {
version = matcher.group()
}
serenityCoreVersion = "$version"
}
apply plugin: "java"
apply plugin: "net.serenity-bdd.aggregator"
println "serenityCoreVersion= $serenityCoreVersion"
dependencies {
implementation "net.serenity-bdd:serenity-core:$serenityCoreVersion"
implementation "net.serenity-bdd:serenity-junit:$serenityCoreVersion"
implementation("net.serenity-bdd:serenity-screenplay:$serenityCoreVersion")
implementation("net.serenity-bdd:serenity-screenplay-webdriver:$serenityCoreVersion")
implementation("net.serenity-bdd:serenity-cucumber:$serenityCoreVersion")
implementation("net.serenity-bdd:serenity-browserstack:$serenityCoreVersion")
implementation("net.serenity-bdd:serenity-saucelabs:$serenityCoreVersion")
implementation 'org.slf4j:slf4j-simple:1.7.30'
testImplementation "junit:junit:4.13.1"
implementation 'org.assertj:assertj-core:3.18.0'
implementation 'org.hamcrest:hamcrest:2.2'
}
test {
testLogging {
// showStandardStreams = true
}
/* Pass all system properties: */
systemProperties System.getProperties()
maxParallelForks = Integer.parseInt(System.getProperty("forks","1"))
}
task wrapper(type: Wrapper) {
gradleVersion = '2.10'
}
task copyDeps(type: Copy) {
from configurations.runtime + configurations.testImplementation
into project.projectDir.path + "/lib"
}