diff --git a/.github/workflows/bld.yml b/.github/workflows/bld.yml index 6966bcb..b2bf24e 100644 --- a/.github/workflows/bld.yml +++ b/.github/workflows/bld.yml @@ -7,7 +7,6 @@ jobs: strategy: matrix: java-version: [ 17, 21, 24 ] - kotlin-version: [ 1.9.25, 2.0.21, 2.1.20 ] os: [ ubuntu-latest, windows-latest, macos-latest ] runs-on: ${{ matrix.os }} @@ -36,4 +35,4 @@ jobs: run: ./bld download - name: Run tests - run: ./bld compile test \ No newline at end of file + run: ./bld compile test diff --git a/.idea/misc.xml b/.idea/misc.xml index 1bf9192..dfdb820 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,6 +1,10 @@ + + + + @@ -25,7 +29,7 @@ - + \ No newline at end of file diff --git a/README.md b/README.md index bec8a94..f02c333 100644 --- a/README.md +++ b/README.md @@ -45,5 +45,5 @@ not provided by the extension. For example: ```java repositories = List.of(MAVEN_CENTRAL); -scope(test).include(dependency("com.puppycrawl.tools", "checkstyle", version(10, 23, 1))); +scope(test).include(dependency("com.puppycrawl.tools", "checkstyle", version(10, 24, 0))); ``` diff --git a/examples/lib/bld/bld-wrapper.properties b/examples/lib/bld/bld-wrapper.properties index ab1936c..3b1cdef 100644 --- a/examples/lib/bld/bld-wrapper.properties +++ b/examples/lib/bld/bld-wrapper.properties @@ -1,7 +1,7 @@ bld.downloadExtensionJavadoc=false bld.downloadExtensionSources=true bld.downloadLocation= -bld.extension-checkstyle=com.uwyn.rife2:bld-checkstyle:1.0.14 +bld.extension-checkstyle=com.uwyn.rife2:bld-checkstyle:1.0.15 bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES bld.sourceDirectories= bld.version=2.2.1 diff --git a/examples/src/bld/java/com/example/ExamplesBuild.java b/examples/src/bld/java/com/example/ExamplesBuild.java index f3a5f6d..ac1419d 100644 --- a/examples/src/bld/java/com/example/ExamplesBuild.java +++ b/examples/src/bld/java/com/example/ExamplesBuild.java @@ -26,7 +26,7 @@ public class ExamplesBuild extends BaseProject { repositories = List.of(MAVEN_CENTRAL); - scope(test).include(dependency("com.puppycrawl.tools", "checkstyle", version(10, 23, 1))); + scope(test).include(dependency("com.puppycrawl.tools", "checkstyle", version(10, 24, 0))); testOperation().mainClass("com.example.ExamplesTest"); } diff --git a/src/bld/java/rife/bld/extension/CheckstyleOperationBuild.java b/src/bld/java/rife/bld/extension/CheckstyleOperationBuild.java index c720a08..7a2c1a7 100644 --- a/src/bld/java/rife/bld/extension/CheckstyleOperationBuild.java +++ b/src/bld/java/rife/bld/extension/CheckstyleOperationBuild.java @@ -22,6 +22,9 @@ import rife.bld.publish.PublishDeveloper; import rife.bld.publish.PublishLicense; import rife.bld.publish.PublishScm; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Path; import java.util.List; import java.util.Locale; @@ -34,7 +37,7 @@ public class CheckstyleOperationBuild extends Project { public CheckstyleOperationBuild() { pkg = "rife.bld.extension"; name = "CheckstyleOperation"; - version = version(1, 0, 15, "SNAPSHOT"); + version = version(1, 0, 15); javaRelease = 17; @@ -46,7 +49,7 @@ public class CheckstyleOperationBuild extends Project { scope(compile) .include(dependency("com.uwyn.rife2", "bld", version(2, 2, 1))); scope(test) - .include(dependency("com.puppycrawl.tools", "checkstyle", version(10, 23, 1))) + .include(dependency("com.puppycrawl.tools", "checkstyle", version(10, 24, 0))) .include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 12, 2))) .include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 12, 2))) .include(dependency("org.assertj", "assertj-core", version(3, 27, 3))); @@ -107,6 +110,32 @@ public class CheckstyleOperationBuild extends Project { .command("scripts/cliargs.sh") .execute(); } - super.test(); + + var testResultsDir = "build/test-results/test/"; + var op = testOperation().fromProject(this); + op.testToolOptions().reportsDir(new File(testResultsDir)); + + Exception ex = null; + try { + op.execute(); + } catch (Exception e) { + ex = e; + } + + var xunitViewer = new File("/usr/bin/xunit-viewer"); + if (xunitViewer.exists() && xunitViewer.canExecute()) { + var reportsDir = "build/reports/tests/test/"; + + Files.createDirectories(Path.of(reportsDir)); + + new ExecOperation() + .fromProject(this) + .command(xunitViewer.getPath(), "-r", testResultsDir, "-o", reportsDir + "index.html") + .execute(); + } + + if (ex != null) { + throw ex; + } } } diff --git a/src/main/java/rife/bld/extension/CheckstyleOperation.java b/src/main/java/rife/bld/extension/CheckstyleOperation.java index 97eeb55..cdcd630 100644 --- a/src/main/java/rife/bld/extension/CheckstyleOperation.java +++ b/src/main/java/rife/bld/extension/CheckstyleOperation.java @@ -314,6 +314,25 @@ public class CheckstyleOperation extends AbstractProcessOperation