8000 build.gradle.kts: avoid platform-specific splits · scijava/pom-scijava@37e1b49 · GitHub
[go: up one dir, main page]

Skip to content

Commit 37e1b49

Browse files
committed
build.gradle.kts: avoid platform-specific splits
Splitting the pom.xml on newlines to remove the excess Maven output did not work on Windows. Using clear anchors before/after whitespace and then trimming is less ambiguous.
1 parent f47a996 commit 37e1b49

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

gradle-scijava/build.gradle.kts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,11 @@ val computeCatalogAndPlatform = tasks.register<Exec>("generateCatalog") {
2828

2929
doLast {
3030
var output = standardOutput.toString()
31-
// clean output from dirty
32-
output = output.substringAfter("\n\n").substringBefore("\n\n")
31+
// Remove leading/trailing maven output from pom.xml
32+
output = output
33+
.substringAfter("Effective POMs, after inheritance, interpolation, and profiles are applied:")
34+
.substringBefore("[INFO]")
35+
.trim()
3336

3437
operator fun GPathResult.div(child: String) = children().find { (it!! as NodeChild).name() == child } as GPathResult
3538

0 commit comments

Comments
 (0)
0