();
-
- // sources
- if (!sources_.isEmpty()) {
- sources_.forEach(s -> args.add(PLUGIN_ID + "sources=" + s));
- }
-
- // classes
- if (!classes_.isEmpty()) {
- classes_.forEach(c -> args.add(PLUGIN_ID + "classes=" + c));
- }
-
- // stubs
- args.add(PLUGIN_ID + "stubs=" + stubs_.getAbsolutePath());
-
- // apMode
- args.add(PLUGIN_ID + "aptMode=" + aptMode_.name().toLowerCase());
-
- // apclasspath
- if (!apClasspath_.isEmpty()) {
- apClasspath_.forEach(c -> args.add(PLUGIN_ID + "apclasspath=" + c));
- }
-
- // apoptions
- if (!apOptions_.isEmpty()) {
- apOptions_.forEach(o -> {
- try {
- args.add(PLUGIN_ID + "apoptions=" + encodeList(o));
- } catch (IOException e) {
- if (LOGGER.isLoggable(Level.WARNING)) {
- LOGGER.log(Level.WARNING, "Could not encode application processor option: " + o, e);
- }
- }
- });
- }
-
- // correctErrorTypes
- if (correctErrorTypes_) {
- args.add(PLUGIN_ID + "correctErrorTypes=true");
- }
-
- // dumpFileReadHistory
- if (dumpFileReadHistory_ != null) {
- args.add(PLUGIN_ID + "dumpFileReadHistory=" + dumpFileReadHistory_.getAbsolutePath());
- }
-
- // incrementalData
- if (incrementalData_ != null) {
- args.add(PLUGIN_ID + "incrementalData=" + incrementalData_.getAbsolutePath());
- }
-
- // javacArguments
- if (!javacArguments_.isEmpty()) {
- javacArguments_.forEach(a -> {
- try {
- args.add(PLUGIN_ID + "javacArguments=" + encodeList(a));
- } catch (IOException e) {
- if (LOGGER.isLoggable(Level.WARNING)) {
- LOGGER.log(Level.WARNING, "Could not encode javac argument: " + a, e);
- }
- }
- });
- }
-
- // processors
- if (!processors_.isEmpty()) {
- args.add(PLUGIN_ID + "processors=" + String.join(",", processors_));
- }
-
- // verbose
- if (verbose_) {
- args.add(PLUGIN_ID + "verbose=true");
- }
-
- return args;
- }
-
- /**
- * To enable error type inferring in stubs.
- *
- * Some annotation processors (such as {@code AutoFactory}) rely on precise types in declaration signatures. By
- * default, {@code kapt} replaces every unknown type (including types for the generated classes) to
- * {@code NonExistentClass}, but you use this option to change this behavior.
- *
- * @param correctErrorTypes {@code true} or {@code false}
- * @return this class instance
- */
- public KaptOptions correctErrorTypes(boolean correctErrorTypes) {
- correctErrorTypes_ = correctErrorTypes;
- return this;
- }
-
- /**
- * An output path to dump for each file a list of classes used during annotation processing.
- *
- * @param dupFileReadHistory the output path
- * @return this class instance
- */
- public KaptOptions dupFileReadHistory(File dupFileReadHistory) {
- dumpFileReadHistory_ = dupFileReadHistory;
- return this;
- }
-
- /**
- * An output path to dump for each file a list of classes used during annotation processing.
- *
- * @param dupFileReadHistory the output path
- * @return this class instance
- */
- public KaptOptions dupFileReadHistory(String dupFileReadHistory) {
- dumpFileReadHistory_ = new File(dupFileReadHistory);
- return this;
- }
-
- // Base-64 encodes the options list
- private String encodeList(Map options) throws IOException {
- var os = new ByteArrayOutputStream();
- var oos = new ObjectOutputStream(os);
-
- oos.writeInt(options.size());
- for (var entry : options.entrySet()) {
- oos.writeUTF(entry.getKey());
- oos.writeUTF(entry.getValue());
- }
-
- oos.flush();
- return Base64.getEncoder().encodeToString(os.toByteArray());
- }
-
- /**
- * An output path for the binary stubs.
- *
- * @param incrementalData the output path
- * @return this class instance
- */
- public KaptOptions incrementalData(File incrementalData) {
- incrementalData_ = incrementalData;
- return this;
- }
-
- /**
- * An output path for the binary stubs.
- *
- * @param incrementalData the output path
- * @return this class instance
- */
- public KaptOptions incrementalData(String incrementalData) {
- incrementalData_ = new File(incrementalData);
- return this;
- }
-
- /**
- * A list of the options passed to {@code javac}.
- *
- * @param javacArguments the {@code javac} arguments
- * @return this class instance
- */
- public KaptOptions javacArguments(Map javacArguments) {
- javacArguments_.add(javacArguments);
- return this;
- }
-
- /**
- * A list of annotation processor qualified class names. If specified, {@code kapt} does not try to find annotation
- * processors in {@link #apClasspath}.
- *
- * @param processors the list of qualified class names
- * @return this class instance
- */
- public KaptOptions processors(Collection processors) {
- processors_.addAll(processors);
- return this;
- }
-
- /**
- * A list of annotation processor qualified class names. If specified, {@code kapt} does not try to find annotation
- * processors in {@link #apClasspath}.
- *
- * @param processors one or moe qualified class names
- * @return this class instance
- */
- public KaptOptions processors(String... processors) {
- processors_.addAll(List.of(processors));
- return this;
- }
-
- /**
- * Enables verbose output.
- *
- * @param verbose {@code true} or {@code false}
- * @return this class instance
- */
- public KaptOptions verbose(boolean verbose) {
- verbose_ = verbose;
- return this;
- }
-}
diff --git a/src/main/java/rife/bld/extension/dokka/DokkaOperation.java b/src/main/java/rife/bld/extension/dokka/DokkaOperation.java
index 2a97e03..d731381 100644
--- a/src/main/java/rife/bld/extension/dokka/DokkaOperation.java
+++ b/src/main/java/rife/bld/extension/dokka/DokkaOperation.java
@@ -219,7 +219,7 @@ public class DokkaOperation extends AbstractProcessOperation {
/**
* Configures the operation from a {@link BaseProject}.
*
- * Sets the {@link #sourceSet} and {@link #moduleName} from the project.
+ * Sets the {@link #sourceSet sourceSet} and {@link #moduleName moduleName} from the project.
*
* @param project the project to configure the operation from
*/