Compare commits

...

3 commits

Author SHA1 Message Date
21bd30166d
Version 0.9.6 2024-08-30 16:59:15 -07:00
e9f3079911
More API cleanups 2024-08-30 16:59:02 -07:00
158167bebd
Bumped bld to version 2.1.0 2024-08-30 16:55:52 -07:00
18 changed files with 65 additions and 50 deletions

View file

@ -2,12 +2,12 @@
<library name="bld">
<CLASSES>
<root url="file://$PROJECT_DIR$/lib/bld" />
<root url="jar://$USER_HOME$/.bld/dist/bld-2.0.1.jar!/" />
<root url="jar://$USER_HOME$/.bld/dist/bld-2.1.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="file://$PROJECT_DIR$/lib/bld" />
<root url="jar://$USER_HOME$/.bld/dist/bld-2.0.1-sources.jar!/" />
<root url="jar://$USER_HOME$/.bld/dist/bld-2.1.0-sources.jar!/" />
</SOURCES>
<excluded>
<root url="jar://$PROJECT_DIR$/lib/bld/bld-wrapper.jar!/" />

View file

@ -7,7 +7,7 @@
<SOURCES>
<root url="file://$PROJECT_DIR$/lib/compile" />
</SOURCES>
<jarDirectory url="file://$PROJECT_DIR$/lib/compile" recursive="false" />
<jarDirectory url="file://$PROJECT_DIR$/lib/compile" recursive="false" type="SOURCES" />
<jarDirectory url="file://$PROJECT_DIR$/lib/compile" recursive="true" />
<jarDirectory url="file://$PROJECT_DIR$/lib/compile" recursive="true" type="SOURCES" />
</library>
</component>

View file

@ -8,7 +8,7 @@
<SOURCES>
<root url="file://$PROJECT_DIR$/lib/runtime" />
</SOURCES>
<jarDirectory url="file://$PROJECT_DIR$/lib/runtime" recursive="false" />
<jarDirectory url="file://$PROJECT_DIR$/lib/runtime" recursive="false" type="SOURCES" />
<jarDirectory url="file://$PROJECT_DIR$/lib/runtime" recursive="true" />
<jarDirectory url="file://$PROJECT_DIR$/lib/runtime" recursive="true" type="SOURCES" />
</library>
</component>

View file

@ -8,7 +8,7 @@
<SOURCES>
<root url="file://$PROJECT_DIR$/lib/test" />
</SOURCES>
<jarDirectory url="file://$PROJECT_DIR$/lib/test" recursive="false" />
<jarDirectory url="file://$PROJECT_DIR$/lib/test" recursive="false" type="SOURCES" />
<jarDirectory url="file://$PROJECT_DIR$/lib/test" recursive="true" />
<jarDirectory url="file://$PROJECT_DIR$/lib/test" recursive="true" type="SOURCES" />
</library>
</component>

View file

@ -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"
]
}

View file

@ -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)

View file

@ -2,12 +2,12 @@
<library name="bld">
<CLASSES>
<root url="file://$PROJECT_DIR$/lib/bld" />
<root url="jar://$USER_HOME$/.bld/dist/bld-2.0.1.jar!/" />
<root url="jar://$USER_HOME$/.bld/dist/bld-2.1.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="file://$PROJECT_DIR$/lib/bld" />
<root url="jar://$USER_HOME$/.bld/dist/bld-2.0.1-sources.jar!/" />
<root url="jar://$USER_HOME$/.bld/dist/bld-2.1.0-sources.jar!/" />
</SOURCES>
<excluded>
<root url="jar://$PROJECT_DIR$/lib/bld/bld-wrapper.jar!/" />

View file

@ -7,7 +7,7 @@
<SOURCES>
<root url="file://$PROJECT_DIR$/lib/compile" />
</SOURCES>
<jarDirectory url="file://$PROJECT_DIR$/lib/compile" recursive="false" />
<jarDirectory url="file://$PROJECT_DIR$/lib/compile" recursive="false" type="SOURCES" />
<jarDirectory url="file://$PROJECT_DIR$/lib/compile" recursive="true" />
<jarDirectory url="file://$PROJECT_DIR$/lib/compile" recursive="true" type="SOURCES" />
</library>
</component>

View file

@ -8,7 +8,7 @@
<SOURCES>
<root url="file://$PROJECT_DIR$/lib/runtime" />
</SOURCES>
<jarDirectory url="file://$PROJECT_DIR$/lib/runtime" recursive="false" />
<jarDirectory url="file://$PROJECT_DIR$/lib/runtime" recursive="false" type="SOURCES" />
<jarDirectory url="file://$PROJECT_DIR$/lib/runtime" recursive="true" />
<jarDirectory url="file://$PROJECT_DIR$/lib/runtime" recursive="true" type="SOURCES" />
</library>
</component>

View file

@ -8,7 +8,7 @@
<SOURCES>
<root url="file://$PROJECT_DIR$/lib/test" />
</SOURCES>
<jarDirectory url="file://$PROJECT_DIR$/lib/test" recursive="false" />
<jarDirectory url="file://$PROJECT_DIR$/lib/test" recursive="false" type="SOURCES" />
<jarDirectory url="file://$PROJECT_DIR$/lib/test" recursive="true" />
<jarDirectory url="file://$PROJECT_DIR$/lib/test" recursive="true" type="SOURCES" />
</library>
</component>

View file

@ -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"
]
}

Binary file not shown.

View file

@ -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

Binary file not shown.

View file

@ -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

View file

@ -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)))

View file

@ -149,7 +149,7 @@ public class DetektOperation extends AbstractProcessOperation<DetektOperation> {
* @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<DetektOperation> {
* @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<DetektOperation> {
*
* @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<DetektOperation> {
*
* @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<DetektOperation> {
*
* @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<DetektOperation> {
*
* @param paths the paths
* @return this operation instance
* @see #classPath(File...)
*/
public DetektOperation classPath(Collection<File> paths) {
classpath_.addAll(paths);
@ -269,10 +273,10 @@ public class DetektOperation extends AbstractProcessOperation<DetektOperation> {
*
* @param paths the paths
* @return this operation instance
* @see #classPath(Path...)
*/
public DetektOperation classPathPaths(Collection<Path> 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<DetektOperation> {
*
* @param paths the paths
* @return this operation instance
* @see #classPath(String...)
*/
public DetektOperation classPathStrings(Collection<String> 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<DetektOperation> {
*
* @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<DetektOperation> {
*
* @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<DetektOperation> {
*
* @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<DetektOperation> {
*
* @param configs the config files
* @return this operation instance
* @see #config(File...)
*/
public DetektOperation config(Collection<File> configs) {
config_.addAll(configs);
@ -343,10 +351,10 @@ public class DetektOperation extends AbstractProcessOperation<DetektOperation> {
*
* @param configs the config files
* @return this operation instance
* @see #config(Path...)
*/
public DetektOperation configPaths(Collection<Path> 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<DetektOperation> {
* @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<DetektOperation> {
*
* @param configs the config files
* @return this operation instance
* @see #config(String...)
*/
public DetektOperation configStrings(Collection<String> configs) {
config_.addAll(configs.stream().map(File::new).toList());
@ -441,8 +450,7 @@ public class DetektOperation extends AbstractProcessOperation<DetektOperation> {
* @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<DetektOperation> {
* @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<DetektOperation> {
*
* @param paths the paths
* @return this operation instance
* @see #input(Collection)
*/
public DetektOperation input(Collection<File> paths) {
input_.addAll(paths);
@ -746,6 +754,7 @@ public class DetektOperation extends AbstractProcessOperation<DetektOperation> {
*
* @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<DetektOperation> {
*
* @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<DetektOperation> {
*
* @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<DetektOperation> {
*
* @param paths the paths
* @return this operation instance
* @see #input(Path...)
*/
public DetektOperation inputPaths(Collection<Path> 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<DetektOperation> {
*
* @param paths the paths
* @return this operation instance
* @see #input(String...)
*/
public DetektOperation inputStrings(Collection<String> 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<DetektOperation> {
*
* @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<DetektOperation> {
*
* @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<DetektOperation> {
*
* @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<DetektOperation> {
*
* @param jars the jars paths
* @return this operation instance
* @see #input(File...)
*/
public DetektOperation plugins(Collection<File> jars) {
plugins_.addAll(jars);
@ -929,10 +944,10 @@ public class DetektOperation extends AbstractProcessOperation<DetektOperation> {
*
* @param jars the jars paths
* @return this operation instance
* @see #plugins(Path...)
*/
public DetektOperation pluginsPaths(Collection<Path> 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<DetektOperation> {
*
* @param jars the jars paths
* @return this operation instance
* @see #plugins(String...)
*/
public DetektOperation pluginsStrings(Collection<String> jars) {
plugins_.addAll(jars.stream().map(File::new).toList());
return this;
return plugins(jars.stream().map(File::new).toList());
}
/**

View file

@ -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");
}