diff --git a/.github/workflows/bld.yml b/.github/workflows/bld.yml index 6966bcb..bf65051 100644 --- a/.github/workflows/bld.yml +++ b/.github/workflows/bld.yml @@ -1,16 +1,14 @@ 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 ] - kotlin-version: [ 1.9.25, 2.0.21, 2.1.20 ] - os: [ ubuntu-latest, windows-latest, macos-latest ] - - runs-on: ${{ matrix.os }} + java-version: [17, 21, 22] steps: - name: Checkout source repository @@ -24,16 +22,8 @@ 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 \ No newline at end of file + run: ./bld compile test diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 508f6a5..bf43624 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -47,11 +47,11 @@ jobs: uses: actions/configure-pages@v3 - name: Upload artifact - uses: actions/upload-pages-artifact@v3 + uses: actions/upload-pages-artifact@v1 with: # Upload generated Javadocs repository path: "build/javadoc/" - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v4 + uses: actions/deploy-pages@v1 diff --git a/.idea/icon.svg b/.idea/icon.svg deleted file mode 100644 index 81220b4..0000000 --- a/.idea/icon.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/.idea/libraries/bld.xml b/.idea/libraries/bld.xml index 153a060..5c4010c 100644 --- a/.idea/libraries/bld.xml +++ b/.idea/libraries/bld.xml @@ -2,12 +2,12 @@ - + - + diff --git a/.vscode/settings.json b/.vscode/settings.json index ce89108..8f4e3d2 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -9,7 +9,7 @@ ], "java.configuration.updateBuildConfiguration": "automatic", "java.project.referencedLibraries": [ - "${HOME}/.bld/dist/bld-2.2.1.jar", + "${HOME}/.bld/dist/bld-2.1.0.jar", "lib/**/*.jar" ], "java.compile.nullAnalysis.mode": "automatic" diff --git a/README.md b/README.md index abf2d99..cac59a4 100644 --- a/README.md +++ b/README.md @@ -2,20 +2,12 @@ [![License](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![Java](https://img.shields.io/badge/java-17%2B-blue)](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html) -[![bld](https://img.shields.io/badge/2.2.1-FA9052?label=bld&labelColor=2392FF)](https://rife2.com/bld) +[![bld](https://img.shields.io/badge/2.1.0-FA9052?label=bld&labelColor=2392FF)](https://rife2.com/bld) [![Release](https://flat.badgen.net/maven/v/metadata-url/repo.rife2.com/releases/com/uwyn/rife2/bld-checkstyle/maven-metadata.xml?color=blue)](https://repo.rife2.com/#/releases/com/uwyn/rife2/bld-checkstyle) [![Snapshot](https://flat.badgen.net/maven/v/metadata-url/repo.rife2.com/snapshots/com/uwyn/rife2/bld-checkstyle/maven-metadata.xml?label=snapshot)](https://repo.rife2.com/#/snapshots/com/uwyn/rife2/bld-checkstyle) [![GitHub CI](https://github.com/rife2/bld-checkstyle/actions/workflows/bld.yml/badge.svg)](https://github.com/rife2/bld-checkstyle/actions/workflows/bld.yml) -To install the latest version, add the following to the `lib/bld/bld-wrapper.properties` file: - -```properties -bld.extension-checkstyle=com.uwyn.rife2:bld-checkstyle -``` - -For more information, please refer to the [extensions](https://github.com/rife2/bld/wiki/Extensions) documentation. - -## Check Source Code with Checkstyle +To install, please refer to the [extensions documentation](https://github.com/rife2/bld/wiki/Extensions). To check your code with Chesktyle, include the following in your build file: @@ -45,5 +37,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, 0))); +scope(test).include(dependency("com.puppycrawl.tools", "checkstyle", version(10, 18, 2))); ``` diff --git a/config/pmd.xml b/config/pmd.xml index 2641880..3d3203c 100644 --- a/config/pmd.xml +++ b/config/pmd.xml @@ -7,9 +7,9 @@ + + - - diff --git a/examples/.idea/libraries/bld.xml b/examples/.idea/libraries/bld.xml index 153a060..5c4010c 100644 --- a/examples/.idea/libraries/bld.xml +++ b/examples/.idea/libraries/bld.xml @@ -2,12 +2,12 @@ - + - + diff --git a/examples/.vscode/settings.json b/examples/.vscode/settings.json index ba429d0..4c33beb 100644 --- a/examples/.vscode/settings.json +++ b/examples/.vscode/settings.json @@ -9,7 +9,7 @@ ], "java.configuration.updateBuildConfiguration": "automatic", "java.project.referencedLibraries": [ - "${HOME}/.bld/dist/bld-2.2.1.jar", + "${HOME}/.bld/dist/bld-2.1.0.jar", "lib/**/*.jar" ] } diff --git a/examples/lib/bld/bld-wrapper.jar b/examples/lib/bld/bld-wrapper.jar index 862a228..d776887 100644 Binary files a/examples/lib/bld/bld-wrapper.jar and b/examples/lib/bld/bld-wrapper.jar differ diff --git a/examples/lib/bld/bld-wrapper.properties b/examples/lib/bld/bld-wrapper.properties index ab1936c..d673d49 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.5 bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES bld.sourceDirectories= -bld.version=2.2.1 +bld.version=2.1.0 diff --git a/examples/src/bld/java/com/example/ExamplesBuild.java b/examples/src/bld/java/com/example/ExamplesBuild.java index af647ee..df0f79a 100644 --- a/examples/src/bld/java/com/example/ExamplesBuild.java +++ b/examples/src/bld/java/com/example/ExamplesBuild.java @@ -5,9 +5,6 @@ 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.*; @@ -23,29 +20,19 @@ public class ExamplesBuild extends BaseProject { autoDownloadPurge = true; downloadSources = true; - + repositories = List.of(MAVEN_CENTRAL); - scope(test).include(dependency("com.puppycrawl.tools", "checkstyle", version(10, 23, 0))); + scope(test).include(dependency("com.puppycrawl.tools", "checkstyle", version(10, 18, 2))); testOperation().mainClass("com.example.ExamplesTest"); } 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 using Sun coding conventions") + @BuildCommand(summary = "Check code style") public void checkstyle() throws Exception { new CheckstyleOperation() .fromProject(this) @@ -53,11 +40,4 @@ 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 deleted file mode 100644 index e601ecb..0000000 --- a/examples/src/test/resources/checkstyle.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/lib/bld/bld-wrapper.jar b/lib/bld/bld-wrapper.jar index ee9e249..1b0253d 100644 Binary files a/lib/bld/bld-wrapper.jar and b/lib/bld/bld-wrapper.jar differ diff --git a/lib/bld/bld-wrapper.properties b/lib/bld/bld-wrapper.properties index 2b5c0ac..a283f1b 100644 --- a/lib/bld/bld-wrapper.properties +++ b/lib/bld/bld-wrapper.properties @@ -1,8 +1,8 @@ bld.downloadExtensionJavadoc=false bld.downloadExtensionSources=true bld.downloadLocation= -bld.extension-exec=com.uwyn.rife2:bld-exec:1.0.5 -bld.extension-pmd=com.uwyn.rife2:bld-pmd:1.2.2 +bld.extension-exec=com.uwyn.rife2:bld-exec:1.0.3 +bld.extension-pmd=com.uwyn.rife2:bld-pmd:1.1.6 bld.repositories=MAVEN_CENTRAL,MAVEN_LOCAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES bld.sourceDirectories= -bld.version=2.2.1 +bld.version=2.1.0 diff --git a/src/bld/java/rife/bld/extension/CheckstyleOperationBuild.java b/src/bld/java/rife/bld/extension/CheckstyleOperationBuild.java index dc827f2..e3a9e06 100644 --- a/src/bld/java/rife/bld/extension/CheckstyleOperationBuild.java +++ b/src/bld/java/rife/bld/extension/CheckstyleOperationBuild.java @@ -1,5 +1,5 @@ /* - * Copyright 2023-2025 the original author or authors. + * Copyright 2023-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,7 +23,6 @@ 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; @@ -34,7 +33,7 @@ public class CheckstyleOperationBuild extends Project { public CheckstyleOperationBuild() { pkg = "rife.bld.extension"; name = "CheckstyleOperation"; - version = version(1, 0, 15, "SNAPSHOT"); + version = version(1, 0, 5); javaRelease = 17; @@ -44,12 +43,12 @@ public class CheckstyleOperationBuild extends Project { repositories = List.of(MAVEN_LOCAL, MAVEN_CENTRAL, RIFE2_RELEASES, RIFE2_SNAPSHOTS); scope(compile) - .include(dependency("com.uwyn.rife2", "bld", version(2, 2, 1))); + .include(dependency("com.uwyn.rife2", "bld", version(2, 1, 0))); scope(test) - .include(dependency("com.puppycrawl.tools", "checkstyle", version(10, 23, 0))) - .include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 12, 1))) - .include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 12, 1))) - .include(dependency("org.assertj", "assertj-core", version(3, 27, 3))); + .include(dependency("com.puppycrawl.tools", "checkstyle", version(10, 18, 2))) + .include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 11, 1))) + .include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 11, 1))) + .include(dependency("org.assertj", "assertj-core", version(3, 26, 3))); javadocOperation() .javadocOptions() @@ -100,13 +99,10 @@ public class CheckstyleOperationBuild extends Project { @Override public void test() throws Exception { - var os = System.getProperty("os.name"); - if (os != null && os.toLowerCase(Locale.US).contains("linux")) { - new ExecOperation() - .fromProject(this) - .command("scripts/cliargs.sh") - .execute(); - } + 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 97eeb55..7788883 100644 --- a/src/main/java/rife/bld/extension/CheckstyleOperation.java +++ b/src/main/java/rife/bld/extension/CheckstyleOperation.java @@ -1,5 +1,5 @@ /* - * Copyright 2023-2025 the original author or authors. + * Copyright 2023-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -97,7 +97,7 @@ public class CheckstyleOperation extends AbstractProcessOperation { @@ -250,8 +250,7 @@ public class CheckstyleOperation extends AbstractProcessOperation