diff --git a/.idea/libraries/bld.xml b/.idea/libraries/bld.xml index 4dd96bf..5c4010c 100644 --- a/.idea/libraries/bld.xml +++ b/.idea/libraries/bld.xml @@ -2,12 +2,12 @@ - + - + diff --git a/.idea/libraries/compile.xml b/.idea/libraries/compile.xml index 9bd86aa..99cc0c0 100644 --- a/.idea/libraries/compile.xml +++ b/.idea/libraries/compile.xml @@ -7,7 +7,7 @@ - - + + \ No newline at end of file diff --git a/.idea/libraries/runtime.xml b/.idea/libraries/runtime.xml index 2ae5c4b..d4069f2 100644 --- a/.idea/libraries/runtime.xml +++ b/.idea/libraries/runtime.xml @@ -8,7 +8,7 @@ - - + + \ No newline at end of file diff --git a/.idea/libraries/test.xml b/.idea/libraries/test.xml index b80486a..57ed5ef 100644 --- a/.idea/libraries/test.xml +++ b/.idea/libraries/test.xml @@ -8,7 +8,7 @@ - - + + \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index 5b2667b..4c33beb 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.0.1.jar", + "${HOME}/.bld/dist/bld-2.1.0.jar", "lib/**/*.jar" ] } diff --git a/README.md b/README.md index 46e298b..e7170d4 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.0.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-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 4dd96bf..5c4010c 100644 --- a/examples/.idea/libraries/bld.xml +++ b/examples/.idea/libraries/bld.xml @@ -2,12 +2,12 @@ - + - + diff --git a/examples/.idea/libraries/compile.xml b/examples/.idea/libraries/compile.xml index 9bd86aa..99cc0c0 100644 --- a/examples/.idea/libraries/compile.xml +++ b/examples/.idea/libraries/compile.xml @@ -7,7 +7,7 @@ - - + + \ No newline at end of file diff --git a/examples/.idea/libraries/runtime.xml b/examples/.idea/libraries/runtime.xml index 2ae5c4b..d4069f2 100644 --- a/examples/.idea/libraries/runtime.xml +++ b/examples/.idea/libraries/runtime.xml @@ -8,7 +8,7 @@ - - + + \ No newline at end of file diff --git a/examples/.idea/libraries/test.xml b/examples/.idea/libraries/test.xml index b80486a..57ed5ef 100644 --- a/examples/.idea/libraries/test.xml +++ b/examples/.idea/libraries/test.xml @@ -8,7 +8,7 @@ - - + + \ No newline at end of file diff --git a/examples/.vscode/settings.json b/examples/.vscode/settings.json index 5b2667b..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.0.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 32bac6a..e617d5b 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 d6daa69..ef08e20 100644 --- a/examples/lib/bld/bld-wrapper.properties +++ b/examples/lib/bld/bld-wrapper.properties @@ -1,8 +1,8 @@ bld.downloadExtensionJavadoc=false bld.downloadExtensionSources=true bld.downloadLocation= -bld.extension-detekt=com.uwyn.rife2:bld-detekt:0.9.6-SNAPSHOT -bld.extension-kotlin=com.uwyn.rife2:bld-kotlin:1.0.1-SNAPSHOT +bld.extension-detekt=com.uwyn.rife2:bld-detekt:0.9.6 +bld.extension-kotlin=com.uwyn.rife2:bld-kotlin:1.0.1 bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES bld.sourceDirectories= -bld.version=2.0.1 +bld.version=2.1.0 diff --git a/lib/bld/bld-wrapper.jar b/lib/bld/bld-wrapper.jar index f836770..a7f1aff 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 79b2f59..5d0bba4 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.2 -bld.extension-pmd=com.uwyn.rife2:bld-pmd:1.1.4 +bld.extension-exec=com.uwyn.rife2:bld-exec:1.0.3 +bld.extension-pmd=com.uwyn.rife2:bld-pmd:1.1.5 bld.repositories=MAVEN_CENTRAL,MAVEN_LOCAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES bld.sourceDirectories= -bld.version=2.0.1 +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 549abd4..ba94b28 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, 6, "SNAPSHOT"); + version = version(0, 9, 6); javaRelease = 17; downloadSources = true; @@ -41,7 +41,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, 0, 1))) + .include(dependency("com.uwyn.rife2", "bld", version(2, 1, 0))) .include(dependency("io.gitlab.arturbosch.detekt", "detekt-cli", version(1, 23, 6))); scope(test) .include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 11, 0))) diff --git a/src/main/java/rife/bld/extension/DetektOperation.java b/src/main/java/rife/bld/extension/DetektOperation.java index e0b6f21..ec3ebae 100644 --- a/src/main/java/rife/bld/extension/DetektOperation.java +++ b/src/main/java/rife/bld/extension/DetektOperation.java @@ -149,7 +149,7 @@ public class DetektOperation extends AbstractProcessOperation { * @return this operation instance */ public DetektOperation basePath(Path path) { - return basePath(path.toFile()); + return basePath(path.toFile().getAbsolutePath()); } /** @@ -183,7 +183,7 @@ public class DetektOperation extends AbstractProcessOperation { * @return this operation instance */ public DetektOperation baseline(Path baseline) { - return baseline(baseline.toFile()); + return baseline(baseline.toFile().getAbsolutePath()); } /** @@ -214,6 +214,7 @@ public class DetektOperation extends AbstractProcessOperation { * * @param paths one or more files * @return this operation instance + * @see #classPath(Collection) */ public DetektOperation classPath(File... paths) { return classPath(List.of(paths)); @@ -225,6 +226,7 @@ public class DetektOperation extends AbstractProcessOperation { * * @param paths one or more files * @return this operation instance + * @see #classPathPaths(Collection) */ public DetektOperation classPath(Path... paths) { return classPathPaths(List.of(paths)); @@ -236,6 +238,7 @@ public class DetektOperation extends AbstractProcessOperation { * * @param paths one or more files * @return this operation instance + * @see #classPathStrings(Collection) */ public DetektOperation classPath(String... paths) { return classPathStrings(List.of(paths)); @@ -248,6 +251,7 @@ public class DetektOperation extends AbstractProcessOperation { * * @param paths the paths * @return this operation instance + * @see #classPath(File...) */ public DetektOperation classPath(Collection paths) { classpath_.addAll(paths); @@ -269,10 +273,10 @@ public class DetektOperation extends AbstractProcessOperation { * * @param paths the paths * @return this operation instance + * @see #classPath(Path...) */ public DetektOperation classPathPaths(Collection paths) { - classpath_.addAll(paths.stream().map(Path::toFile).toList()); - return this; + return classPath(paths.stream().map(Path::toFile).toList()); } /** @@ -281,10 +285,10 @@ public class DetektOperation extends AbstractProcessOperation { * * @param paths the paths * @return this operation instance + * @see #classPath(String...) */ public DetektOperation classPathStrings(Collection paths) { - classpath_.addAll(paths.stream().map(File::new).toList()); - return this; + return classPath(paths.stream().map(File::new).toList()); } /** @@ -292,6 +296,7 @@ public class DetektOperation extends AbstractProcessOperation { * * @param configs one or more config files * @return this operation instance + * @see #config(Collection) */ public DetektOperation config(File... configs) { return config(List.of(configs)); @@ -302,6 +307,7 @@ public class DetektOperation extends AbstractProcessOperation { * * @param configs one or more config files * @return this operation instance + * @see #configPaths(Collection) */ public DetektOperation config(Path... configs) { return configPaths(List.of(configs)); @@ -312,6 +318,7 @@ public class DetektOperation extends AbstractProcessOperation { * * @param configs one or more config files * @return this operation instance + * @see #configStrings(Collection) */ public DetektOperation config(String... configs) { return configStrings(List.of(configs)); @@ -323,6 +330,7 @@ public class DetektOperation extends AbstractProcessOperation { * * @param configs the config files * @return this operation instance + * @see #config(File...) */ public DetektOperation config(Collection configs) { config_.addAll(configs); @@ -343,10 +351,10 @@ public class DetektOperation extends AbstractProcessOperation { * * @param configs the config files * @return this operation instance + * @see #config(Path...) */ public DetektOperation configPaths(Collection configs) { - config_.addAll(configs.stream().map(Path::toFile).toList()); - return this; + return config(configs.stream().map(Path::toFile).toList()); } /** @@ -377,7 +385,7 @@ public class DetektOperation extends AbstractProcessOperation { * @return this operation instance */ public DetektOperation configResource(Path resource) { - return configResource(resource.toFile()); + return configResource(resource.toFile().getAbsolutePath()); } /** @@ -394,6 +402,7 @@ public class DetektOperation extends AbstractProcessOperation { * * @param configs the config files * @return this operation instance + * @see #config(String...) */ public DetektOperation configStrings(Collection configs) { config_.addAll(configs.stream().map(File::new).toList()); @@ -441,8 +450,7 @@ public class DetektOperation extends AbstractProcessOperation { * @return this operation instance */ public DetektOperation excludes(String... patterns) { - excludes_.addAll(List.of(patterns)); - return this; + return excludes(List.of(patterns)); } /** @@ -705,8 +713,7 @@ public class DetektOperation extends AbstractProcessOperation { * @return this operation instance */ public DetektOperation includes(String... patterns) { - includes_.addAll(List.of(patterns)); - return this; + return includes(List.of(patterns)); } /** @@ -735,6 +742,7 @@ public class DetektOperation extends AbstractProcessOperation { * * @param paths the paths * @return this operation instance + * @see #input(Collection) */ public DetektOperation input(Collection paths) { input_.addAll(paths); @@ -746,6 +754,7 @@ public class DetektOperation extends AbstractProcessOperation { * * @param paths one or more paths * @return this operation instance + * @see #inputStrings(Collection) */ public DetektOperation input(String... paths) { return inputStrings(List.of(paths)); @@ -756,6 +765,7 @@ public class DetektOperation extends AbstractProcessOperation { * * @param paths one or more paths * @return this operation instance + * @see #input(Collection) */ public DetektOperation input(File... paths) { return input(List.of(paths)); @@ -766,6 +776,7 @@ public class DetektOperation extends AbstractProcessOperation { * * @param paths one or more paths * @return this operation instance + * @see #inputPaths(Collection) */ public DetektOperation input(Path... paths) { return inputPaths(List.of(paths)); @@ -785,10 +796,10 @@ public class DetektOperation extends AbstractProcessOperation { * * @param paths the paths * @return this operation instance + * @see #input(Path...) */ public DetektOperation inputPaths(Collection paths) { - input_.addAll(paths.stream().map(Path::toFile).toList()); - return this; + return input(paths.stream().map(Path::toFile).toList()); } /** @@ -796,10 +807,10 @@ public class DetektOperation extends AbstractProcessOperation { * * @param paths the paths * @return this operation instance + * @see #input(String...) */ public DetektOperation inputStrings(Collection paths) { - input_.addAll(paths.stream().map(File::new).toList()); - return this; + return input(paths.stream().map(File::new).toList()); } /* @@ -879,6 +890,7 @@ public class DetektOperation extends AbstractProcessOperation { * * @param jars one or more jars * @return this operation instance + * @see #pluginsStrings(Collection) */ public DetektOperation plugins(String... jars) { return pluginsStrings(List.of(jars)); @@ -889,6 +901,7 @@ public class DetektOperation extends AbstractProcessOperation { * * @param jars one or more jars * @return this operation instance + * @see #plugins(Collection) */ public DetektOperation plugins(File... jars) { return plugins(List.of(jars)); @@ -899,6 +912,7 @@ public class DetektOperation extends AbstractProcessOperation { * * @param jars one or more jars * @return this operation instance + * @see #pluginsPaths(Collection) */ public DetektOperation plugins(Path... jars) { return pluginsPaths(List.of(jars)); @@ -909,6 +923,7 @@ public class DetektOperation extends AbstractProcessOperation { * * @param jars the jars paths * @return this operation instance + * @see #input(File...) */ public DetektOperation plugins(Collection jars) { plugins_.addAll(jars); @@ -929,10 +944,10 @@ public class DetektOperation extends AbstractProcessOperation { * * @param jars the jars paths * @return this operation instance + * @see #plugins(Path...) */ public DetektOperation pluginsPaths(Collection jars) { - plugins_.addAll(jars.stream().map(Path::toFile).toList()); - return this; + return plugins(jars.stream().map(Path::toFile).toList()); } /** @@ -940,10 +955,10 @@ public class DetektOperation extends AbstractProcessOperation { * * @param jars the jars paths * @return this operation instance + * @see #plugins(String...) */ public DetektOperation pluginsStrings(Collection jars) { - plugins_.addAll(jars.stream().map(File::new).toList()); - return this; + return plugins(jars.stream().map(File::new).toList()); } /** diff --git a/src/test/java/rife/bld/extension/DetektOperationTest.java b/src/test/java/rife/bld/extension/DetektOperationTest.java index 24e20ae..3a9ec3f 100644 --- a/src/test/java/rife/bld/extension/DetektOperationTest.java +++ b/src/test/java/rife/bld/extension/DetektOperationTest.java @@ -71,7 +71,7 @@ class DetektOperationTest { op = op.basePath(bar.toPath()); assertThat(op.basePath()).as("as path").isEqualTo(bar.getAbsolutePath()); - op = new DetektOperation().basePath("foo"); + op = op.basePath("foo"); assertThat(op.basePath()).as("as string").isEqualTo("foo"); } @@ -86,7 +86,7 @@ class DetektOperationTest { op = op.baseline(bar.toPath()); assertThat(op.baseline()).as("as path").isEqualTo(bar.getAbsolutePath()); - op = new DetektOperation().baseline("foo"); + op = op.baseline("foo"); assertThat(op.baseline()).as("as string").isEqualTo("foo"); }