-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
25 changed files
with
624 additions
and
486 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
group 'io.github.prashant-ramcharan' | ||
version '6.14.0' | ||
version '6.15.0' | ||
|
||
apply plugin: 'java' | ||
apply plugin: 'maven-publish' | ||
apply plugin: 'maven' | ||
apply plugin: 'signing' | ||
|
||
compileJava { | ||
sourceCompatibility = 1.8 | ||
|
@@ -46,8 +48,18 @@ task buildJar(type: Jar, dependsOn: classes) { | |
from sourceSets.main.allSource | ||
} | ||
|
||
task javadocJar(type: Jar) { | ||
classifier = 'javadoc' | ||
from javadoc | ||
} | ||
|
||
task sourcesJar(type: Jar) { | ||
classifier = 'sources' | ||
from sourceSets.main.allSource | ||
} | ||
|
||
artifacts { | ||
archives buildJar | ||
archives buildJar, javadocJar, sourcesJar | ||
} | ||
|
||
jar { | ||
|
@@ -64,3 +76,49 @@ publishing { | |
} | ||
} | ||
} | ||
|
||
signing { | ||
sign configurations.archives | ||
} | ||
|
||
uploadArchives { | ||
repositories { | ||
mavenDeployer { | ||
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } | ||
|
||
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") { | ||
authentication(userName: ossrhUsername, password: ossrhPassword) | ||
} | ||
|
||
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") { | ||
authentication(userName: ossrhUsername, password: ossrhPassword) | ||
} | ||
|
||
pom.project { | ||
name 'Courgette JVM' | ||
packaging 'jar' | ||
description 'Multi-threaded | Parallel Cucumber-JVM | Parallelize your Java Cucumber tests on a feature level or on a scenario level.' | ||
url 'https://github.com/prashant-ramcharan/courgette-jvm' | ||
|
||
scm { | ||
url 'https://github.com/prashant-ramcharan/courgette-jvm' | ||
} | ||
|
||
licenses { | ||
license { | ||
name 'MIT License' | ||
url 'https://opensource.org/licenses/MIT' | ||
} | ||
} | ||
|
||
developers { | ||
developer { | ||
id 'prashant-ramcharan' | ||
name 'Prashant Ramcharan' | ||
email '[email protected]' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
ossrhUsername= | ||
ossrhPassword= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.0-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.2-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
src/main/java/courgette/runtime/CourgetteReportOptions.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
package courgette.runtime; | ||
|
||
import courgette.runtime.utils.FileUtils; | ||
import io.cucumber.core.gherkin.Feature; | ||
|
||
import java.util.Arrays; | ||
import java.util.Optional; | ||
|
||
public class CourgetteReportOptions { | ||
private final Feature feature; | ||
private final String jsonFile; | ||
private final String ndjsonFile; | ||
private Optional<String> xmlFile = Optional.empty(); | ||
private Optional<String> rerunFile = Optional.empty(); | ||
|
||
public CourgetteReportOptions(Feature feature, Integer lineId, CourgetteProperties courgetteProperties) { | ||
this.feature = feature; | ||
|
||
final String fileId = FileUtils.tempDirectory() + createFeatureIdWithLine(lineId) + courgetteProperties.getSessionId(); | ||
|
||
jsonFile = fileId + ".json"; | ||
ndjsonFile = fileId + ".ndjson"; | ||
|
||
if (courgetteProperties.isCucumberXmlReportPluginEnabled() || courgetteProperties.isReportPortalPluginEnabled()) { | ||
xmlFile = Optional.of(fileId + ".xml"); | ||
} | ||
|
||
if (courgetteProperties.getCourgetteOptions().rerunFailedScenarios()) { | ||
rerunFile = Optional.of(fileId + ".txt"); | ||
} | ||
} | ||
|
||
public Feature getFeature() { | ||
return feature; | ||
} | ||
|
||
public String getJsonFile() { | ||
return jsonFile; | ||
} | ||
|
||
public String getNdJsonFile() { | ||
return ndjsonFile; | ||
} | ||
|
||
public Optional<String> getXmlFile() { | ||
return xmlFile; | ||
} | ||
|
||
public Optional<String> getRerunFile() { | ||
return rerunFile; | ||
} | ||
|
||
public String getFeatureId() { | ||
return Arrays.stream(feature.getUri().getPath().split("/")).reduce((x, y) -> y) | ||
.orElse("").replace(".feature", "") | ||
.toLowerCase(); | ||
} | ||
|
||
private String createFeatureIdWithLine(Integer lineId) { | ||
return getFeatureId() + "_" + (lineId == null ? "" : (lineId + "_")); | ||
} | ||
} |
Oops, something went wrong.