- * The contents of specified files are parsed and embedded into documentation as module and package descriptions. - *
- * This can be configured on per-package basis.
- *
- * @param files one or more files
- * @return this operation instance
- */
- public DokkaOperation includes(Path... files) {
- return includesPaths(List.of(files));
- }
-
-
/**
* Retrieves the markdown files that contain the module and package documentation.
*
@@ -506,36 +489,6 @@ public class DokkaOperation extends AbstractProcessOperation
- * The contents of specified files are parsed and embedded into documentation as module and package descriptions.
- *
- * This can be configured on per-package basis.
- *
- * @param files the markdown files
- * @return this operation instance
- */
- public DokkaOperation includesPaths(Collection
- * The contents of specified files are parsed and embedded into documentation as module and package descriptions.
- *
- * This can be configured on per-package basis.
- *
- * @param files the markdown files
- * @return this operation instance
- */
- public DokkaOperation includesStrings(Collection
@@ -681,19 +598,8 @@ public class DokkaOperation extends AbstractProcessOperation
- * The directory to where documentation is generated, regardless of output format.
- *
- * @param outputDir the output directory
- * @return this operation instance
- */
- public DokkaOperation outputDir(Path outputDir) {
- return outputDir(outputDir.toFile());
+ outputDir_ = new File(outputDir);
+ return this;
}
/**
@@ -735,12 +641,12 @@ public class DokkaOperation extends AbstractProcessOperation
diff --git a/src/main/java/rife/bld/extension/dokka/SourceSet.java b/src/main/java/rife/bld/extension/dokka/SourceSet.java
index 78a7074..2b5f24a 100644
--- a/src/main/java/rife/bld/extension/dokka/SourceSet.java
+++ b/src/main/java/rife/bld/extension/dokka/SourceSet.java
@@ -19,11 +19,7 @@ package rife.bld.extension.dokka;
import rife.bld.extension.DokkaOperation;
import java.io.File;
-import java.nio.file.Path;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import java.util.stream.Collectors;
@@ -242,7 +238,8 @@ public class SourceSet {
* @return this operation instance
*/
public SourceSet classpath(File... files) {
- return classpath(List.of(files));
+ classpath_.addAll(List.of(files));
+ return this;
}
/**
@@ -256,21 +253,8 @@ public class SourceSet {
* @return this operation instance
*/
public SourceSet classpath(String... files) {
- return classpathStrings(List.of(files));
- }
-
- /**
- * Sets classpath for analysis and interactive samples.
- *
- * This is useful if some types that come from dependencies are not resolved/picked up automatically.
- *
- * This option accepts both {@code .jar} and {@code .klib} files.
- *
- * @param files one or more file
- * @return this operation instance
- */
- public SourceSet classpath(Path... files) {
- return classpathPaths(List.of(files));
+ classpath_.addAll(Arrays.stream(files).map(File::new).toList());
+ return this;
}
/**
@@ -297,36 +281,6 @@ public class SourceSet {
return classpath_;
}
- /**
- * Sets classpath for analysis and interactive samples.
- *
- * This is useful if some types that come from dependencies are not resolved/picked up automatically.
- *
- * This option accepts both {@code .jar} and {@code .klib} files.
- *
- * @param files the collection of files
- * @return this operation instance
- */
- public SourceSet classpathPaths(Collection
- * This is useful if some types that come from dependencies are not resolved/picked up automatically.
- *
- * This option accepts both {@code .jar} and {@code .klib} files.
- *
- * @param files the collection of files
- * @return this operation instance
- */
- public SourceSet classpathStrings(Collection
- * The Markdown files that contain module and package documentation.
- *
- * The contents of the specified files are parsed and embedded into documentation as module and package
- * descriptions.
- *
- * @param files one or more files
- * @return this operation instance
- */
- public SourceSet includes(Path... files) {
- return includesPaths(List.of(files));
- }
-
-
/**
* Retrieves the Markdown files that contain module and package documentation.
*
@@ -510,38 +449,6 @@ public class SourceSet {
return this;
}
- /**
- * Sets the Markdown files that contain module and package documentation.
- *
- * The Markdown files that contain module and package documentation.
- *
- * The contents of the specified files are parsed and embedded into documentation as module and package
- * descriptions.
- *
- * @param files the collection of files
- * @return this operation instance
- */
- public SourceSet includesPaths(Collection
- * The Markdown files that contain module and package documentation.
- *
- * The contents of the specified files are parsed and embedded into documentation as module and package
- * descriptions.
- *
- * @param files the collection of files
- * @return this operation instance
- */
- public SourceSet includesStrings(Collection
@@ -558,15 +465,6 @@ public class SourceSet {
return this;
}
- /**
- * Retrieves the version of the JDK to use for linking to JDK Javadocs.
- *
- * @return the JDK version.
- */
- public String jdkVersion() {
- return jdkVersion_;
- }
-
/**
* Sets the version of JDK to use for linking to JDK Javadocs.
*
@@ -759,7 +657,8 @@ public class SourceSet {
* @return this operation instance
*/
public SourceSet samples(File... samples) {
- return samples(List.of(samples));
+ samples_.addAll(List.of(samples));
+ return this;
}
/**
@@ -772,47 +671,7 @@ public class SourceSet {
* @return this operation instance
*/
public SourceSet samples(String... samples) {
- return samplesStrings(List.of(samples));
- }
-
- /**
- * Set the directories or files that contain sample functions.
- *
- * The directories or files that contain sample functions which are referenced via the {@code @sample} KDoc
- * tag.
- *
- * @param samples nne or more samples
- * @return this operation instance
- */
- public SourceSet samples(Path... samples) {
- return samplesPaths(List.of(samples));
- }
-
- /**
- * Set the directories or files that contain sample functions.
- *
- * The directories or files that contain sample functions which are referenced via the {@code @sample} KDoc
- * tag.
- *
- * @param samples the samples
- * @return this operation instance
- */
- public SourceSet samplesPaths(Collection
- * The directories or files that contain sample functions which are referenced via the {@code @sample} KDoc
- * tag.
- *
- * @param samples the samples
- * @return this operation instance
- */
- public SourceSet samplesStrings(Collection
- * The source code roots to be analyzed and documented. Acceptable inputs are directories and individual
- * {@code .kt} / {@code .java} files.
- *
- * @param src pne ore moe source code roots
- * @return this operation instance
- */
- public SourceSet src(Path... src) {
- return srcPaths(List.of(src));
+ src_.addAll(Arrays.stream(src).map(File::new).toList());
+ return this;
}
/**
@@ -939,34 +787,6 @@ public class SourceSet {
return srcLinks_;
}
- /**
- * Sets the source code roots to be analyzed and documented.
- *
- * The source code roots to be analyzed and documented. Acceptable inputs are directories and individual
- * {@code .kt} / {@code .java} files.
- *
- * @param src the source code roots
- * @return this operation instance
- */
- public SourceSet srcPaths(Collection
- * The source code roots to be analyzed and documented. Acceptable inputs are directories and individual
- * {@code .kt} / {@code .java} files.
- *
- * @param src the source code roots
- * @return this operation instance
- */
- public SourceSet srcStrings(Collection
@@ -980,6 +800,7 @@ public class SourceSet {
return this;
}
+
/**
* Retrieves the paths to files to be suppressed.
*
@@ -998,7 +819,8 @@ public class SourceSet {
* @return this operation instance
*/
public SourceSet suppressedFiles(String... suppressedFiles) {
- return suppressedFilesStrings(List.of(suppressedFiles));
+ suppressedFiles_.addAll(Arrays.stream(suppressedFiles).map(File::new).toList());
+ return this;
}
/**
@@ -1010,44 +832,7 @@ public class SourceSet {
* @return this operation instance
*/
public SourceSet suppressedFiles(File... suppressedFiles) {
- return suppressedFiles(List.of(suppressedFiles));
- }
-
- /**
- * Sets the paths to files to be suppressed.
- *
- * The files to be suppressed when generating documentation.
- *
- * @param suppressedFiles one or moe suppressed files
- * @return this operation instance
- */
- public SourceSet suppressedFiles(Path... suppressedFiles) {
- return suppressedFilesPaths(List.of(suppressedFiles));
- }
-
- /**
- * Sets the paths to files to be suppressed.
- *
- * The files to be suppressed when generating documentation.
- *
- * @param suppressedFiles the suppressed files
- * @return this operation instance
- */
- public SourceSet suppressedFilesPaths(Collection
- * The files to be suppressed when generating documentation.
- *
- * @param suppressedFiles the suppressed files
- * @return this operation instance
- */
- public SourceSet suppressedFilesStrings(Collection