diff --git a/.idea/libraries/bld.xml b/.idea/libraries/bld.xml
index 9f8c820..1d0172b 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 420b4de..cb9d556 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
[](https://opensource.org/licenses/Apache-2.0)
[](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html)
-[](https://rife2.com/bld)
+[](https://rife2.com/bld)
[](https://repo.rife2.com/#/releases/com/uwyn/rife2/bld-dokka)
[](https://repo.rife2.com/#/snapshots/com/uwyn/rife2/bld-dokka)
[](https://github.com/rife2/bld-dokka/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 f51a154..6a5e8d4 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 9834218..09caa18 100644
--- a/examples/lib/bld/bld-wrapper.properties
+++ b/examples/lib/bld/bld-wrapper.properties
@@ -5,4 +5,4 @@ bld.extension-dokka=com.uwyn.rife2:bld-dokka:1.0.1-SNAPSHOT
bld.extension-kotlin=com.uwyn.rife2:bld-kotlin:1.0.1-SNAPSHOT
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 f17986d..8c94be9 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/DokkaOperationBuild.java b/src/bld/java/rife/bld/extension/DokkaOperationBuild.java
index 97d313c..ba769ed 100644
--- a/src/bld/java/rife/bld/extension/DokkaOperationBuild.java
+++ b/src/bld/java/rife/bld/extension/DokkaOperationBuild.java
@@ -49,7 +49,7 @@ public class DokkaOperationBuild extends Project {
.include(dependency("org.jetbrains.dokka", "javadoc-plugin", dokka))
.include(dependency("org.jetbrains.dokka", "gfm-plugin", dokka))
.include(dependency("org.jetbrains.dokka", "jekyll-plugin", dokka))
- .include(dependency("com.uwyn.rife2", "bld", version(2, 0, 1)));
+ .include(dependency("com.uwyn.rife2", "bld", version(2, 1, 0)));
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)))
diff --git a/src/main/java/rife/bld/extension/dokka/SourceSet.java b/src/main/java/rife/bld/extension/dokka/SourceSet.java
index 78a7074..4062a1e 100644
--- a/src/main/java/rife/bld/extension/dokka/SourceSet.java
+++ b/src/main/java/rife/bld/extension/dokka/SourceSet.java
@@ -87,8 +87,7 @@ public class SourceSet {
* @return this operation instance
*/
public SourceSet apiVersion(int apiVersion) {
- apiVersion_ = String.valueOf(apiVersion);
- return this;
+ return apiVersion(String.valueOf(apiVersion));
}
/**
@@ -240,6 +239,7 @@ public class SourceSet {
*
* @param files one or more file
* @return this operation instance
+ * @see #classpath(Collection)
*/
public SourceSet classpath(File... files) {
return classpath(List.of(files));
@@ -254,6 +254,7 @@ public class SourceSet {
*
* @param files one or more file
* @return this operation instance
+ * @see #classpathStrings(Collection)
*/
public SourceSet classpath(String... files) {
return classpathStrings(List.of(files));
@@ -268,6 +269,7 @@ public class SourceSet {
*
* @param files one or more file
* @return this operation instance
+ * @see #classpathPaths(Collection)
*/
public SourceSet classpath(Path... files) {
return classpathPaths(List.of(files));
@@ -282,6 +284,7 @@ public class SourceSet {
*
* @param files the collection of files
* @return this operation instance
+ * @see #classpath(File...)
*/
public SourceSet classpath(Collection files) {
classpath_.addAll(files);
@@ -306,10 +309,10 @@ public class SourceSet {
*
* @param files the collection of files
* @return this operation instance
+ * @see #classpath(Path...)
*/
public SourceSet classpathPaths(Collection files) {
- classpath_.addAll(files.stream().map(Path::toFile).toList());
- return this;
+ return classpath(files.stream().map(Path::toFile).toList());
}
/**
@@ -321,10 +324,10 @@ public class SourceSet {
*
* @param files the collection of files
* @return this operation instance
+ * @see #classpath(String...)
*/
public SourceSet classpathStrings(Collection files) {
- classpath_.addAll(files.stream().map(File::new).toList());
- return this;
+ return classpath(files.stream().map(File::new).toList());
}
/**
@@ -448,10 +451,10 @@ public class SourceSet {
*
* @param files one or more files
* @return this operation instance
+ * @see #includes(Collection)
*/
public SourceSet includes(File... files) {
- includes_.addAll(List.of(files));
- return this;
+ return includes(List.of(files));
}
/**
@@ -464,6 +467,7 @@ public class SourceSet {
*
* @param files one or more files
* @return this operation instance
+ * @see #classpathStrings(Collection)
*/
public SourceSet includes(String... files) {
return includesStrings(List.of(files));
@@ -479,6 +483,7 @@ public class SourceSet {
*
* @param files one or more files
* @return this operation instance
+ * @see #classpathPaths(Collection)
*/
public SourceSet includes(Path... files) {
return includesPaths(List.of(files));
@@ -504,6 +509,7 @@ public class SourceSet {
*
* @param files the collection of files
* @return this operation instance
+ * @see #includes(File...)
*/
public SourceSet includes(Collection files) {
includes_.addAll(files);
@@ -520,10 +526,10 @@ public class SourceSet {
*
* @param files the collection of files
* @return this operation instance
+ * @see #includes(Path...)
*/
public SourceSet includesPaths(Collection files) {
- includes_.addAll(files.stream().map(Path::toFile).toList());
- return this;
+ return includes(files.stream().map(Path::toFile).toList());
}
/**
@@ -536,10 +542,10 @@ public class SourceSet {
*
* @param files the collection of files
* @return this operation instance
+ * @see #classpath(String...)
*/
public SourceSet includesStrings(Collection files) {
- includes_.addAll(files.stream().map(File::new).toList());
- return this;
+ return includes(files.stream().map(File::new).toList());
}
/**
@@ -579,8 +585,7 @@ public class SourceSet {
* @return this operation instance
*/
public SourceSet jdkVersion(int jdkVersion) {
- jdkVersion_ = String.valueOf(jdkVersion);
- return this;
+ return jdkVersion(String.valueOf(jdkVersion));
}
/**
@@ -601,8 +606,7 @@ public class SourceSet {
* @return this operation instance
*/
public SourceSet languageVersion(int languageVersion) {
- languageVersion_ = String.valueOf(languageVersion);
- return this;
+ return languageVersion(String.valueOf(languageVersion));
}
/**
@@ -704,8 +708,7 @@ public class SourceSet {
* @return this operation instance
*/
public SourceSet perPackageOptions(String... perPackageOptions) {
- perPackageOptions_.addAll(List.of(perPackageOptions));
- return this;
+ return perPackageOptions(List.of(perPackageOptions));
}
/**
@@ -734,6 +737,7 @@ public class SourceSet {
*
* @param samples the samples
* @return this operation instance
+ * @see #samples(File...)
*/
public SourceSet samples(Collection samples) {
samples_.addAll(samples);
@@ -757,6 +761,7 @@ public class SourceSet {
*
* @param samples nne or more samples
* @return this operation instance
+ * @see #samples(Collection)
*/
public SourceSet samples(File... samples) {
return samples(List.of(samples));
@@ -770,6 +775,7 @@ public class SourceSet {
*
* @param samples nne or more samples
* @return this operation instance
+ * @see #samplesStrings(Collection)
*/
public SourceSet samples(String... samples) {
return samplesStrings(List.of(samples));
@@ -783,6 +789,7 @@ public class SourceSet {
*
* @param samples nne or more samples
* @return this operation instance
+ * @see #samplesPaths(Collection)
*/
public SourceSet samples(Path... samples) {
return samplesPaths(List.of(samples));
@@ -796,10 +803,10 @@ public class SourceSet {
*
* @param samples the samples
* @return this operation instance
+ * @see #samples(Path...)
*/
public SourceSet samplesPaths(Collection samples) {
- samples_.addAll(samples.stream().map(Path::toFile).toList());
- return this;
+ return samples(samples.stream().map(Path::toFile).toList());
}
/**
@@ -810,10 +817,10 @@ public class SourceSet {
*
* @param samples the samples
* @return this operation instance
+ * @see #samples(String...)
*/
public SourceSet samplesStrings(Collection samples) {
- samples_.addAll(samples.stream().map(File::new).toList());
- return this;
+ return samples(samples.stream().map(File::new).toList());
}
/**
@@ -850,6 +857,7 @@ public class SourceSet {
*
* @param src the source code roots
* @return this operation instance
+ * @see #src(File...)
*/
public SourceSet src(Collection src) {
src_.addAll(src);
@@ -864,6 +872,7 @@ public class SourceSet {
*
* @param src pne ore moe source code roots
* @return this operation instance
+ * @see #src(Collection)
*/
public SourceSet src(File... src) {
return src(List.of(src));
@@ -877,6 +886,7 @@ public class SourceSet {
*
* @param src pne ore moe source code roots
* @return this operation instance
+ * @see #srcStrings(Collection)
*/
public SourceSet src(String... src) {
return srcStrings(List.of(src));
@@ -890,6 +900,7 @@ public class SourceSet {
*
* @param src pne ore moe source code roots
* @return this operation instance
+ * @see #srcPaths(Collection)
*/
public SourceSet src(Path... src) {
return srcPaths(List.of(src));
@@ -926,8 +937,19 @@ public class SourceSet {
* @return this operation instance
*/
public SourceSet srcLink(File srcPath, String remotePath, String lineSuffix) {
- srcLinks_.put(srcPath.getAbsolutePath(), remotePath + lineSuffix);
- return this;
+ return srcLink(srcPath.getAbsolutePath(), remotePath, lineSuffix);
+ }
+
+ /**
+ * Sets the mapping between a source directory and a Web service for browsing the code.
+ *
+ * @param srcPath the source path
+ * @param remotePath the remote path
+ * @param lineSuffix the line suffix
+ * @return this operation instance
+ */
+ public SourceSet srcLink(Path srcPath, String remotePath, String lineSuffix) {
+ return srcLink(srcPath.toFile().getAbsolutePath(), remotePath, lineSuffix);
}
/**
@@ -947,10 +969,10 @@ public class SourceSet {
*
* @param src the source code roots
* @return this operation instance
+ * @see #src(Path...)
*/
public SourceSet srcPaths(Collection src) {
- src_.addAll(src.stream().map(Path::toFile).toList());
- return this;
+ return src(src.stream().map(Path::toFile).toList());
}
/**
@@ -961,10 +983,10 @@ public class SourceSet {
*
* @param src the source code roots
* @return this operation instance
+ * @see #src(String...)
*/
public SourceSet srcStrings(Collection src) {
- src_.addAll(src.stream().map(File::new).toList());
- return this;
+ return src(src.stream().map(File::new).toList());
}
/**
@@ -974,6 +996,7 @@ public class SourceSet {
*
* @param suppressedFiles the suppressed files
* @return this operation instance
+ * @see #suppressedFiles(File...)
*/
public SourceSet suppressedFiles(Collection suppressedFiles) {
suppressedFiles_.addAll(suppressedFiles);
@@ -996,6 +1019,7 @@ public class SourceSet {
*
* @param suppressedFiles one or moe suppressed files
* @return this operation instance
+ * @see #suppressedFilesStrings(Collection)
*/
public SourceSet suppressedFiles(String... suppressedFiles) {
return suppressedFilesStrings(List.of(suppressedFiles));
@@ -1008,6 +1032,7 @@ public class SourceSet {
*
* @param suppressedFiles one or moe suppressed files
* @return this operation instance
+ * @see #suppressedFiles(Collection)
*/
public SourceSet suppressedFiles(File... suppressedFiles) {
return suppressedFiles(List.of(suppressedFiles));
@@ -1020,6 +1045,7 @@ public class SourceSet {
*
* @param suppressedFiles one or moe suppressed files
* @return this operation instance
+ * @see #suppressedFilesPaths(Collection)
*/
public SourceSet suppressedFiles(Path... suppressedFiles) {
return suppressedFilesPaths(List.of(suppressedFiles));
@@ -1032,10 +1058,10 @@ public class SourceSet {
*
* @param suppressedFiles the suppressed files
* @return this operation instance
+ * @see #suppressedFiles(Path...)
*/
public SourceSet suppressedFilesPaths(Collection suppressedFiles) {
- suppressedFiles_.addAll(suppressedFiles.stream().map(Path::toFile).toList());
- return this;
+ return suppressedFiles(suppressedFiles.stream().map(Path::toFile).toList());
}
/**
@@ -1045,9 +1071,9 @@ public class SourceSet {
*
* @param suppressedFiles the suppressed files
* @return this operation instance
+ * @see #suppressedFiles(String...)
*/
public SourceSet suppressedFilesStrings(Collection suppressedFiles) {
- suppressedFiles_.addAll(suppressedFiles.stream().map(File::new).toList());
- return this;
+ return suppressedFiles(suppressedFiles.stream().map(File::new).toList());
}
}
diff --git a/src/test/java/rife/bld/extension/dokka/SourceSetTest.java b/src/test/java/rife/bld/extension/dokka/SourceSetTest.java
index 031a818..0927bd8 100644
--- a/src/test/java/rife/bld/extension/dokka/SourceSetTest.java
+++ b/src/test/java/rife/bld/extension/dokka/SourceSetTest.java
@@ -42,6 +42,7 @@ class SourceSetTest {
private static final String OPTION_2 = "option2";
private static final String PATH_1 = "path1";
private static final String PATH_2 = "path2";
+ private static final String PATH_3 = "path3";
private static final String SAMPLES_1 = "samples1";
private static final String SAMPLES_2 = "samples2";
private static final String SAMPLES_3 = "samples3";
@@ -221,6 +222,7 @@ class SourceSetTest {
.src(List.of(new File(SRC_4)))
.srcLink(PATH_1, "remote1", "#suffix1")
.srcLink(new File(PATH_2), "remote2", "#suffix2")
+ .srcLink(Path.of(PATH_3), "remote3", "#suffix3")
.suppressedFiles(SUP_1, SUP_2);
assertThat(sourceSet.classpath()).as("classpath").hasSize(2);
@@ -231,7 +233,7 @@ class SourceSetTest {
assertThat(sourceSet.perPackageOptions()).as("perPackageOptions").hasSize(2);
assertThat(sourceSet.samples()).as("samples").hasSize(2);
assertThat(sourceSet.src()).as("src").hasSize(4);
- assertThat(sourceSet.srcLinks()).as("srcLinks").hasSize(2);
+ assertThat(sourceSet.srcLinks()).as("srcLinks").hasSize(3);
assertThat(sourceSet.suppressedFiles()).as("suppressedFiles").hasSize(2);
var params = sourceSet.args();
@@ -266,7 +268,8 @@ class SourceSetTest {
"-samples", localPath(SAMPLES_1, SAMPLES_2),
"-skipDeprecated",
"-src", localPath(SRC_1, SRC_2, SRC_3, SRC_4),
- "-srcLink", localPath(PATH_2) + "=remote2#suffix2;path1=remote1#suffix1",
+ "-srcLink", localPath(PATH_2) + "=remote2#suffix2;" + localPath(PATH_3) + "=remote3#suffix3;" +
+ "path1=remote1#suffix1",
"-sourceSetName", "setName",
"-suppressedFiles", localPath(SUP_1, SUP_2));