Skip to content

Commit

Permalink
Merge pull request #991 from TNG/fix/release-issues
Browse files Browse the repository at this point in the history
Fix/release issues
  • Loading branch information
l-1squared authored Oct 11, 2022
2 parents 892f083 + 5528c07 commit 99500d3
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# Declare files that will always have LF line endings on checkout.
*.sh text eol=lf
gradlew text eol=lf
1 change: 1 addition & 0 deletions jgiven-junit/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,6 @@ files { file("../jgiven-core/src/main/translations").listFiles() }.collect {
expand(props)
filteringCharset = 'UTF-8'
}
sourcesJar.dependsOn += taskName
compileJava.dependsOn += taskName
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ ParallelThenStage the_value_on_this_thread_is(String expectation) {
}

private static void logState(Stage<?> stage, ThreadLocal<?> stageState) {
LoggerFactory.getLogger(stage.getClass()).info("Object {} on thread {} with state {} and thread local value {}",
LoggerFactory.getLogger(stage.getClass()).trace("Object {} on thread {} with state {} and thread local value {}",
stage, Thread.currentThread().getId(), stageState, stageState.get());
}

Expand Down
1 change: 1 addition & 0 deletions jgiven-junit5/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,6 @@ files { file("../jgiven-core/src/main/translations").listFiles() }.collect {
expand(props)
filteringCharset = 'UTF-8'
}
sourcesJar.dependsOn += taskName
compileJava.dependsOn += taskName
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ ParallelThenStage the_value_on_this_thread_is(String expectation) {
}

private static void logState(Stage<?> stage, ThreadLocal<?> stageState) {
LoggerFactory.getLogger(stage.getClass()).info("Object {} on thread {} with state {} and thread local value {}",
LoggerFactory.getLogger(stage.getClass()).trace("Object {} on thread {} with state {} and thread local value {}",
stage, Thread.currentThread().getId(), stageState, stageState.get());
}

Expand Down
14 changes: 12 additions & 2 deletions jgiven-maven-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,28 @@ task generatePom(type: Copy, dependsOn: copyClasses) {
}
}

task generateMavenPlugin(type: CrossPlatformExec, dependsOn: generatePom) {
task generateMavenPlugin(type: CrossPlatformExec, dependsOn: generatePom){
// currenlty it seems to be the more or less only clean solution
// to generate a plugin.xml file to use maven directly
// if anyone has a better solution please let us know!
buildCommand 'mvn', '-nsu', '-U', '-f', 'build/maven/pom.xml', 'plugin:descriptor'
}

Set<Task> findPublishTask(String projectName){
rootProject.findProject(projectName).getTasks().findAll {it instanceof PublishToMavenLocal}
}

generateMavenPlugin.onlyIf {
// as the generateMavenPlugin task requires mvn, it is only executed
// when actually uploading the archives
// that way the standard build stays maven-free
gradle.taskGraph.getAllTasks().any{it instanceof AbstractPublishToMaven}
boolean shallGeneratePlugin = gradle.taskGraph.getAllTasks().any{it instanceof AbstractPublishToMaven}
if(shallGeneratePlugin){
generateMavenPlugin.dependsOn += findPublishTask("jgiven-core")
generateMavenPlugin.dependsOn += findPublishTask("jgiven-html5-report")
}
return shallGeneratePlugin

}

task copyMavenPlugin(type: Copy, dependsOn: generateMavenPlugin) {
Expand Down

0 comments on commit 99500d3

Please sign in to comment.