From a1eb4cea1da56d867af8223dd59e452d18c37196 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Sun, 8 Sep 2024 18:35:57 -0700 Subject: [PATCH 01/31] Bumped bld to version 1.23.7 --- examples/lib/bld/bld-wrapper.properties | 2 +- .../bld/extension/DetektOperationBuild.java | 34 +++++++++---------- .../bld/extension/DetektOperationTest.java | 17 ++++++---- 3 files changed, 28 insertions(+), 25 deletions(-) diff --git a/examples/lib/bld/bld-wrapper.properties b/examples/lib/bld/bld-wrapper.properties index ef08e20..32d0f90 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-detekt=com.uwyn.rife2:bld-detekt:0.9.6 +bld.extension-detekt=com.uwyn.rife2:bld-detekt:0.9.7 bld.extension-kotlin=com.uwyn.rife2:bld-kotlin:1.0.1 bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES bld.sourceDirectories= diff --git a/src/bld/java/rife/bld/extension/DetektOperationBuild.java b/src/bld/java/rife/bld/extension/DetektOperationBuild.java index ba94b28..34d3529 100644 --- a/src/bld/java/rife/bld/extension/DetektOperationBuild.java +++ b/src/bld/java/rife/bld/extension/DetektOperationBuild.java @@ -33,16 +33,18 @@ public class DetektOperationBuild extends Project { public DetektOperationBuild() { pkg = "rife.bld.extension"; name = "DetektOperation"; - version = version(0, 9, 6); + version = version(0, 9, 7); javaRelease = 17; + downloadSources = true; autoDownloadPurge = true; + repositories = List.of(MAVEN_LOCAL, MAVEN_CENTRAL, RIFE2_RELEASES, RIFE2_SNAPSHOTS); scope(compile) .include(dependency("com.uwyn.rife2", "bld", version(2, 1, 0))) - .include(dependency("io.gitlab.arturbosch.detekt", "detekt-cli", version(1, 23, 6))); + .include(dependency("io.gitlab.arturbosch.detekt", "detekt-cli", version(1, 23, 7))); scope(test) .include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 11, 0))) .include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 11, 0))) @@ -56,28 +58,26 @@ public class DetektOperationBuild extends Project { publishOperation() .repository(version.isSnapshot() ? repository("rife2-snapshot") : repository("rife2")) + .repository(repository("github")) .info() .groupId("com.uwyn.rife2") .artifactId("bld-detekt") .description("bld Detekt Extension") .url("https://github.com/rife2/bld-detekt") - .developer( - new PublishDeveloper() - .id("ethauvin") - .name("Erik C. Thauvin") - .email("erik@thauvin.net") - .url("https://erik.thauvin.net/") + .developer(new PublishDeveloper() + .id("ethauvin") + .name("Erik C. Thauvin") + .email("erik@thauvin.net") + .url("https://erik.thauvin.net/") ) - .license( - new PublishLicense() - .name("The Apache License, Version 2.0") - .url("https://www.apache.org/licenses/LICENSE-2.0.txt") + .license(new PublishLicense() + .name("The Apache License, Version 2.0") + .url("https://www.apache.org/licenses/LICENSE-2.0.txt") ) - .scm( - new PublishScm() - .connection("scm:git:https://github.com/rife2/bld-detekt.git") - .developerConnection("scm:git:git@github.com:rife2/bld-detekt.git") - .url("https://github.com/rife2/bld-detekt") + .scm(new PublishScm() + .connection("scm:git:https://github.com/rife2/bld-detekt.git") + .developerConnection("scm:git:git@github.com:rife2/bld-detekt.git") + .url("https://github.com/rife2/bld-detekt") ) .signKey(property("sign.key")) .signPassphrase(property("sign.passphrase")); diff --git a/src/test/java/rife/bld/extension/DetektOperationTest.java b/src/test/java/rife/bld/extension/DetektOperationTest.java index 3a9ec3f..85b1b76 100644 --- a/src/test/java/rife/bld/extension/DetektOperationTest.java +++ b/src/test/java/rife/bld/extension/DetektOperationTest.java @@ -16,6 +16,7 @@ package rife.bld.extension; +import org.assertj.core.api.AutoCloseableSoftAssertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import rife.bld.BaseProject; @@ -147,15 +148,17 @@ class DetektOperationTest { var params = op.executeConstructProcessCommandList(); - for (var p : args) { - var found = false; - for (var a : params) { - if (a.startsWith(p)) { - found = true; - break; + try (var softly = new AutoCloseableSoftAssertions()) { + for (var p : args) { + var found = false; + for (var a : params) { + if (a.startsWith(p)) { + found = true; + break; + } } + softly.assertThat(found).as(p + " not found.").isTrue(); } - assertThat(found).as(p + " not found.").isTrue(); } } From e04f46287b006aa61c668e920ee2777301f80626 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Sun, 27 Oct 2024 17:03:26 -0700 Subject: [PATCH 02/31] Updated dependencies Bumped JUnit version to 5.11.3 Bumped PMD extension version to 1.1.7 Bumped JDK to version 23 (GitHub CI Workflow) Bumped Kotlin to version 2.0.21 Bumped Kotlin extension to version 1.0.2 --- .github/workflows/bld.yml | 2 +- config/pmd.xml | 4 ++-- examples/lib/bld/bld-wrapper.properties | 2 +- examples/src/bld/java/com/example/ExampleBuild.java | 6 +++--- lib/bld/bld-wrapper.properties | 2 +- src/bld/java/rife/bld/extension/DetektOperationBuild.java | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/bld.yml b/.github/workflows/bld.yml index 2d50ee7..6020ea2 100644 --- a/.github/workflows/bld.yml +++ b/.github/workflows/bld.yml @@ -8,7 +8,7 @@ jobs: strategy: matrix: - java-version: [17, 21, 22] + java-version: [17, 21, 23] steps: - name: Checkout source repository diff --git a/config/pmd.xml b/config/pmd.xml index 3d3203c..2641880 100644 --- a/config/pmd.xml +++ b/config/pmd.xml @@ -7,9 +7,9 @@ - - + + diff --git a/examples/lib/bld/bld-wrapper.properties b/examples/lib/bld/bld-wrapper.properties index 32d0f90..ea90a9b 100644 --- a/examples/lib/bld/bld-wrapper.properties +++ b/examples/lib/bld/bld-wrapper.properties @@ -2,7 +2,7 @@ bld.downloadExtensionJavadoc=false bld.downloadExtensionSources=true bld.downloadLocation= bld.extension-detekt=com.uwyn.rife2:bld-detekt:0.9.7 -bld.extension-kotlin=com.uwyn.rife2:bld-kotlin:1.0.1 +bld.extension-kotlin=com.uwyn.rife2:bld-kotlin:1.0.2 bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES bld.sourceDirectories= bld.version=2.1.0 diff --git a/examples/src/bld/java/com/example/ExampleBuild.java b/examples/src/bld/java/com/example/ExampleBuild.java index 483f73f..8e68e4a 100644 --- a/examples/src/bld/java/com/example/ExampleBuild.java +++ b/examples/src/bld/java/com/example/ExampleBuild.java @@ -31,13 +31,13 @@ public class ExampleBuild extends Project { repositories = List.of(MAVEN_LOCAL, MAVEN_CENTRAL, RIFE2_RELEASES); - final var kotlin = version(2, 0, 20); + final var kotlin = version(2, 0, 21); scope(compile) .include(dependency("org.jetbrains.kotlin", "kotlin-stdlib", kotlin)); scope(test) .include(dependency("org.jetbrains.kotlin", "kotlin-test-junit5", kotlin)) - .include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 11, 0))) - .include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 11, 0))); + .include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 11, 3))) + .include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 11, 3))); // Include the Kotlin source directory when creating or publishing sources Java Archives jarSourcesOperation().sourceDirectories(new File(srcMainDirectory(), "kotlin")); diff --git a/lib/bld/bld-wrapper.properties b/lib/bld/bld-wrapper.properties index 5d0bba4..196e2c9 100644 --- a/lib/bld/bld-wrapper.properties +++ b/lib/bld/bld-wrapper.properties @@ -2,7 +2,7 @@ bld.downloadExtensionJavadoc=false bld.downloadExtensionSources=true bld.downloadLocation= bld.extension-exec=com.uwyn.rife2:bld-exec:1.0.3 -bld.extension-pmd=com.uwyn.rife2:bld-pmd:1.1.5 +bld.extension-pmd=com.uwyn.rife2:bld-pmd:1.1.7 bld.repositories=MAVEN_CENTRAL,MAVEN_LOCAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES bld.sourceDirectories= bld.version=2.1.0 diff --git a/src/bld/java/rife/bld/extension/DetektOperationBuild.java b/src/bld/java/rife/bld/extension/DetektOperationBuild.java index 34d3529..6cb7b8e 100644 --- a/src/bld/java/rife/bld/extension/DetektOperationBuild.java +++ b/src/bld/java/rife/bld/extension/DetektOperationBuild.java @@ -46,8 +46,8 @@ public class DetektOperationBuild extends Project { .include(dependency("com.uwyn.rife2", "bld", version(2, 1, 0))) .include(dependency("io.gitlab.arturbosch.detekt", "detekt-cli", version(1, 23, 7))); scope(test) - .include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 11, 0))) - .include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 11, 0))) + .include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 11, 3))) + .include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 11, 3))) .include(dependency("org.assertj", "assertj-core", version(3, 26, 3))); javadocOperation() .javadocOptions() From 5b6181825dbf7f9ec98af13a9a2b26cb105cf4a5 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Sat, 28 Dec 2024 17:43:40 -0800 Subject: [PATCH 03/31] Bumped JUnit to version 5.11.4 --- examples/src/bld/java/com/example/ExampleBuild.java | 4 ++-- src/bld/java/rife/bld/extension/DetektOperationBuild.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/src/bld/java/com/example/ExampleBuild.java b/examples/src/bld/java/com/example/ExampleBuild.java index 8e68e4a..ee6e176 100644 --- a/examples/src/bld/java/com/example/ExampleBuild.java +++ b/examples/src/bld/java/com/example/ExampleBuild.java @@ -36,8 +36,8 @@ public class ExampleBuild extends Project { .include(dependency("org.jetbrains.kotlin", "kotlin-stdlib", kotlin)); scope(test) .include(dependency("org.jetbrains.kotlin", "kotlin-test-junit5", kotlin)) - .include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 11, 3))) - .include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 11, 3))); + .include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 11, 4))) + .include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 11, 4))); // Include the Kotlin source directory when creating or publishing sources Java Archives jarSourcesOperation().sourceDirectories(new File(srcMainDirectory(), "kotlin")); diff --git a/src/bld/java/rife/bld/extension/DetektOperationBuild.java b/src/bld/java/rife/bld/extension/DetektOperationBuild.java index 6cb7b8e..f622fee 100644 --- a/src/bld/java/rife/bld/extension/DetektOperationBuild.java +++ b/src/bld/java/rife/bld/extension/DetektOperationBuild.java @@ -46,9 +46,9 @@ public class DetektOperationBuild extends Project { .include(dependency("com.uwyn.rife2", "bld", version(2, 1, 0))) .include(dependency("io.gitlab.arturbosch.detekt", "detekt-cli", version(1, 23, 7))); scope(test) - .include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 11, 3))) - .include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 11, 3))) .include(dependency("org.assertj", "assertj-core", version(3, 26, 3))); + .include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 11, 4))) + .include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 11, 4))) javadocOperation() .javadocOptions() .author() From c993a3ab141ae97629bed6012d1d549bfa458e96 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Sat, 28 Dec 2024 17:44:36 -0800 Subject: [PATCH 04/31] Bumped AssertJ to version 3.27.0 --- src/bld/java/rife/bld/extension/DetektOperationBuild.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bld/java/rife/bld/extension/DetektOperationBuild.java b/src/bld/java/rife/bld/extension/DetektOperationBuild.java index f622fee..b41434d 100644 --- a/src/bld/java/rife/bld/extension/DetektOperationBuild.java +++ b/src/bld/java/rife/bld/extension/DetektOperationBuild.java @@ -46,9 +46,9 @@ public class DetektOperationBuild extends Project { .include(dependency("com.uwyn.rife2", "bld", version(2, 1, 0))) .include(dependency("io.gitlab.arturbosch.detekt", "detekt-cli", version(1, 23, 7))); scope(test) - .include(dependency("org.assertj", "assertj-core", version(3, 26, 3))); .include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 11, 4))) .include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 11, 4))) + .include(dependency("org.assertj", "assertj-core", version(3, 27, 0))); javadocOperation() .javadocOptions() .author() From cbe95f7cc25a2481d2f75622c0ec9a4a3e415c8f Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Sat, 28 Dec 2024 17:45:36 -0800 Subject: [PATCH 05/31] Bumped Kotlin to version 2.1.0 --- examples/src/bld/java/com/example/ExampleBuild.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/src/bld/java/com/example/ExampleBuild.java b/examples/src/bld/java/com/example/ExampleBuild.java index ee6e176..d413e22 100644 --- a/examples/src/bld/java/com/example/ExampleBuild.java +++ b/examples/src/bld/java/com/example/ExampleBuild.java @@ -31,7 +31,7 @@ public class ExampleBuild extends Project { repositories = List.of(MAVEN_LOCAL, MAVEN_CENTRAL, RIFE2_RELEASES); - final var kotlin = version(2, 0, 21); + final var kotlin = version(2, 1, 0); scope(compile) .include(dependency("org.jetbrains.kotlin", "kotlin-stdlib", kotlin)); scope(test) From 33774b8a93c3a52cfc2c399bc1d86a1208621785 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Sat, 28 Dec 2024 17:46:39 -0800 Subject: [PATCH 06/31] Updated extensions Bumped Kotlin extension to version 1.0.3 Bumped PMD extension to version 1.1.9 --- examples/lib/bld/bld-wrapper.properties | 2 +- lib/bld/bld-wrapper.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/lib/bld/bld-wrapper.properties b/examples/lib/bld/bld-wrapper.properties index ea90a9b..d7e1f15 100644 --- a/examples/lib/bld/bld-wrapper.properties +++ b/examples/lib/bld/bld-wrapper.properties @@ -2,7 +2,7 @@ bld.downloadExtensionJavadoc=false bld.downloadExtensionSources=true bld.downloadLocation= bld.extension-detekt=com.uwyn.rife2:bld-detekt:0.9.7 -bld.extension-kotlin=com.uwyn.rife2:bld-kotlin:1.0.2 +bld.extension-kotlin=com.uwyn.rife2:bld-kotlin:1.0.3 bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES bld.sourceDirectories= bld.version=2.1.0 diff --git a/lib/bld/bld-wrapper.properties b/lib/bld/bld-wrapper.properties index 196e2c9..f1493b7 100644 --- a/lib/bld/bld-wrapper.properties +++ b/lib/bld/bld-wrapper.properties @@ -2,7 +2,7 @@ bld.downloadExtensionJavadoc=false bld.downloadExtensionSources=true bld.downloadLocation= bld.extension-exec=com.uwyn.rife2:bld-exec:1.0.3 -bld.extension-pmd=com.uwyn.rife2:bld-pmd:1.1.7 +bld.extension-pmd=com.uwyn.rife2:bld-pmd:1.1.9 bld.repositories=MAVEN_CENTRAL,MAVEN_LOCAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES bld.sourceDirectories= bld.version=2.1.0 From d1f4a614feae109f33720d5892dae0ca07edccf6 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Tue, 14 Jan 2025 00:03:46 -0800 Subject: [PATCH 07/31] Bumped Kotlin extension to version 1.0.4 --- examples/lib/bld/bld-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/lib/bld/bld-wrapper.properties b/examples/lib/bld/bld-wrapper.properties index d7e1f15..442e9f5 100644 --- a/examples/lib/bld/bld-wrapper.properties +++ b/examples/lib/bld/bld-wrapper.properties @@ -2,7 +2,7 @@ bld.downloadExtensionJavadoc=false bld.downloadExtensionSources=true bld.downloadLocation= bld.extension-detekt=com.uwyn.rife2:bld-detekt:0.9.7 -bld.extension-kotlin=com.uwyn.rife2:bld-kotlin:1.0.3 +bld.extension-kotlin=com.uwyn.rife2:bld-kotlin:1.0.4 bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES bld.sourceDirectories= bld.version=2.1.0 From 1bef03ec7961f41e29535e4388e422eb6814003e Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Tue, 14 Jan 2025 00:04:14 -0800 Subject: [PATCH 08/31] Bumped AssertJ to version 3.27.2 --- src/bld/java/rife/bld/extension/DetektOperationBuild.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bld/java/rife/bld/extension/DetektOperationBuild.java b/src/bld/java/rife/bld/extension/DetektOperationBuild.java index b41434d..81581eb 100644 --- a/src/bld/java/rife/bld/extension/DetektOperationBuild.java +++ b/src/bld/java/rife/bld/extension/DetektOperationBuild.java @@ -48,7 +48,7 @@ public class DetektOperationBuild extends Project { scope(test) .include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 11, 4))) .include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 11, 4))) - .include(dependency("org.assertj", "assertj-core", version(3, 27, 0))); + .include(dependency("org.assertj", "assertj-core", version(3, 27, 2))); javadocOperation() .javadocOptions() .author() From 93d963398b3c6af2a71edd99acec50b962eb479b Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Tue, 14 Jan 2025 00:04:44 -0800 Subject: [PATCH 09/31] Bumped bld to version 2.2.0 --- .idea/libraries/bld.xml | 4 ++-- .vscode/settings.json | 2 +- README.md | 2 +- examples/.idea/libraries/bld.xml | 4 ++-- examples/.vscode/settings.json | 2 +- examples/lib/bld/bld-wrapper.jar | Bin 30440 -> 30440 bytes examples/lib/bld/bld-wrapper.properties | 2 +- lib/bld/bld-wrapper.jar | Bin 30440 -> 30440 bytes lib/bld/bld-wrapper.properties | 6 +++--- .../bld/extension/DetektOperationBuild.java | 2 +- 10 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.idea/libraries/bld.xml b/.idea/libraries/bld.xml index 5c4010c..553c281 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 4c33beb..a3f4fd0 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.1.0.jar", + "${HOME}/.bld/dist/bld-2.2.0.jar", "lib/**/*.jar" ] } diff --git a/README.md b/README.md index e7170d4..3bde731 100755 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![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.1.0-FA9052?label=bld&labelColor=2392FF)](https://rife2.com/bld) +[![bld](https://img.shields.io/badge/2.2.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-detekt/maven-metadata.xml?color=blue)](https://repo.rife2.com/#/releases/com/uwyn/rife2/bld-detekt) [![Snapshot](https://flat.badgen.net/maven/v/metadata-url/repo.rife2.com/snapshots/com/uwyn/rife2/bld-detekt/maven-metadata.xml?label=snapshot)](https://repo.rife2.com/#/snapshots/com/uwyn/rife2/bld-detekt) [![GitHub CI](https://github.com/rife2/bld-detekt/actions/workflows/bld.yml/badge.svg)](https://github.com/rife2/bld-detekt/actions/workflows/bld.yml) diff --git a/examples/.idea/libraries/bld.xml b/examples/.idea/libraries/bld.xml index 5c4010c..553c281 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 4c33beb..a3f4fd0 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.1.0.jar", + "${HOME}/.bld/dist/bld-2.2.0.jar", "lib/**/*.jar" ] } diff --git a/examples/lib/bld/bld-wrapper.jar b/examples/lib/bld/bld-wrapper.jar index e617d5bb50f57abf688eb5c4724770577e69c4c6..209385ae77ad04edabb30557baab3c645b38244a 100644 GIT binary patch delta 203 zcmaFymhr_~M!o=VW)=|!4h{~6M-#Q9Ci2y?fas0=CN^NkqnshM0T=HiJZzMV+Mu*Z+4E3GxFi=3=9mcKpf!B$Rxsmuy1l+ qi4(-0EhQdc#-!3l3x3Ci2y?fas0=CN^NkqnshM0T=HiJZzMV+Mu*Z+4E3GxFi=3=9mcKpf!B$Rxsmuy1l+ qi4(-0EhQdc#-!3m46ZvXcK=j6b6B{sNa-Y4%=Jz(UnZUfwefC{Y zmW&gd9z;y7;2a}_^`p=LB0E{9L{8<3F#|(@H#^70qR3Eo1_lOJAP(?mWD;RO*f%+^ q#0g^0mJ$yzV^V1_L?9f-SXb%-5&2dc3zaJK;{dr5Wb)*-W!3=tEjt$g diff --git a/lib/bld/bld-wrapper.properties b/lib/bld/bld-wrapper.properties index f1493b7..9e371e3 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.3 -bld.extension-pmd=com.uwyn.rife2:bld-pmd:1.1.9 +bld.extension-exec=com.uwyn.rife2:bld-exec:1.0.4 +bld.extension-pmd=com.uwyn.rife2:bld-pmd:1.1.10 bld.repositories=MAVEN_CENTRAL,MAVEN_LOCAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES bld.sourceDirectories= -bld.version=2.1.0 +bld.version=2.2.0 diff --git a/src/bld/java/rife/bld/extension/DetektOperationBuild.java b/src/bld/java/rife/bld/extension/DetektOperationBuild.java index 81581eb..32f7a7a 100644 --- a/src/bld/java/rife/bld/extension/DetektOperationBuild.java +++ b/src/bld/java/rife/bld/extension/DetektOperationBuild.java @@ -43,7 +43,7 @@ public class DetektOperationBuild extends Project { repositories = List.of(MAVEN_LOCAL, MAVEN_CENTRAL, RIFE2_RELEASES, RIFE2_SNAPSHOTS); scope(compile) - .include(dependency("com.uwyn.rife2", "bld", version(2, 1, 0))) + .include(dependency("com.uwyn.rife2", "bld", version(2, 2, 0))) .include(dependency("io.gitlab.arturbosch.detekt", "detekt-cli", version(1, 23, 7))); scope(test) .include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 11, 4))) From 48952f505f1f81bfb876750b755a87ee7b7bbb90 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Tue, 14 Jan 2025 00:05:55 -0800 Subject: [PATCH 10/31] Updated copyright for 2025 --- src/bld/java/rife/bld/extension/DetektOperationBuild.java | 2 +- src/main/java/rife/bld/extension/DetektOperation.java | 2 +- src/main/java/rife/bld/extension/detekt/Report.java | 2 +- src/main/java/rife/bld/extension/detekt/ReportId.java | 2 +- src/test/java/rife/bld/extension/DetektOperationTest.java | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/bld/java/rife/bld/extension/DetektOperationBuild.java b/src/bld/java/rife/bld/extension/DetektOperationBuild.java index 32f7a7a..8e60c7e 100644 --- a/src/bld/java/rife/bld/extension/DetektOperationBuild.java +++ b/src/bld/java/rife/bld/extension/DetektOperationBuild.java @@ -1,5 +1,5 @@ /* - * Copyright 2023-2024 the original author or authors. + * Copyright 2023-2025 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. diff --git a/src/main/java/rife/bld/extension/DetektOperation.java b/src/main/java/rife/bld/extension/DetektOperation.java index ec3ebae..67a50f2 100644 --- a/src/main/java/rife/bld/extension/DetektOperation.java +++ b/src/main/java/rife/bld/extension/DetektOperation.java @@ -1,5 +1,5 @@ /* - * Copyright 2023-2024 the original author or authors. + * Copyright 2023-2025 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. diff --git a/src/main/java/rife/bld/extension/detekt/Report.java b/src/main/java/rife/bld/extension/detekt/Report.java index 32dcc60..ffa4a45 100644 --- a/src/main/java/rife/bld/extension/detekt/Report.java +++ b/src/main/java/rife/bld/extension/detekt/Report.java @@ -1,5 +1,5 @@ /* - * Copyright 2023-2024 the original author or authors. + * Copyright 2023-2025 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. diff --git a/src/main/java/rife/bld/extension/detekt/ReportId.java b/src/main/java/rife/bld/extension/detekt/ReportId.java index ef53bc9..c087243 100644 --- a/src/main/java/rife/bld/extension/detekt/ReportId.java +++ b/src/main/java/rife/bld/extension/detekt/ReportId.java @@ -1,5 +1,5 @@ /* - * Copyright 2023-2024 the original author or authors. + * Copyright 2023-2025 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. diff --git a/src/test/java/rife/bld/extension/DetektOperationTest.java b/src/test/java/rife/bld/extension/DetektOperationTest.java index 85b1b76..a56a64a 100644 --- a/src/test/java/rife/bld/extension/DetektOperationTest.java +++ b/src/test/java/rife/bld/extension/DetektOperationTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2023-2024 the original author or authors. + * Copyright 2023-2025 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. From 99691fb2e9212808e8794950a23b6746d2d4c229 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Tue, 14 Jan 2025 00:08:10 -0800 Subject: [PATCH 11/31] Fixed BaseProjectBlueprint init in tests --- src/test/java/rife/bld/extension/DetektOperationTest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/test/java/rife/bld/extension/DetektOperationTest.java b/src/test/java/rife/bld/extension/DetektOperationTest.java index a56a64a..ecc510a 100644 --- a/src/test/java/rife/bld/extension/DetektOperationTest.java +++ b/src/test/java/rife/bld/extension/DetektOperationTest.java @@ -245,7 +245,7 @@ class DetektOperationTest { var op = new DetektOperation() .fromProject(new BaseProjectBlueprint(new File("examples"), "com.example", - "Example")) + "example", "Example")) .baseline(baseline) .createBaseline(true); op.execute(); @@ -260,7 +260,7 @@ class DetektOperationTest { void testExampleMaxIssues() { var op = new DetektOperation() .fromProject(new BaseProjectBlueprint(new File("examples"), "com.example", - "Example")) + "example", "Example")) .maxIssues(8); assertThatNoException().isThrownBy(op::execute); } @@ -277,7 +277,7 @@ class DetektOperationTest { var op = new DetektOperation() .fromProject(new BaseProjectBlueprint(new File("examples"), "com.example", - "Example")) + "example", "Example")) .report(new Report(ReportId.HTML, html.getAbsolutePath())) .report(new Report(ReportId.XML, xml.getAbsolutePath())) .report(new Report(ReportId.TXT, txt.getAbsolutePath())) @@ -295,7 +295,7 @@ class DetektOperationTest { void testExamplesExecute() { var op = new DetektOperation() .fromProject(new BaseProjectBlueprint(new File("examples"), "com.example", - "Example")) + "example", "Example")) .debug(true); assertThatThrownBy(op::execute).isInstanceOf(ExitStatusException.class); } From d6f424972a37e7bd1d2e62cb73382a8eb0aba6f3 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Tue, 14 Jan 2025 12:09:51 -0800 Subject: [PATCH 12/31] Version 0.9.8 --- .idea/icon.svg | 13 +++++++++++++ examples/lib/bld/bld-wrapper.properties | 2 +- .../rife/bld/extension/DetektOperationBuild.java | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 .idea/icon.svg diff --git a/.idea/icon.svg b/.idea/icon.svg new file mode 100644 index 0000000..81220b4 --- /dev/null +++ b/.idea/icon.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/examples/lib/bld/bld-wrapper.properties b/examples/lib/bld/bld-wrapper.properties index 7697410..010e6a6 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-detekt=com.uwyn.rife2:bld-detekt:0.9.7 +bld.extension-detekt=com.uwyn.rife2:bld-detekt:0.9.8 bld.extension-kotlin=com.uwyn.rife2:bld-kotlin:1.0.4 bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES bld.sourceDirectories= diff --git a/src/bld/java/rife/bld/extension/DetektOperationBuild.java b/src/bld/java/rife/bld/extension/DetektOperationBuild.java index 8e60c7e..9b7e73d 100644 --- a/src/bld/java/rife/bld/extension/DetektOperationBuild.java +++ b/src/bld/java/rife/bld/extension/DetektOperationBuild.java @@ -33,7 +33,7 @@ public class DetektOperationBuild extends Project { public DetektOperationBuild() { pkg = "rife.bld.extension"; name = "DetektOperation"; - version = version(0, 9, 7); + version = version(0, 9, 8); javaRelease = 17; From 1115acaad481e35205750f6c24447607c9fedcd9 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Sun, 23 Feb 2025 15:42:57 -0800 Subject: [PATCH 13/31] Update pages actions to the latest versions --- .github/workflows/pages.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index e191f6d..88c2cd6 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@v1 + uses: actions/upload-pages-artifact@v3 with: # Upload generated Javadocs repository path: "build/javadoc/" - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v1 + uses: actions/deploy-pages@v4 From 7ad511a40c5d3434021851df4f1c955883dce992 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Sun, 23 Feb 2025 15:43:47 -0800 Subject: [PATCH 14/31] Bump JUnit to version 5.12.0 --- examples/src/bld/java/com/example/ExampleBuild.java | 4 ++-- src/bld/java/rife/bld/extension/DetektOperationBuild.java | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/src/bld/java/com/example/ExampleBuild.java b/examples/src/bld/java/com/example/ExampleBuild.java index d413e22..d99ea96 100644 --- a/examples/src/bld/java/com/example/ExampleBuild.java +++ b/examples/src/bld/java/com/example/ExampleBuild.java @@ -36,8 +36,8 @@ public class ExampleBuild extends Project { .include(dependency("org.jetbrains.kotlin", "kotlin-stdlib", kotlin)); scope(test) .include(dependency("org.jetbrains.kotlin", "kotlin-test-junit5", kotlin)) - .include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 11, 4))) - .include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 11, 4))); + .include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 12, 0))) + .include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 12, 0))); // Include the Kotlin source directory when creating or publishing sources Java Archives jarSourcesOperation().sourceDirectories(new File(srcMainDirectory(), "kotlin")); diff --git a/src/bld/java/rife/bld/extension/DetektOperationBuild.java b/src/bld/java/rife/bld/extension/DetektOperationBuild.java index 9b7e73d..c58bbed 100644 --- a/src/bld/java/rife/bld/extension/DetektOperationBuild.java +++ b/src/bld/java/rife/bld/extension/DetektOperationBuild.java @@ -46,9 +46,9 @@ public class DetektOperationBuild extends Project { .include(dependency("com.uwyn.rife2", "bld", version(2, 2, 0))) .include(dependency("io.gitlab.arturbosch.detekt", "detekt-cli", version(1, 23, 7))); scope(test) - .include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 11, 4))) - .include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 11, 4))) - .include(dependency("org.assertj", "assertj-core", version(3, 27, 2))); + .include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 12, 0))) + .include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 12, 0))) + .include(dependency("org.assertj", "assertj-core", version(3, 27, 3))); javadocOperation() .javadocOptions() .author() From ae53af2ba6929f038b5cd21fd26c30db049e174c Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Sun, 23 Feb 2025 15:44:13 -0800 Subject: [PATCH 15/31] Bump PMD extension to version 1.2.0 --- lib/bld/bld-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/bld/bld-wrapper.properties b/lib/bld/bld-wrapper.properties index 9e371e3..4f5f791 100644 --- a/lib/bld/bld-wrapper.properties +++ b/lib/bld/bld-wrapper.properties @@ -2,7 +2,7 @@ bld.downloadExtensionJavadoc=false bld.downloadExtensionSources=true bld.downloadLocation= bld.extension-exec=com.uwyn.rife2:bld-exec:1.0.4 -bld.extension-pmd=com.uwyn.rife2:bld-pmd:1.1.10 +bld.extension-pmd=com.uwyn.rife2:bld-pmd:1.2.0 bld.repositories=MAVEN_CENTRAL,MAVEN_LOCAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES bld.sourceDirectories= bld.version=2.2.0 From 95971222f9cf7aa8666adacf575d54db2052679b Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Sun, 23 Feb 2025 15:45:08 -0800 Subject: [PATCH 16/31] Bump Detekt to version 1.23.8 --- examples/src/bld/java/com/example/ExampleBuild.java | 2 +- src/bld/java/rife/bld/extension/DetektOperationBuild.java | 2 +- src/main/java/rife/bld/extension/DetektOperation.java | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/examples/src/bld/java/com/example/ExampleBuild.java b/examples/src/bld/java/com/example/ExampleBuild.java index d99ea96..d096fe9 100644 --- a/examples/src/bld/java/com/example/ExampleBuild.java +++ b/examples/src/bld/java/com/example/ExampleBuild.java @@ -31,7 +31,7 @@ public class ExampleBuild extends Project { repositories = List.of(MAVEN_LOCAL, MAVEN_CENTRAL, RIFE2_RELEASES); - final var kotlin = version(2, 1, 0); + final var kotlin = version(2, 1, 10); scope(compile) .include(dependency("org.jetbrains.kotlin", "kotlin-stdlib", kotlin)); scope(test) diff --git a/src/bld/java/rife/bld/extension/DetektOperationBuild.java b/src/bld/java/rife/bld/extension/DetektOperationBuild.java index c58bbed..af8177e 100644 --- a/src/bld/java/rife/bld/extension/DetektOperationBuild.java +++ b/src/bld/java/rife/bld/extension/DetektOperationBuild.java @@ -44,7 +44,7 @@ public class DetektOperationBuild extends Project { scope(compile) .include(dependency("com.uwyn.rife2", "bld", version(2, 2, 0))) - .include(dependency("io.gitlab.arturbosch.detekt", "detekt-cli", version(1, 23, 7))); + .include(dependency("io.gitlab.arturbosch.detekt", "detekt-cli", version(1, 23, 8))); scope(test) .include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 12, 0))) .include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 12, 0))) diff --git a/src/main/java/rife/bld/extension/DetektOperation.java b/src/main/java/rife/bld/extension/DetektOperation.java index 67a50f2..4bfe7f7 100644 --- a/src/main/java/rife/bld/extension/DetektOperation.java +++ b/src/main/java/rife/bld/extension/DetektOperation.java @@ -48,8 +48,7 @@ public class DetektOperation extends AbstractProcessOperation { "kotlin-reflect-", "kotlin-script-runtime-", "kotlin-stdlib-", - "kotlin-stdlib-jdk7-", - "kotlin-stdlib-jdk8-", + "kotlinx-coroutines-", "kotlinx-html-jvm-", "kotlinx-serialization-", "sarif4k-jvm-", From 7386332361044a4adae649a767beebdd699ac704 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Sun, 23 Feb 2025 16:32:20 -0800 Subject: [PATCH 17/31] Version 0.9.9 --- examples/lib/bld/bld-wrapper.properties | 2 +- src/bld/java/rife/bld/extension/DetektOperationBuild.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/lib/bld/bld-wrapper.properties b/examples/lib/bld/bld-wrapper.properties index 010e6a6..e770087 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-detekt=com.uwyn.rife2:bld-detekt:0.9.8 +bld.extension-detekt=com.uwyn.rife2:bld-detekt:0.9.9 bld.extension-kotlin=com.uwyn.rife2:bld-kotlin:1.0.4 bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES bld.sourceDirectories= diff --git a/src/bld/java/rife/bld/extension/DetektOperationBuild.java b/src/bld/java/rife/bld/extension/DetektOperationBuild.java index af8177e..f70a050 100644 --- a/src/bld/java/rife/bld/extension/DetektOperationBuild.java +++ b/src/bld/java/rife/bld/extension/DetektOperationBuild.java @@ -33,13 +33,13 @@ public class DetektOperationBuild extends Project { public DetektOperationBuild() { pkg = "rife.bld.extension"; name = "DetektOperation"; - version = version(0, 9, 8); + version = version(0, 9, 9); javaRelease = 17; downloadSources = true; autoDownloadPurge = true; - + repositories = List.of(MAVEN_LOCAL, MAVEN_CENTRAL, RIFE2_RELEASES, RIFE2_SNAPSHOTS); scope(compile) From 41d6667dcaa7f85cf92bcc4240c1b12ff07881cc Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Mon, 24 Feb 2025 22:47:25 -0800 Subject: [PATCH 18/31] Bump bld to version 2.2.1 --- .idea/libraries/bld.xml | 4 ++-- .vscode/settings.json | 2 +- README.md | 2 +- examples/.idea/libraries/bld.xml | 4 ++-- examples/.vscode/settings.json | 2 +- examples/lib/bld/bld-wrapper.jar | Bin 30440 -> 30440 bytes examples/lib/bld/bld-wrapper.properties | 2 +- lib/bld/bld-wrapper.jar | Bin 30440 -> 30440 bytes lib/bld/bld-wrapper.properties | 2 +- .../bld/extension/DetektOperationBuild.java | 4 ++-- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.idea/libraries/bld.xml b/.idea/libraries/bld.xml index 553c281..153a060 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 a3f4fd0..ba429d0 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.0.jar", + "${HOME}/.bld/dist/bld-2.2.1.jar", "lib/**/*.jar" ] } diff --git a/README.md b/README.md index 3bde731..6b544a6 100755 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![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.0-FA9052?label=bld&labelColor=2392FF)](https://rife2.com/bld) +[![bld](https://img.shields.io/badge/2.2.1-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-detekt/maven-metadata.xml?color=blue)](https://repo.rife2.com/#/releases/com/uwyn/rife2/bld-detekt) [![Snapshot](https://flat.badgen.net/maven/v/metadata-url/repo.rife2.com/snapshots/com/uwyn/rife2/bld-detekt/maven-metadata.xml?label=snapshot)](https://repo.rife2.com/#/snapshots/com/uwyn/rife2/bld-detekt) [![GitHub CI](https://github.com/rife2/bld-detekt/actions/workflows/bld.yml/badge.svg)](https://github.com/rife2/bld-detekt/actions/workflows/bld.yml) diff --git a/examples/.idea/libraries/bld.xml b/examples/.idea/libraries/bld.xml index 553c281..153a060 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 a3f4fd0..ba429d0 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.0.jar", + "${HOME}/.bld/dist/bld-2.2.1.jar", "lib/**/*.jar" ] } diff --git a/examples/lib/bld/bld-wrapper.jar b/examples/lib/bld/bld-wrapper.jar index 209385ae77ad04edabb30557baab3c645b38244a..20412e6d4f74d458a32a22bc557b641e0d04341c 100644 GIT binary patch delta 187 zcmaFymhr_~M&1B#W)=|!4h{~6pPM2k^42i}sf~T6HXwR(uf68x_cpVcK%C9J_T3PM zv=h4?SVXnpJR_L#z0eRWHCekvQIUlqz?+>z?vI25I|Bm)D-Z{GGct)Vz-^hFTjC5h peshT@nEqc90;a=CA@tf(S1|u;X&gkn%%213f+&!glh>A60{{uJNihHb delta 187 zcmaFymhr_~M&1B#W)=|!4h{~6M-#Ot^42i}sf~T6HXwR(uf68x_cpVcK%C9J_T3PM zv=h4?SVXnpJR_L#z0eRWHCekvQIUZmz?+?;A60{{v!L(KpH diff --git a/examples/lib/bld/bld-wrapper.properties b/examples/lib/bld/bld-wrapper.properties index e770087..705e9e2 100644 --- a/examples/lib/bld/bld-wrapper.properties +++ b/examples/lib/bld/bld-wrapper.properties @@ -5,4 +5,4 @@ bld.extension-detekt=com.uwyn.rife2:bld-detekt:0.9.9 bld.extension-kotlin=com.uwyn.rife2:bld-kotlin:1.0.4 bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES bld.sourceDirectories= -bld.version=2.2.0 +bld.version=2.2.1 diff --git a/lib/bld/bld-wrapper.jar b/lib/bld/bld-wrapper.jar index 6dda5dbbbf2b0191cd595a86525abf8999e29532..ab362ae64115ef1238756fb43c9092a58f775dda 100644 GIT binary patch delta 187 zcmaFymhr_~M&1B#W)=|!4h{~6Z<`_}^42i}sf~T6HXwR(uf68x_cpVcK%C9J_T3PM zv=h4?SVXnpJR_L#z0eRWHCekvQIUlqz?+>z?vI25I|Bm)D-Z{GGct)Vz-^hFTjC5h peshT@nEqc90;a=CA@tf(S1|u;X&gkn%%213f+&!glh>A60|5BuNdW)= delta 187 zcmaFymhr_~M&1B#W)=|!4h{~6>l3vn^42i}sf~T6HXwR(uf68x_cpVcK%C9J_T3PM zv=h4?SVXnpJR_L#z0eRWHCekvQIUZmz?+?;A60|3m%LmdDB diff --git a/lib/bld/bld-wrapper.properties b/lib/bld/bld-wrapper.properties index 4f5f791..6d3e0c7 100644 --- a/lib/bld/bld-wrapper.properties +++ b/lib/bld/bld-wrapper.properties @@ -5,4 +5,4 @@ bld.extension-exec=com.uwyn.rife2:bld-exec:1.0.4 bld.extension-pmd=com.uwyn.rife2:bld-pmd:1.2.0 bld.repositories=MAVEN_CENTRAL,MAVEN_LOCAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES bld.sourceDirectories= -bld.version=2.2.0 +bld.version=2.2.1 diff --git a/src/bld/java/rife/bld/extension/DetektOperationBuild.java b/src/bld/java/rife/bld/extension/DetektOperationBuild.java index f70a050..52efc9c 100644 --- a/src/bld/java/rife/bld/extension/DetektOperationBuild.java +++ b/src/bld/java/rife/bld/extension/DetektOperationBuild.java @@ -33,7 +33,7 @@ public class DetektOperationBuild extends Project { public DetektOperationBuild() { pkg = "rife.bld.extension"; name = "DetektOperation"; - version = version(0, 9, 9); + version = version(0, 9, 10, "SNAPSHOT"); javaRelease = 17; @@ -43,7 +43,7 @@ public class DetektOperationBuild extends Project { repositories = List.of(MAVEN_LOCAL, MAVEN_CENTRAL, RIFE2_RELEASES, RIFE2_SNAPSHOTS); scope(compile) - .include(dependency("com.uwyn.rife2", "bld", version(2, 2, 0))) + .include(dependency("com.uwyn.rife2", "bld", version(2, 2, 1))) .include(dependency("io.gitlab.arturbosch.detekt", "detekt-cli", version(1, 23, 8))); scope(test) .include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 12, 0))) From e39302bf8b61699944e0bc565db1c2ec815e7bd0 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Tue, 18 Mar 2025 13:06:07 -0700 Subject: [PATCH 19/31] Bump JUnit to version 5.12.1 --- examples/src/bld/java/com/example/ExampleBuild.java | 5 +++-- src/bld/java/rife/bld/extension/DetektOperationBuild.java | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/examples/src/bld/java/com/example/ExampleBuild.java b/examples/src/bld/java/com/example/ExampleBuild.java index d096fe9..5c86248 100644 --- a/examples/src/bld/java/com/example/ExampleBuild.java +++ b/examples/src/bld/java/com/example/ExampleBuild.java @@ -36,8 +36,9 @@ public class ExampleBuild extends Project { .include(dependency("org.jetbrains.kotlin", "kotlin-stdlib", kotlin)); scope(test) .include(dependency("org.jetbrains.kotlin", "kotlin-test-junit5", kotlin)) - .include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 12, 0))) - .include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 12, 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.junit.platform", "junit-platform-launcher", version(1, 12, 1))); // Include the Kotlin source directory when creating or publishing sources Java Archives jarSourcesOperation().sourceDirectories(new File(srcMainDirectory(), "kotlin")); diff --git a/src/bld/java/rife/bld/extension/DetektOperationBuild.java b/src/bld/java/rife/bld/extension/DetektOperationBuild.java index 52efc9c..515bb9e 100644 --- a/src/bld/java/rife/bld/extension/DetektOperationBuild.java +++ b/src/bld/java/rife/bld/extension/DetektOperationBuild.java @@ -46,8 +46,8 @@ public class DetektOperationBuild extends Project { .include(dependency("com.uwyn.rife2", "bld", version(2, 2, 1))) .include(dependency("io.gitlab.arturbosch.detekt", "detekt-cli", version(1, 23, 8))); scope(test) - .include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 12, 0))) - .include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 12, 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))); javadocOperation() .javadocOptions() From 012cd14067f63baecce2f3d3b3c4b0de12727a35 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Tue, 18 Mar 2025 13:06:22 -0700 Subject: [PATCH 20/31] Bump PMD extension to version 1.2.1 --- lib/bld/bld-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/bld/bld-wrapper.properties b/lib/bld/bld-wrapper.properties index 6d3e0c7..c5da09f 100644 --- a/lib/bld/bld-wrapper.properties +++ b/lib/bld/bld-wrapper.properties @@ -2,7 +2,7 @@ bld.downloadExtensionJavadoc=false bld.downloadExtensionSources=true bld.downloadLocation= bld.extension-exec=com.uwyn.rife2:bld-exec:1.0.4 -bld.extension-pmd=com.uwyn.rife2:bld-pmd:1.2.0 +bld.extension-pmd=com.uwyn.rife2:bld-pmd:1.2.1 bld.repositories=MAVEN_CENTRAL,MAVEN_LOCAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES bld.sourceDirectories= bld.version=2.2.1 From 3df50c2e792f961f082483b75db1598ca778791b Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Tue, 18 Mar 2025 13:07:29 -0700 Subject: [PATCH 21/31] Add generic installation instructions --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6b544a6..cdcb0a0 100755 --- a/README.md +++ b/README.md @@ -8,7 +8,15 @@ [![Snapshot](https://flat.badgen.net/maven/v/metadata-url/repo.rife2.com/snapshots/com/uwyn/rife2/bld-detekt/maven-metadata.xml?label=snapshot)](https://repo.rife2.com/#/snapshots/com/uwyn/rife2/bld-detekt) [![GitHub CI](https://github.com/rife2/bld-detekt/actions/workflows/bld.yml/badge.svg)](https://github.com/rife2/bld-detekt/actions/workflows/bld.yml) -To install, please refer to the [extensions documentation](https://github.com/rife2/bld/wiki/Extensions). +To install the latest version, add the following to the `lib/bld/bld-wrapper.properties` file: + +```properties +bld.extension-detekt=com.uwyn.rife2:bld-detekt +``` + +For more information, please refer to the [extensions](https://github.com/rife2/bld/wiki/Extensions) documentation. + +## Check Source Code with Detekt To check all Kotlin source code located in the project, add the following to your build file: ```java From 0efd5ab2fe1a51ef8700b94bca9024f322769460 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Tue, 18 Mar 2025 23:34:19 -0700 Subject: [PATCH 22/31] JDK 24 --- .github/workflows/bld.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bld.yml b/.github/workflows/bld.yml index 6020ea2..15f647d 100644 --- a/.github/workflows/bld.yml +++ b/.github/workflows/bld.yml @@ -8,7 +8,7 @@ jobs: strategy: matrix: - java-version: [17, 21, 23] + java-version: [17, 21, 24] steps: - name: Checkout source repository From 8d4643d99aa57ee35efe193046d4b3db18b34fd4 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Mon, 24 Mar 2025 01:38:50 -0700 Subject: [PATCH 23/31] Bump Kotlin to version 2.1.20 --- examples/.idea/bld.xml | 6 ++++++ examples/src/bld/java/com/example/ExampleBuild.java | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 examples/.idea/bld.xml diff --git a/examples/.idea/bld.xml b/examples/.idea/bld.xml new file mode 100644 index 0000000..6600cee --- /dev/null +++ b/examples/.idea/bld.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/examples/src/bld/java/com/example/ExampleBuild.java b/examples/src/bld/java/com/example/ExampleBuild.java index 5c86248..99a2972 100644 --- a/examples/src/bld/java/com/example/ExampleBuild.java +++ b/examples/src/bld/java/com/example/ExampleBuild.java @@ -31,7 +31,7 @@ public class ExampleBuild extends Project { repositories = List.of(MAVEN_LOCAL, MAVEN_CENTRAL, RIFE2_RELEASES); - final var kotlin = version(2, 1, 10); + final var kotlin = version(2, 1, 20); scope(compile) .include(dependency("org.jetbrains.kotlin", "kotlin-stdlib", kotlin)); scope(test) From 30f92d12623dcd35bf220ad14878f39cfe080bde Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Mon, 24 Mar 2025 01:39:53 -0700 Subject: [PATCH 24/31] Bump Kotlin extension to version 1.1.0-SNAPSHOT --- examples/lib/bld/bld-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/lib/bld/bld-wrapper.properties b/examples/lib/bld/bld-wrapper.properties index 705e9e2..e693951 100644 --- a/examples/lib/bld/bld-wrapper.properties +++ b/examples/lib/bld/bld-wrapper.properties @@ -2,7 +2,7 @@ bld.downloadExtensionJavadoc=false bld.downloadExtensionSources=true bld.downloadLocation= bld.extension-detekt=com.uwyn.rife2:bld-detekt:0.9.9 -bld.extension-kotlin=com.uwyn.rife2:bld-kotlin:1.0.4 +bld.extension-kotlin=com.uwyn.rife2:bld-kotlin:1.1.0-SNAPSHOT bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES bld.sourceDirectories= bld.version=2.2.1 From 7d5b50641c69be0a0e805a4972e7a3e77ebd86af Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Mon, 24 Mar 2025 01:44:39 -0700 Subject: [PATCH 25/31] Add OS matrix to test the project and examples on Ubuntu, Windows and macOS --- .github/workflows/bld.yml | 22 ++++++++++++------- .../bld/extension/DetektOperationBuild.java | 12 ++++++---- .../bld/extension/DetektOperationTest.java | 3 +++ 3 files changed, 25 insertions(+), 12 deletions(-) diff --git a/.github/workflows/bld.yml b/.github/workflows/bld.yml index 15f647d..cfed82f 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,12 +24,16 @@ jobs: distribution: "zulu" java-version: ${{ matrix.java-version }} - - name: Download dependencies - run: ./bld download - - name: Download dependencies [examples] working-directory: examples run: ./bld download - - name: Run tests + - name: Run tests [examples] + working-directory: examples run: ./bld compile test + + - name: Download dependencies + run: ./bld download + + - name: Run tests + run: ./bld compile test \ No newline at end of file diff --git a/src/bld/java/rife/bld/extension/DetektOperationBuild.java b/src/bld/java/rife/bld/extension/DetektOperationBuild.java index 515bb9e..78f1a3e 100644 --- a/src/bld/java/rife/bld/extension/DetektOperationBuild.java +++ b/src/bld/java/rife/bld/extension/DetektOperationBuild.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; @@ -97,10 +98,13 @@ public class DetektOperationBuild 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/test/java/rife/bld/extension/DetektOperationTest.java b/src/test/java/rife/bld/extension/DetektOperationTest.java index ecc510a..16e6345 100644 --- a/src/test/java/rife/bld/extension/DetektOperationTest.java +++ b/src/test/java/rife/bld/extension/DetektOperationTest.java @@ -19,6 +19,8 @@ package rife.bld.extension; import org.assertj.core.api.AutoCloseableSoftAssertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.condition.EnabledOnOs; +import org.junit.jupiter.api.condition.OS; import rife.bld.BaseProject; import rife.bld.blueprints.BaseProjectBlueprint; import rife.bld.extension.detekt.Report; @@ -92,6 +94,7 @@ class DetektOperationTest { } @Test + @EnabledOnOs(OS.LINUX) @SuppressWarnings("PMD.AvoidInstantiatingObjectsInLoops") void testCheckAllParameters() throws IOException { var args = Files.readAllLines(Paths.get("src", "test", "resources", "detekt-args.txt")); From e6d5c6c38fad73a2b3a90c59d97e3d07d0371ec9 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Mon, 24 Mar 2025 10:06:41 -0700 Subject: [PATCH 26/31] Quote and clean path in the process command list --- .../rife/bld/extension/DetektOperation.java | 51 ++++++++++++++----- 1 file changed, 37 insertions(+), 14 deletions(-) diff --git a/src/main/java/rife/bld/extension/DetektOperation.java b/src/main/java/rife/bld/extension/DetektOperation.java index 4bfe7f7..fd191f4 100644 --- a/src/main/java/rife/bld/extension/DetektOperation.java +++ b/src/main/java/rife/bld/extension/DetektOperation.java @@ -28,6 +28,7 @@ import java.nio.file.Path; import java.util.ArrayList; import java.util.Collection; import java.util.List; +import java.util.Locale; import java.util.logging.Level; import java.util.logging.Logger; @@ -55,6 +56,8 @@ public class DetektOperation extends AbstractProcessOperation { "snakeyaml-engine-", "trove4j-"); private static final Logger LOGGER = Logger.getLogger(DetektOperation.class.getName()); + private static final String OS_NAME = + System.getProperty("os.name") != null ? System.getProperty("os.name").toLowerCase(Locale.US) : null; private final Collection classpath_ = new ArrayList<>(); private final Collection config_ = new ArrayList<>(); private final Collection excludes_ = new ArrayList<>(); @@ -290,6 +293,17 @@ public class DetektOperation extends AbstractProcessOperation { return classPath(paths.stream().map(File::new).toList()); } + private String cleanPath(File path) { + return cleanPath(path.getAbsolutePath()); + } + + private String cleanPath(String path) { + if (isWindows()) { + return path.replaceAll("\\\\", "\\\\\\\\"); + } + return path; + } + /** * Paths to the config files ({@code path/to/config.yml}). * @@ -323,7 +337,6 @@ public class DetektOperation extends AbstractProcessOperation { return configStrings(List.of(configs)); } - /** * Paths to the config files ({@code path/to/config.yml}). * @@ -509,7 +522,7 @@ public class DetektOperation extends AbstractProcessOperation { if (project_ != null) { args.add(javaTool()); args.add("-cp"); - args.add(getDetektJarList(project_.libBldDirectory())); + args.add('"' + getDetektJarList(project_.libBldDirectory()) + '"'); args.add("io.gitlab.arturbosch.detekt.cli.Main"); // all-rules @@ -525,13 +538,13 @@ public class DetektOperation extends AbstractProcessOperation { // base-path if (isNotBlank(basePath_)) { args.add("--base-path"); - args.add(basePath_); + args.add('"' + cleanPath(basePath_) + '"'); } // baseline if (isNotBlank(baseline_)) { args.add("--baseline"); - args.add(baseline_); + args.add('"' + cleanPath(baseline_) + '"'); } // build-upon-default-config @@ -542,19 +555,20 @@ public class DetektOperation extends AbstractProcessOperation { // classpath if (!classpath_.isEmpty()) { args.add("--classpath"); - args.add(String.join(File.pathSeparator, classpath_.stream().map(File::getAbsolutePath).toList())); + args.add('"' + String.join(':' + File.pathSeparator, classpath_.stream().map(this::cleanPath).toList()) + + '"'); } // config if (!config_.isEmpty()) { args.add("-config"); - args.add(String.join(";", config_.stream().map(File::getAbsolutePath).toList())); + args.add('"' + String.join(";", config_.stream().map(this::cleanPath).toList()) + '"'); } // config-resource if (isNotBlank(configResource_)) { args.add("--config-resource"); - args.add(configResource_); + args.add('"' + cleanPath(configResource_) + '"'); } // create-baseline @@ -575,7 +589,7 @@ public class DetektOperation extends AbstractProcessOperation { // excludes if (!excludes_.isEmpty()) { args.add("--excludes"); - args.add(String.join(",", excludes_)); + args.add('"' + String.join(",", excludes_.stream().map(this::cleanPath).toList()) + '"'); } // generate-config @@ -586,19 +600,19 @@ public class DetektOperation extends AbstractProcessOperation { // includes if (!includes_.isEmpty()) { args.add("--includes"); - args.add(String.join(",", includes_)); + args.add('"' + String.join(",", includes_.stream().map(this::cleanPath).toList()) + '"'); } // input if (!input_.isEmpty()) { args.add("--input"); - args.add(String.join(",", input_.stream().map(File::getAbsolutePath).toList())); + args.add('"' + String.join(",", input_.stream().map(this::cleanPath).toList()) + '"'); } // jdk-home if (isNotBlank(jdkHome_)) { args.add("--jdk-home"); - args.add(jdkHome_); + args.add('"' + cleanPath(jdkHome_) + '"'); } // jvm-target @@ -627,14 +641,14 @@ public class DetektOperation extends AbstractProcessOperation { // plugins if (!plugins_.isEmpty()) { args.add("--plugins"); - args.add(String.join(",", plugins_.stream().map(File::getAbsolutePath).toList())); + args.add('"' + String.join(",", plugins_.stream().map(this::cleanPath).toList()) + '"'); } // report if (!report_.isEmpty()) { report_.forEach(it -> { args.add("--report"); - args.add(it.id().name().toLowerCase() + ":" + it.path()); + args.add(it.id().name().toLowerCase() + ":\"" + cleanPath(it.path()) + '"'); }); } @@ -693,7 +707,7 @@ public class DetektOperation extends AbstractProcessOperation { if (!f.getName().endsWith("-sources.jar") && !f.getName().endsWith("-javadoc.jar")) { for (var m : DETEKT_JARS) { if (f.getName().startsWith(m)) { - jars.add(f.getAbsolutePath()); + jars.add(cleanPath(f)); break; } } @@ -819,6 +833,15 @@ public class DetektOperation extends AbstractProcessOperation { return s != null && !s.isBlank(); } + /** + * Determines if the current operating system is Windows. + * + * @return true if the operating system is Windows, false otherwise. + */ + private boolean isWindows() { + return OS_NAME != null && OS_NAME.contains("win"); + } + /** * EXPERIMENTAL: Use a custom JDK home directory to include into the * classpath. From 432e5ffed14d8bc7ddd55b88733901bd60f45a39 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Mon, 24 Mar 2025 16:09:45 -0700 Subject: [PATCH 27/31] Enable extension logging in examples --- .../src/bld/java/com/example/ExampleBuild.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/src/bld/java/com/example/ExampleBuild.java b/examples/src/bld/java/com/example/ExampleBuild.java index 99a2972..a4511d5 100644 --- a/examples/src/bld/java/com/example/ExampleBuild.java +++ b/examples/src/bld/java/com/example/ExampleBuild.java @@ -46,14 +46,14 @@ public class ExampleBuild extends Project { public static void main(String[] args) { // Enable detailed logging -// 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); + 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 ExampleBuild().start(args); } From 3e350e617a2b4a1998f0e9b58c11da8857b22567 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Mon, 24 Mar 2025 16:11:11 -0700 Subject: [PATCH 28/31] Bump detekt extension to version 0.9.10-SNAPSHOT --- examples/lib/bld/bld-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/lib/bld/bld-wrapper.properties b/examples/lib/bld/bld-wrapper.properties index e693951..67eaf60 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-detekt=com.uwyn.rife2:bld-detekt:0.9.9 +bld.extension-detekt=com.uwyn.rife2:bld-detekt:0.9.10-SNAPSHOT bld.extension-kotlin=com.uwyn.rife2:bld-kotlin:1.1.0-SNAPSHOT bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES bld.sourceDirectories= From 5a2824507f7866f664d4de909cb3fca8b8ab7a15 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Mon, 24 Mar 2025 16:12:15 -0700 Subject: [PATCH 29/31] Removed paths quoting --- .../rife/bld/extension/DetektOperation.java | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/src/main/java/rife/bld/extension/DetektOperation.java b/src/main/java/rife/bld/extension/DetektOperation.java index fd191f4..8e3213e 100644 --- a/src/main/java/rife/bld/extension/DetektOperation.java +++ b/src/main/java/rife/bld/extension/DetektOperation.java @@ -522,7 +522,7 @@ public class DetektOperation extends AbstractProcessOperation { if (project_ != null) { args.add(javaTool()); args.add("-cp"); - args.add('"' + getDetektJarList(project_.libBldDirectory()) + '"'); + args.add(getDetektJarList(project_.libBldDirectory())); args.add("io.gitlab.arturbosch.detekt.cli.Main"); // all-rules @@ -538,13 +538,13 @@ public class DetektOperation extends AbstractProcessOperation { // base-path if (isNotBlank(basePath_)) { args.add("--base-path"); - args.add('"' + cleanPath(basePath_) + '"'); + args.add(cleanPath(basePath_)); } // baseline if (isNotBlank(baseline_)) { args.add("--baseline"); - args.add('"' + cleanPath(baseline_) + '"'); + args.add(cleanPath(baseline_)); } // build-upon-default-config @@ -555,20 +555,19 @@ public class DetektOperation extends AbstractProcessOperation { // classpath if (!classpath_.isEmpty()) { args.add("--classpath"); - args.add('"' + String.join(':' + File.pathSeparator, classpath_.stream().map(this::cleanPath).toList()) - + '"'); + args.add(String.join(File.pathSeparator, classpath_.stream().map(this::cleanPath).toList())); } // config if (!config_.isEmpty()) { args.add("-config"); - args.add('"' + String.join(";", config_.stream().map(this::cleanPath).toList()) + '"'); + args.add(String.join(";", config_.stream().map(this::cleanPath).toList())); } // config-resource if (isNotBlank(configResource_)) { args.add("--config-resource"); - args.add('"' + cleanPath(configResource_) + '"'); + args.add(cleanPath(configResource_)); } // create-baseline @@ -589,7 +588,7 @@ public class DetektOperation extends AbstractProcessOperation { // excludes if (!excludes_.isEmpty()) { args.add("--excludes"); - args.add('"' + String.join(",", excludes_.stream().map(this::cleanPath).toList()) + '"'); + args.add(String.join(",", excludes_.stream().map(this::cleanPath).toList())); } // generate-config @@ -600,19 +599,19 @@ public class DetektOperation extends AbstractProcessOperation { // includes if (!includes_.isEmpty()) { args.add("--includes"); - args.add('"' + String.join(",", includes_.stream().map(this::cleanPath).toList()) + '"'); + args.add(String.join(",", includes_.stream().map(this::cleanPath).toList())); } // input if (!input_.isEmpty()) { args.add("--input"); - args.add('"' + String.join(",", input_.stream().map(this::cleanPath).toList()) + '"'); + args.add(String.join(",", input_.stream().map(this::cleanPath).toList())); } // jdk-home if (isNotBlank(jdkHome_)) { args.add("--jdk-home"); - args.add('"' + cleanPath(jdkHome_) + '"'); + args.add(cleanPath(jdkHome_)); } // jvm-target @@ -641,14 +640,14 @@ public class DetektOperation extends AbstractProcessOperation { // plugins if (!plugins_.isEmpty()) { args.add("--plugins"); - args.add('"' + String.join(",", plugins_.stream().map(this::cleanPath).toList()) + '"'); + args.add(String.join(",", plugins_.stream().map(this::cleanPath).toList())); } // report if (!report_.isEmpty()) { report_.forEach(it -> { args.add("--report"); - args.add(it.id().name().toLowerCase() + ":\"" + cleanPath(it.path()) + '"'); + args.add(it.id().name().toLowerCase() + ":" + cleanPath(it.path())); }); } From 69a9eac4143bb74e34ea25469bb6b0e522f30053 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Mon, 24 Mar 2025 16:13:07 -0700 Subject: [PATCH 30/31] Add baseline file for testing --- .github/workflows/bld.yml | 4 ++-- examples/src/bld/java/com/example/ExampleBuild.java | 9 +++++++++ examples/src/test/resources/detekt-baseline.xml | 12 ++++++++++++ .../java/rife/bld/extension/DetektOperationTest.java | 2 +- 4 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 examples/src/test/resources/detekt-baseline.xml diff --git a/.github/workflows/bld.yml b/.github/workflows/bld.yml index cfed82f..bacdbae 100644 --- a/.github/workflows/bld.yml +++ b/.github/workflows/bld.yml @@ -28,9 +28,9 @@ jobs: working-directory: examples run: ./bld download - - name: Run tests [examples] + - name: Run Detekt [examples] working-directory: examples - run: ./bld compile test + run: ./bld compile test-ci - name: Download dependencies run: ./bld download diff --git a/examples/src/bld/java/com/example/ExampleBuild.java b/examples/src/bld/java/com/example/ExampleBuild.java index a4511d5..9a9a49c 100644 --- a/examples/src/bld/java/com/example/ExampleBuild.java +++ b/examples/src/bld/java/com/example/ExampleBuild.java @@ -101,4 +101,13 @@ public class ExampleBuild extends Project { .input("src/test/kotlin") .execute(); } + + @BuildCommand(value = "test-ci", summary = "Run detek with a test baseline") + public void testCi() throws ExitStatusException, IOException, InterruptedException { + // Run detek with the test basline (for CI testing) + new DetektOperation() + .fromProject(this) + .baseline("src/test/resources/detekt-baseline.xml") + .execute(); + } } diff --git a/examples/src/test/resources/detekt-baseline.xml b/examples/src/test/resources/detekt-baseline.xml new file mode 100644 index 0000000..1bf5c16 --- /dev/null +++ b/examples/src/test/resources/detekt-baseline.xml @@ -0,0 +1,12 @@ + + + + + EmptyIfBlock:Example.kt$Example.Companion${ } + MagicNumber:Example.kt$Example$5 + NewLineAtEndOfFile:ExampleTest.kt$com.example.ExampleTest.kt + ThrowingExceptionsWithoutMessageOrCause:Example.kt$Example.Companion$IllegalStateException() + UseCheckOrError:Example.kt$Example.Companion$throw IllegalStateException() + VariableNaming:Example.kt$Example$// https://detekt.dev/docs/rules/naming#variablenaming val Message: String get() = "Hello World!" + + diff --git a/src/test/java/rife/bld/extension/DetektOperationTest.java b/src/test/java/rife/bld/extension/DetektOperationTest.java index 16e6345..04db107 100644 --- a/src/test/java/rife/bld/extension/DetektOperationTest.java +++ b/src/test/java/rife/bld/extension/DetektOperationTest.java @@ -244,7 +244,7 @@ class DetektOperationTest { void testExampleBaseline() throws IOException, ExitStatusException, InterruptedException { var tmpDir = Files.createTempDirectory("bld-detekt-").toFile(); - var baseline = new File(tmpDir, "detekt-baseline.xml"); + var baseline = new File(tmpDir, "examples/src/test/resources/detekt-baseline.xml"); var op = new DetektOperation() .fromProject(new BaseProjectBlueprint(new File("examples"), "com.example", From ea10fd012f8e1788f72f0554d758d9571d7241b8 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Mon, 24 Mar 2025 17:42:46 -0700 Subject: [PATCH 31/31] Disable cleanPath() for testing --- .../rife/bld/extension/DetektOperation.java | 50 ++++++------------- 1 file changed, 14 insertions(+), 36 deletions(-) diff --git a/src/main/java/rife/bld/extension/DetektOperation.java b/src/main/java/rife/bld/extension/DetektOperation.java index 8e3213e..2bb17a1 100644 --- a/src/main/java/rife/bld/extension/DetektOperation.java +++ b/src/main/java/rife/bld/extension/DetektOperation.java @@ -28,7 +28,6 @@ import java.nio.file.Path; import java.util.ArrayList; import java.util.Collection; import java.util.List; -import java.util.Locale; import java.util.logging.Level; import java.util.logging.Logger; @@ -52,12 +51,11 @@ public class DetektOperation extends AbstractProcessOperation { "kotlinx-coroutines-", "kotlinx-html-jvm-", "kotlinx-serialization-", + "poko-annotations-jvm-", "sarif4k-jvm-", "snakeyaml-engine-", "trove4j-"); private static final Logger LOGGER = Logger.getLogger(DetektOperation.class.getName()); - private static final String OS_NAME = - System.getProperty("os.name") != null ? System.getProperty("os.name").toLowerCase(Locale.US) : null; private final Collection classpath_ = new ArrayList<>(); private final Collection config_ = new ArrayList<>(); private final Collection excludes_ = new ArrayList<>(); @@ -293,17 +291,6 @@ public class DetektOperation extends AbstractProcessOperation { return classPath(paths.stream().map(File::new).toList()); } - private String cleanPath(File path) { - return cleanPath(path.getAbsolutePath()); - } - - private String cleanPath(String path) { - if (isWindows()) { - return path.replaceAll("\\\\", "\\\\\\\\"); - } - return path; - } - /** * Paths to the config files ({@code path/to/config.yml}). * @@ -538,13 +525,13 @@ public class DetektOperation extends AbstractProcessOperation { // base-path if (isNotBlank(basePath_)) { args.add("--base-path"); - args.add(cleanPath(basePath_)); + args.add(basePath_); } // baseline if (isNotBlank(baseline_)) { args.add("--baseline"); - args.add(cleanPath(baseline_)); + args.add(baseline_); } // build-upon-default-config @@ -555,19 +542,19 @@ public class DetektOperation extends AbstractProcessOperation { // classpath if (!classpath_.isEmpty()) { args.add("--classpath"); - args.add(String.join(File.pathSeparator, classpath_.stream().map(this::cleanPath).toList())); + args.add(String.join(File.pathSeparator, classpath_.stream().map(File::getAbsolutePath).toList())); } // config if (!config_.isEmpty()) { args.add("-config"); - args.add(String.join(";", config_.stream().map(this::cleanPath).toList())); + args.add(String.join(";", config_.stream().map(File::getAbsolutePath).toList())); } // config-resource if (isNotBlank(configResource_)) { args.add("--config-resource"); - args.add(cleanPath(configResource_)); + args.add(configResource_); } // create-baseline @@ -588,7 +575,7 @@ public class DetektOperation extends AbstractProcessOperation { // excludes if (!excludes_.isEmpty()) { args.add("--excludes"); - args.add(String.join(",", excludes_.stream().map(this::cleanPath).toList())); + args.add(String.join(",", excludes_)); } // generate-config @@ -599,19 +586,19 @@ public class DetektOperation extends AbstractProcessOperation { // includes if (!includes_.isEmpty()) { args.add("--includes"); - args.add(String.join(",", includes_.stream().map(this::cleanPath).toList())); + args.add(String.join(",", includes_)); } // input if (!input_.isEmpty()) { args.add("--input"); - args.add(String.join(",", input_.stream().map(this::cleanPath).toList())); + args.add(String.join(",", input_.stream().map(File::getAbsolutePath).toList())); } // jdk-home if (isNotBlank(jdkHome_)) { args.add("--jdk-home"); - args.add(cleanPath(jdkHome_)); + args.add(jdkHome_); } // jvm-target @@ -640,14 +627,14 @@ public class DetektOperation extends AbstractProcessOperation { // plugins if (!plugins_.isEmpty()) { args.add("--plugins"); - args.add(String.join(",", plugins_.stream().map(this::cleanPath).toList())); + args.add(String.join(",", plugins_.stream().map(File::getAbsolutePath).toList())); } // report if (!report_.isEmpty()) { report_.forEach(it -> { args.add("--report"); - args.add(it.id().name().toLowerCase() + ":" + cleanPath(it.path())); + args.add(it.id().name().toLowerCase() + ":" + it.path()); }); } @@ -706,7 +693,7 @@ public class DetektOperation extends AbstractProcessOperation { if (!f.getName().endsWith("-sources.jar") && !f.getName().endsWith("-javadoc.jar")) { for (var m : DETEKT_JARS) { if (f.getName().startsWith(m)) { - jars.add(cleanPath(f)); + jars.add(f.getAbsolutePath()); break; } } @@ -714,7 +701,7 @@ public class DetektOperation extends AbstractProcessOperation { } } } - return String.join(":", jars); + return String.join(File.pathSeparator, jars); } /** @@ -832,15 +819,6 @@ public class DetektOperation extends AbstractProcessOperation { return s != null && !s.isBlank(); } - /** - * Determines if the current operating system is Windows. - * - * @return true if the operating system is Windows, false otherwise. - */ - private boolean isWindows() { - return OS_NAME != null && OS_NAME.contains("win"); - } - /** * EXPERIMENTAL: Use a custom JDK home directory to include into the * classpath.