Skip to content

Commit c77a84d

Browse files
committed
Add cleanupFeatures option
1 parent 7f02d69 commit c77a84d

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Full plugin configuration below, optional properties can be omitted
1818
```groovy
1919
buildscript {
2020
dependencies{
21-
classpath group: 'com.assertthat.plugins', name: 'assertthat-bdd-gradle-tasks', version: '1.7'
21+
classpath group: 'com.assertthat.plugins', name: 'assertthat-bdd-gradle-tasks', version: '1.9.1'
2222
}
2323
}
2424
@@ -49,7 +49,8 @@ task downloadFeatures(type: FeaturesTask){
4949
numbered = false
5050
/*Optional - Ignore ssl certificate errors for self-signed certificates (default is false)*/
5151
ignoreCertErrors = true
52-
52+
/*Optional - Delete features in outputFolder directory before downloading (default is true) */
53+
cleanupFeatures = true
5354
}
5455
5556
task submitReport(type: ReportTask){
@@ -77,7 +78,7 @@ task submitReport(type: ReportTask){
7778
type = "cucumber"
7879
/*Optional - Run metadata */
7980
metadata="""{"env ":"uat ","build":"456"}"""
80-
/*-Optional - all Jira tickets will be updated with test results by default; when JQL is provided only filtered tickets will be updated*/
81+
/*Optional - all Jira tickets will be updated with test results by default; when JQL is provided only filtered tickets will be updated*/
8182
jql = "project = XX AND key in ('XXX-1')"
8283
/*Optional - Ignore ssl certificate errors for self-signed certificates (default is false)*/
8384
ignoreCertErrors = true

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ apply plugin: 'signing'
44

55
group 'com.assertthat.plugins'
66
archivesBaseName = "assertthat-bdd-gradle-tasks"
7-
version '1.9'
7+
version '1.9.1'
88

99
sourceCompatibility = 1.7
1010
targetCompatibility = 1.7
@@ -17,7 +17,7 @@ repositories {
1717
dependencies {
1818
implementation gradleApi()
1919
implementation localGroovy()
20-
compile group: 'com.assertthat.plugins', name: 'assertthat-bdd-standalone', version: '1.9.6'
20+
compile group: 'com.assertthat.plugins', name: 'assertthat-bdd-standalone', version: '1.9.8'
2121
}
2222

2323
task javadocJar(type: Jar) {

src/main/groovy/FeaturesTask.groovy

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ class FeaturesTask extends DefaultTask {
6868
@Input
6969
@Optional
7070
Boolean ignoreCertErrors = false
71+
@Input
72+
@Optional
73+
Boolean cleanupFeatures = true
7174

7275
@TaskAction
7376
def downloadFeatures() {
@@ -83,7 +86,8 @@ class FeaturesTask extends DefaultTask {
8386
tags,
8487
jiraServerUrl,
8588
numbered,
86-
ignoreCertErrors)
89+
ignoreCertErrors,
90+
cleanupFeatures)
8791

8892
APIUtil apiUtil = new APIUtil(arguments.getProjectId(),
8993
arguments.getAccessKey(),
@@ -94,7 +98,7 @@ class FeaturesTask extends DefaultTask {
9498
arguments.getJiraServerUrl(),
9599
arguments.isIgnoreCertErrors())
96100
File inZip = apiUtil.download(new File(project.projectDir.getCanonicalFile().toURI().resolve(arguments.getOutputFolder()).getPath()),
97-
mode, jql, tags, arguments.isNumbered())
101+
mode, jql, tags, arguments.isNumbered(), arguments.isCleanupFeatures())
98102

99103
File zip = new FileUtil().unpackArchive(inZip, new File(arguments.getOutputFolder()))
100104
zip.delete()

0 commit comments

Comments
 (0)