Minor Javadoc cleanup

This commit is contained in:
Erik C. Thauvin 2023-11-15 18:04:13 -08:00
parent f5caba550d
commit 200479e1c1
5 changed files with 60 additions and 34 deletions

View file

@ -50,7 +50,7 @@ public class CompileKotlinOperation extends AbstractOperation<CompileKotlinOpera
private BaseProject project_; private BaseProject project_;
/** /**
* Returns the list JARs contained in a given directory. * Returns the list of JARs contained in a given directory.
* *
* @param directory the directory * @param directory the directory
* @param regex the regular expression to match * @param regex the regular expression to match
@ -74,6 +74,12 @@ public class CompileKotlinOperation extends AbstractOperation<CompileKotlinOpera
return jars; return jars;
} }
/**
* Returns the list of Kotlin source file {{@code .kt}} contained in a given directory.
*
* @param directory the directory
* @return the list of Kotlin files
*/
public static Collection<File> getKotlinFileList(File directory) { public static Collection<File> getKotlinFileList(File directory) {
if (directory == null) { if (directory == null) {
return Collections.emptyList(); return Collections.emptyList();
@ -167,7 +173,7 @@ public class CompileKotlinOperation extends AbstractOperation<CompileKotlinOpera
} }
/** /**
* Provides a list of compilation options to pass to the {@code kotlinc} compiler. * Provides a list of compilation options to pass to the Kotlin compiler.
* *
* @param options the compiler options * @param options the compiler options
* @return this operation instance * @return this operation instance
@ -241,7 +247,7 @@ public class CompileKotlinOperation extends AbstractOperation<CompileKotlinOpera
} }
/** /**
* Part of the {@link #execute} operation, build sources to a destination. * Part of the {@link #execute} operation, build sources to a given destination.
* *
* @param classpath the classpath list used for the compilation * @param classpath the classpath list used for the compilation
* @param sources the source files to compile * @param sources the source files to compile
@ -446,7 +452,7 @@ public class CompileKotlinOperation extends AbstractOperation<CompileKotlinOpera
*/ */
public CompileKotlinOperation plugins(File directory, CompileKotlinPlugin... plugins) { public CompileKotlinOperation plugins(File directory, CompileKotlinPlugin... plugins) {
for (var plugin : plugins) { for (var plugin : plugins) {
plugins_.addAll(CompileKotlinOperation.getJarList(directory, plugin.label)); plugins_.addAll(getJarList(directory, plugin.label));
} }
return this; return this;
} }

View file

@ -16,10 +16,10 @@
package rife.bld.extension; package rife.bld.extension;
import java.io.File;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import java.util.List; import java.util.List;
import java.io.File;
/** /**
* Configuration for the Kotlin compiler options. * Configuration for the Kotlin compiler options.
@ -68,14 +68,14 @@ public class CompileKotlinOptions {
* <p> * <p>
* Such a file can contain compiler options with values and paths to the source files. * Such a file can contain compiler options with values and paths to the source files.
* Options and paths should be separated by whitespaces. For example: * Options and paths should be separated by whitespaces. For example:
* <p> * <ul>
* {@code -include-runtime -d hello.jar hello.kt} * <li>{@code -include-runtime -d hello.jar hello.kt}</li>
* <p> * </ul>
* To pass values that contain whitespaces, surround them with single ({@code '}) or double ({@code "}) quotes. * To pass values that contain whitespaces, surround them with single ({@code '}) or double ({@code "}) quotes.
* If a value contains quotation marks in it, escape them with a backslash (\). * If a value contains quotation marks in it, escape them with a backslash (\).
* <p> * <ul>
* {@code -include-runtime -d 'My folder'} * <li>{@code -include-runtime -d 'My folder'}</li>
* <p> * </ul>
* If the files reside in locations different from the current directory, use relative paths. * If the files reside in locations different from the current directory, use relative paths.
* *
* @param files one or more files * @param files one or more files
@ -298,8 +298,7 @@ public class CompileKotlinOptions {
} }
/** /**
* Use a custom JDK home directory to include into the classpath if it differs from the default JAVA_HOME.Use a * Use a custom JDK home directory to include into the classpath if it differs from the default {@code JAVA_HOME}.
* custom JDK home directory to include into the classpath if it differs from the default {@code JAVA_HOME}.
* *
* @param jdkHome the JDK home path * @param jdkHome the JDK home path
* @return this class instance * @return this class instance
@ -310,9 +309,12 @@ public class CompileKotlinOptions {
} }
/** /**
* Specify the target version of the generated JVM bytecode. Limit the API of the JDK in the classpath to the * Specify the target version of the generated JVM bytecode.
* specified Java version. Automatically sets {@link #jvmTarget(String) JVM target} version. Possible values are * <p>
* 1.8, 9, 10, ..., 21. The default value is 1.8. * Limit the API of the JDK in the classpath to the specified Java version. Automatically sets
* {@link #jvmTarget(String) JVM target} version.
* <p>
* Possible values are 1.8, 9, 10, ..., 21. The default value is 1.8.
* *
* @param version the target version * @param version the target version
* @return this class instance * @return this class instance
@ -336,6 +338,7 @@ public class CompileKotlinOptions {
/** /**
* Specify the target version of the generated JVM bytecode. * Specify the target version of the generated JVM bytecode.
* <p>
* Possible values are 1.8, 9, 10, ..., 21. The default value is 1.8. * Possible values are 1.8, 9, 10, ..., 21. The default value is 1.8.
* *
* @param target the target version * @param target the target version
@ -359,7 +362,7 @@ public class CompileKotlinOptions {
} }
/** /**
* Enable verbose logging output which includes details of the compilation process. * Specify a custom path to the Kotlin compiler used for the discovery of runtime libraries.
* *
* @param path the Kotlin home path * @param path the Kotlin home path
* @return this class instance * @return this class instance
@ -481,8 +484,9 @@ public class CompileKotlinOptions {
} }
/** /**
* Place the generated class files into the specified location. The location can be a directory, a ZIP, or a JAR * Place the generated class files into the specified location.
* file. * <p>
* The location can be a directory, a ZIP, or a JAR file.
* *
* @param path the location path * @param path the location path
* @return this class instance * @return this class instance
@ -493,8 +497,9 @@ public class CompileKotlinOptions {
} }
/** /**
* Place the generated class files into the specified location. The location can be a directory, a ZIP, or a JAR * Place the generated class files into the specified location.
* file. * <p>
* The location can be a directory, a ZIP, or a JAR file.
* *
* @param path the location path * @param path the location path
* @return this class instance * @return this class instance
@ -528,7 +533,9 @@ public class CompileKotlinOptions {
} }
/** /**
* Script definition template classes. Use fully qualified class names. * Script definition template classes.
* <p>
* Use fully qualified class names.
* *
* @param classNames one or more class names * @param classNames one or more class names
* @return this class instance * @return this class instance
@ -539,7 +546,9 @@ public class CompileKotlinOptions {
} }
/** /**
* Script definition template classes. Use fully qualified class names. * Script definition template classes.
* <p>
* Use fully qualified class names.
* *
* @param classNames the list class names * @param classNames the list class names
* @return this class instance * @return this class instance

View file

@ -16,6 +16,12 @@
package rife.bld.extension; package rife.bld.extension;
/**
* Defines the known Kotlin compiler plugins match (regex) strings.
*
* @author <a href="https://erik.thauvin.net/">Erik C. Thauvin</a>
* @since 1.0
*/
public enum CompileKotlinPlugin { public enum CompileKotlinPlugin {
ALL_OPEN("^allopen-compiler-plugin-.*$"), ALL_OPEN("^allopen-compiler-plugin-.*$"),
ASSIGNMENT("^assignment-compiler-plugin-.*$"), ASSIGNMENT("^assignment-compiler-plugin-.*$"),

View file

@ -28,7 +28,7 @@ import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
/** /**
* Builds Javadocs using Dokka. * Builds documentation (javadoc, HTML, etc.) using Dokka.
* *
* @author <a href="https://erik.thauvin.net/">Erik C. Thauvin</a> * @author <a href="https://erik.thauvin.net/">Erik C. Thauvin</a>
* @since 1.0 * @since 1.0
@ -63,7 +63,9 @@ public class DokkaOperation extends AbstractProcessOperation<DokkaOperation> {
private boolean suppressInheritedMembers_; private boolean suppressInheritedMembers_;
/** /**
* Sets the delay substitution of some elements. Used in incremental builds of multimodule projects. * Sets the delay substitution of some elements.
* <p>
* Used in incremental builds of multimodule projects.
* *
* @param delayTemplateSubstitution the delay * @param delayTemplateSubstitution the delay
* @return this operation instance * @return this operation instance
@ -74,8 +76,7 @@ public class DokkaOperation extends AbstractProcessOperation<DokkaOperation> {
} }
/** /**
* Part of the {@link #execute} operation, constructs the command list * Part of the {@link #execute} operation, constructs the command list to use for building the process.
* to use for building the process.
* *
* @since 1.5 * @since 1.5
*/ */
@ -247,7 +248,7 @@ public class DokkaOperation extends AbstractProcessOperation<DokkaOperation> {
} }
/** /**
* Set the global external documentation links * Set the global external documentation links.
* *
* @param url the external documentation URL * @param url the external documentation URL
* @param packageListUrl the external documentation package list URL * @param packageListUrl the external documentation package list URL
@ -259,7 +260,7 @@ public class DokkaOperation extends AbstractProcessOperation<DokkaOperation> {
} }
/** /**
* Set the global external documentation links * Set the global external documentation links.
* *
* @param globalLinks the map of global links * @param globalLinks the map of global links
* @return this operation instance * @return this operation instance
@ -278,6 +279,7 @@ public class DokkaOperation extends AbstractProcessOperation<DokkaOperation> {
* <li>-privateApi</li> * <li>-privateApi</li>
* <li>+warnUndocumented</li> * <li>+warnUndocumented</li>
* <li>+suppress</li> * <li>+suppress</li>
* <li>+visibility:PUBLIC</li>
* <li>...</li> * <li>...</li>
* </ul> * </ul>
* *
@ -297,6 +299,7 @@ public class DokkaOperation extends AbstractProcessOperation<DokkaOperation> {
* <li>-privateApi</li> * <li>-privateApi</li>
* <li>+warnUndocumented</li> * <li>+warnUndocumented</li>
* <li>+suppress</li> * <li>+suppress</li>
* <li>+visibility:PUBLIC</li>
* <li>...</li> * <li>...</li>
* </ul> * </ul>
* *
@ -409,7 +412,7 @@ public class DokkaOperation extends AbstractProcessOperation<DokkaOperation> {
} }
/** /**
* Sets the output directory path, {@code ./dokka} by default * Sets the output directory path, {@code ./dokka} by default.
* *
* @param outputDir the output directory * @param outputDir the output directory
* @return this operation instance * @return this operation instance
@ -420,7 +423,7 @@ public class DokkaOperation extends AbstractProcessOperation<DokkaOperation> {
} }
/** /**
* Sets the output directory path, {@code ./dokka} by default * Sets the output directory path, {@code ./dokka} by default.
* *
* @param outputDir the output directory * @param outputDir the output directory
* @return this operation instance * @return this operation instance

View file

@ -388,11 +388,12 @@ public class SourceSet {
/** /**
* Set the list of package source set configuration in format: * Set the list of package source set configuration in format:
* <ul> * <ul>
* <li><matchingRegexp</li> * <li>matchingRegexp</li>
* <li>-deprecated</li> * <li>-deprecated</li>
* <li>-privateApi</li> * <li>-privateApi</li>
* <li>+warnUndocumented</li> * <li>+warnUndocumented</li>
* <li>+suppress</li> * <li>+suppress</li>
* <li>+visibility:PUBLIC</li>
* <li>...</li> * <li>...</li>
* </ul> * </ul>
* *
@ -407,11 +408,12 @@ public class SourceSet {
/** /**
* Set the list of package source set configuration in format: * Set the list of package source set configuration in format:
* <ul> * <ul>
* <li><matchingRegexp</li> * <li>matchingRegexp</li>
* <li>-deprecated</li> * <li>-deprecated</li>
* <li>-privateApi</li> * <li>-privateApi</li>
* <li>+warnUndocumented</li> * <li>+warnUndocumented</li>
* <li>+suppress</li> * <li>+suppress</li>
* <li>+visibility:PUBLIC</li>
* <li>...</li> * <li>...</li>
* </ul> * </ul>
* *
@ -468,7 +470,7 @@ public class SourceSet {
} }
/** /**
* Sets the name of the source set. Default is {@code main}. * Sets the name of the source set. Default is {@code main}.
* *
* @param sourceSetName the source set name. * @param sourceSetName the source set name.
* @return this operation instance * @return this operation instance