forked from akhikhl/gretty
-
Notifications
You must be signed in to change notification settings - Fork 36
/
build.gradle
76 lines (67 loc) · 2.21 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
buildscript {
project.ext {
if (has('privateRepoDir')) {
privateRepoDir = privateRepoDir instanceof File ? privateRepoDir.path : privateRepoDir.toString()
if (!new File(privateRepoDir).isAbsolute())
privateRepoDir = new File(projectDir, privateRepoDir).canonicalPath
} else
privateRepoDir = new File(project.buildDir, 'privateRepo').canonicalPath
}
}
import groovyx.net.http.ContentType
plugins {
id 'base'
id 'maven-publish'
}
apply plugin: "org.tenne.rest"
ext {
project_website = "https://github.com/${developerId}/${projectId}"
project_scm = "https://github.com/${developerId}/${projectId}.git"
license_url = "https://raw.github.com/${developerId}/${projectId}/master/LICENSE"
}
task testAll(dependsOn: tasks.build)
task testAllIntegrationTests(type: GradleBuild) {
dir = file('integrationTests')
tasks = [ 'testAll' ]
startParameter.projectProperties = [:]
if (project.hasProperty('geckoDriverPlatform')) {
startParameter.projectProperties.put('geckoDriverPlatform', project.geckoDriverPlatform)
}
if (project.hasProperty('geckoDriverVersion')) {
startParameter.projectProperties.put('geckoDriverVersion', project.geckoDriverVersion)
}
if (project.hasProperty('seleniumVersion')) {
startParameter.projectProperties.put('seleniumVersion', project.seleniumVersion)
}
if (project.hasProperty('gebVersion')) {
startParameter.projectProperties.put('gebVersion', project.gebVersion)
}
if (project.hasProperty('testAllContainers')) {
startParameter.projectProperties.put('testAllContainers', project.testAllContainers)
}
project.tasks.testAll.finalizedBy it
onlyIf { !project.tasks.testAll.getState().getFailure() }
}
task cleanIntegrationTests() {
doLast {
def directoriesToDelete = []
file('integrationTests').eachDirRecurse {
if (it.name == 'build') {
directoriesToDelete << it
}
}
directoriesToDelete.each { it.deleteDir() }
}
project.tasks.clean.dependsOn it
}
task cleanBuildSrc() {
doLast {
file('buildSrc/build').deleteDir()
}
project.tasks.clean.dependsOn it
}
ext.libs = [
spock: dependencies.create("org.spockframework:spock-core:$spock_version") {
exclude group: 'org.codehaus.groovy'
}
]