diff --git a/.github/workflows/bld.yml b/.github/workflows/bld.yml
index 138f5e5..6966bcb 100644
--- a/.github/workflows/bld.yml
+++ b/.github/workflows/bld.yml
@@ -1,14 +1,16 @@
name: bld-ci
-on: [push, pull_request, workflow_dispatch]
+on: [ push, pull_request, workflow_dispatch ]
jobs:
build-bld-project:
- runs-on: ubuntu-latest
-
strategy:
matrix:
- java-version: [17, 21, 24]
+ 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 }}
steps:
- name: Checkout source repository
@@ -22,8 +24,16 @@ jobs:
distribution: "zulu"
java-version: ${{ matrix.java-version }}
+ - name: Download dependencies [examples]
+ working-directory: examples
+ run: ./bld download
+
+ - name: Compile and Run Checkstyle [examples]
+ working-directory: examples
+ run: ./bld compile checkstyle-custom
+
- name: Download dependencies
run: ./bld download
- name: Run tests
- run: ./bld compile test
+ run: ./bld compile test
\ No newline at end of file
diff --git a/examples/lib/bld/bld-wrapper.properties b/examples/lib/bld/bld-wrapper.properties
index 715835e..84fb734 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.13
+bld.extension-checkstyle=com.uwyn.rife2:bld-checkstyle:1.0.14-SNAPSHOT
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 ea28912..d49b966 100644
--- a/examples/src/bld/java/com/example/ExamplesBuild.java
+++ b/examples/src/bld/java/com/example/ExamplesBuild.java
@@ -5,6 +5,9 @@ import rife.bld.BuildCommand;
import rife.bld.extension.CheckstyleOperation;
import java.util.List;
+import java.util.logging.ConsoleHandler;
+import java.util.logging.Level;
+import java.util.logging.Logger;
import static rife.bld.dependencies.Repository.MAVEN_CENTRAL;
import static rife.bld.dependencies.Scope.*;
@@ -29,10 +32,20 @@ public class ExamplesBuild extends BaseProject {
}
public static void main(String[] args) {
+ // Enable detailed logging for the extensions
+ var level = Level.ALL;
+ var logger = Logger.getLogger("rife.bld.extension");
+ var consoleHandler = new ConsoleHandler();
+
+ consoleHandler.setLevel(level);
+ logger.addHandler(consoleHandler);
+ logger.setLevel(level);
+ logger.setUseParentHandlers(false);
+
new ExamplesBuild().start(args);
}
- @BuildCommand(summary = "Check code style")
+ @BuildCommand(summary = "Check code style using Sun coding conventions")
public void checkstyle() throws Exception {
new CheckstyleOperation()
.fromProject(this)
@@ -40,4 +53,11 @@ public class ExamplesBuild extends BaseProject {
.execute();
}
+ @BuildCommand(value = "checkstyle-custom", summary = "Check code style using custom coding conventions")
+ public void checkstyleCustom() throws Exception {
+ new CheckstyleOperation()
+ .fromProject(this)
+ .configurationFile("src/test/resources/checkstyle.xml")
+ .execute();
+ }
}
diff --git a/examples/src/test/resources/checkstyle.xml b/examples/src/test/resources/checkstyle.xml
new file mode 100644
index 0000000..e601ecb
--- /dev/null
+++ b/examples/src/test/resources/checkstyle.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/bld/java/rife/bld/extension/CheckstyleOperationBuild.java b/src/bld/java/rife/bld/extension/CheckstyleOperationBuild.java
index c7cf95c..90f78c6 100644
--- a/src/bld/java/rife/bld/extension/CheckstyleOperationBuild.java
+++ b/src/bld/java/rife/bld/extension/CheckstyleOperationBuild.java
@@ -23,6 +23,7 @@ import rife.bld.publish.PublishLicense;
import rife.bld.publish.PublishScm;
import java.util.List;
+import java.util.Locale;
import static rife.bld.dependencies.Repository.*;
import static rife.bld.dependencies.Scope.compile;
@@ -99,10 +100,13 @@ public class CheckstyleOperationBuild extends Project {
@Override
public void test() throws Exception {
- new ExecOperation()
- .fromProject(this)
- .command("scripts/cliargs.sh")
- .execute();
+ var os = System.getProperty("os.name");
+ if (os != null && os.toLowerCase(Locale.US).contains("linux")) {
+ new ExecOperation()
+ .fromProject(this)
+ .command("scripts/cliargs.sh")
+ .execute();
+ }
super.test();
}
}
diff --git a/src/main/java/rife/bld/extension/CheckstyleOperation.java b/src/main/java/rife/bld/extension/CheckstyleOperation.java
index d9b7b52..97eeb55 100644
--- a/src/main/java/rife/bld/extension/CheckstyleOperation.java
+++ b/src/main/java/rife/bld/extension/CheckstyleOperation.java
@@ -235,9 +235,9 @@ public class CheckstyleOperation extends AbstractProcessOperation {
@@ -250,7 +250,8 @@ public class CheckstyleOperation extends AbstractProcessOperation