Compare commits

...

3 commits

Author SHA1 Message Date
0703d31e9d
Version 1.0.1
Some checks failed
bld-ci / build-bld-project (17, 1.19.24) (push) Has been cancelled
javadocs-pages / deploy (push) Has been cancelled
bld-ci / build-bld-project (17, 2.0.0) (push) Has been cancelled
bld-ci / build-bld-project (21, 1.19.24) (push) Has been cancelled
bld-ci / build-bld-project (21, 2.0.0) (push) Has been cancelled
bld-ci / build-bld-project (22, 1.19.24) (push) Has been cancelled
bld-ci / build-bld-project (22, 2.0.0) (push) Has been cancelled
2024-08-30 16:46:12 -07:00
80ea834ea2
More API cleanups 2024-08-30 16:40:13 -07:00
b8e4cc9d91
Bumped bld to version 2.1.0 2024-08-30 16:29:38 -07:00
20 changed files with 109 additions and 74 deletions

View file

@ -2,12 +2,12 @@
<library name="bld"> <library name="bld">
<CLASSES> <CLASSES>
<root url="file://$PROJECT_DIR$/lib/bld" /> <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!/" />
<root url="file://$PROJECT_DIR$/lib/bld" /> <root url="file://$PROJECT_DIR$/lib/bld" />
</CLASSES> </CLASSES>
<JAVADOC /> <JAVADOC />
<SOURCES> <SOURCES>
<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!/" />
<root url="file://$PROJECT_DIR$/lib/bld" /> <root url="file://$PROJECT_DIR$/lib/bld" />
</SOURCES> </SOURCES>
<excluded> <excluded>

View file

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

View file

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

View file

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

View file

@ -9,7 +9,7 @@
], ],
"java.configuration.updateBuildConfiguration": "automatic", "java.configuration.updateBuildConfiguration": "automatic",
"java.project.referencedLibraries": [ "java.project.referencedLibraries": [
"${HOME}/.bld/dist/bld-2.0.1.jar", "${HOME}/.bld/dist/bld-2.1.0.jar",
"lib/**/*.jar" "lib/**/*.jar"
] ]
} }

View file

@ -2,7 +2,7 @@
[![License](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![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) [![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-dokka/maven-metadata.xml?color=blue)](https://repo.rife2.com/#/releases/com/uwyn/rife2/bld-dokka) [![Release](https://flat.badgen.net/maven/v/metadata-url/repo.rife2.com/releases/com/uwyn/rife2/bld-dokka/maven-metadata.xml?color=blue)](https://repo.rife2.com/#/releases/com/uwyn/rife2/bld-dokka)
[![Snapshot](https://flat.badgen.net/maven/v/metadata-url/repo.rife2.com/snapshots/com/uwyn/rife2/bld-dokka/maven-metadata.xml?label=snapshot)](https://repo.rife2.com/#/snapshots/com/uwyn/rife2/bld-dokka) [![Snapshot](https://flat.badgen.net/maven/v/metadata-url/repo.rife2.com/snapshots/com/uwyn/rife2/bld-dokka/maven-metadata.xml?label=snapshot)](https://repo.rife2.com/#/snapshots/com/uwyn/rife2/bld-dokka)
[![GitHub CI](https://github.com/rife2/bld-dokka/actions/workflows/bld.yml/badge.svg)](https://github.com/rife2/bld-dokka/actions/workflows/bld.yml) [![GitHub CI](https://github.com/rife2/bld-dokka/actions/workflows/bld.yml/badge.svg)](https://github.com/rife2/bld-dokka/actions/workflows/bld.yml)

View file

@ -2,12 +2,12 @@
<library name="bld"> <library name="bld">
<CLASSES> <CLASSES>
<root url="file://$PROJECT_DIR$/lib/bld" /> <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> </CLASSES>
<JAVADOC /> <JAVADOC />
<SOURCES> <SOURCES>
<root url="file://$PROJECT_DIR$/lib/bld" /> <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> </SOURCES>
<excluded> <excluded>
<root url="jar://$PROJECT_DIR$/lib/bld/bld-wrapper.jar!/" /> <root url="jar://$PROJECT_DIR$/lib/bld/bld-wrapper.jar!/" />

View file

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

View file

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

View file

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

View file

@ -9,7 +9,7 @@
], ],
"java.configuration.updateBuildConfiguration": "automatic", "java.configuration.updateBuildConfiguration": "automatic",
"java.project.referencedLibraries": [ "java.project.referencedLibraries": [
"${HOME}/.bld/dist/bld-2.0.1.jar", "${HOME}/.bld/dist/bld-2.1.0.jar",
"lib/**/*.jar" "lib/**/*.jar"
] ]
} }

Binary file not shown.

View file

@ -1,8 +1,8 @@
bld.downloadExtensionJavadoc=false bld.downloadExtensionJavadoc=false
bld.downloadExtensionSources=true bld.downloadExtensionSources=true
bld.downloadLocation= bld.downloadLocation=
bld.extension-dokka=com.uwyn.rife2:bld-dokka:1.0.1-SNAPSHOT bld.extension-dokka=com.uwyn.rife2:bld-dokka:1.0.1
bld.extension-kotlin=com.uwyn.rife2:bld-kotlin:1.0.1-SNAPSHOT bld.extension-kotlin=com.uwyn.rife2:bld-kotlin:1.0.1
bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES
bld.sourceDirectories= 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.downloadExtensionJavadoc=false
bld.downloadExtensionSources=true bld.downloadExtensionSources=true
bld.downloadLocation= bld.downloadLocation=
bld.extension-exec=com.uwyn.rife2:bld-exec:1.0.2 bld.extension-exec=com.uwyn.rife2:bld-exec:1.0.3
bld.extension-pmd=com.uwyn.rife2:bld-pmd:1.1.4 bld.extension-pmd=com.uwyn.rife2:bld-pmd:1.1.5
bld.repositories=MAVEN_CENTRAL,MAVEN_LOCAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES bld.repositories=MAVEN_CENTRAL,MAVEN_LOCAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES
bld.sourceDirectories= bld.sourceDirectories=
bld.version=2.0.1 bld.version=2.1.0

View file

@ -33,7 +33,7 @@ public class DokkaOperationBuild extends Project {
public DokkaOperationBuild() { public DokkaOperationBuild() {
pkg = "rife.bld.extension"; pkg = "rife.bld.extension";
name = "bld-dokka"; name = "bld-dokka";
version = version(1, 0, 1, "SNAPSHOT"); version = version(1, 0, 1);
javaRelease = 17; javaRelease = 17;
@ -49,7 +49,7 @@ public class DokkaOperationBuild extends Project {
.include(dependency("org.jetbrains.dokka", "javadoc-plugin", dokka)) .include(dependency("org.jetbrains.dokka", "javadoc-plugin", dokka))
.include(dependency("org.jetbrains.dokka", "gfm-plugin", dokka)) .include(dependency("org.jetbrains.dokka", "gfm-plugin", dokka))
.include(dependency("org.jetbrains.dokka", "jekyll-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) scope(test)
.include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 11, 0))) .include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 11, 0)))
.include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 11, 0))) .include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 11, 0)))

View file

@ -373,8 +373,7 @@ public class DokkaOperation extends AbstractProcessOperation<DokkaOperation> {
* @return this operation instance * @return this operation instance
*/ */
public DokkaOperation globalPackageOptions(String... options) { public DokkaOperation globalPackageOptions(String... options) {
globalPackageOptions_.addAll(List.of(options)); return globalPackageOptions(List.of(options));
return this;
} }
/** /**
@ -415,8 +414,7 @@ public class DokkaOperation extends AbstractProcessOperation<DokkaOperation> {
* @return this operation instance * @return this operation instance
*/ */
public DokkaOperation globalSrcLink(String... links) { public DokkaOperation globalSrcLink(String... links) {
globalSrcLinks_.addAll(List.of(links)); return globalSrcLink(List.of(links));
return this;
} }
/** /**
@ -448,6 +446,7 @@ public class DokkaOperation extends AbstractProcessOperation<DokkaOperation> {
* *
* @param files one or more files * @param files one or more files
* @return this operation instance * @return this operation instance
* @see #includes(Collection)
*/ */
public DokkaOperation includes(File... files) { public DokkaOperation includes(File... files) {
return includes(List.of(files)); return includes(List.of(files));
@ -462,6 +461,7 @@ public class DokkaOperation extends AbstractProcessOperation<DokkaOperation> {
* *
* @param files one or more files * @param files one or more files
* @return this operation instance * @return this operation instance
* @see #includesStrings(Collection)
*/ */
public DokkaOperation includes(String... files) { public DokkaOperation includes(String... files) {
return includesStrings(List.of(files)); return includesStrings(List.of(files));
@ -476,6 +476,7 @@ public class DokkaOperation extends AbstractProcessOperation<DokkaOperation> {
* *
* @param files one or more files * @param files one or more files
* @return this operation instance * @return this operation instance
* @see #includesPaths(Collection)
*/ */
public DokkaOperation includes(Path... files) { public DokkaOperation includes(Path... files) {
return includesPaths(List.of(files)); return includesPaths(List.of(files));
@ -500,6 +501,7 @@ public class DokkaOperation extends AbstractProcessOperation<DokkaOperation> {
* *
* @param files the markdown files * @param files the markdown files
* @return this operation instance * @return this operation instance
* @see #includes(File...)
*/ */
public DokkaOperation includes(Collection<File> files) { public DokkaOperation includes(Collection<File> files) {
includes_.addAll(files); includes_.addAll(files);
@ -515,10 +517,10 @@ public class DokkaOperation extends AbstractProcessOperation<DokkaOperation> {
* *
* @param files the markdown files * @param files the markdown files
* @return this operation instance * @return this operation instance
* @see #includes(Path...)
*/ */
public DokkaOperation includesPaths(Collection<Path> files) { public DokkaOperation includesPaths(Collection<Path> files) {
includes_.addAll(files.stream().map(Path::toFile).toList()); return includes(files.stream().map(Path::toFile).toList());
return this;
} }
/** /**
@ -530,10 +532,10 @@ public class DokkaOperation extends AbstractProcessOperation<DokkaOperation> {
* *
* @param files the markdown files * @param files the markdown files
* @return this operation instance * @return this operation instance
* @see #includes(String...)
*/ */
public DokkaOperation includesStrings(Collection<String> files) { public DokkaOperation includesStrings(Collection<String> files) {
includes_.addAll(files.stream().map(File::new).toList()); return includes(files.stream().map(File::new).toList());
return this;
} }
/** /**
@ -758,6 +760,7 @@ public class DokkaOperation extends AbstractProcessOperation<DokkaOperation> {
* *
* @param jars one or more jars * @param jars one or more jars
* @return this operation instance * @return this operation instance
* @see #includes(Collection)
*/ */
public DokkaOperation pluginsClasspath(File... jars) { public DokkaOperation pluginsClasspath(File... jars) {
return pluginsClasspath(List.of(jars)); return pluginsClasspath(List.of(jars));
@ -768,6 +771,7 @@ public class DokkaOperation extends AbstractProcessOperation<DokkaOperation> {
* *
* @param jars one or more jars * @param jars one or more jars
* @return this operation instance * @return this operation instance
* @see #pluginsClasspathStrings(Collection)
*/ */
public DokkaOperation pluginsClasspath(String... jars) { public DokkaOperation pluginsClasspath(String... jars) {
return pluginsClasspathStrings(List.of(jars)); return pluginsClasspathStrings(List.of(jars));
@ -778,6 +782,7 @@ public class DokkaOperation extends AbstractProcessOperation<DokkaOperation> {
* *
* @param jars one or more jars * @param jars one or more jars
* @return this operation instance * @return this operation instance
* @see #pluginsClasspathPaths(Collection)
*/ */
public DokkaOperation pluginsClasspath(Path... jars) { public DokkaOperation pluginsClasspath(Path... jars) {
return pluginsClasspathPaths(List.of(jars)); return pluginsClasspathPaths(List.of(jars));
@ -797,6 +802,7 @@ public class DokkaOperation extends AbstractProcessOperation<DokkaOperation> {
* *
* @param jars the jars * @param jars the jars
* @return this operation instance * @return this operation instance
* @see #pluginsClasspath(Collection)
*/ */
public DokkaOperation pluginsClasspath(Collection<File> jars) { public DokkaOperation pluginsClasspath(Collection<File> jars) {
pluginsClasspath_.addAll(jars); pluginsClasspath_.addAll(jars);
@ -808,10 +814,10 @@ public class DokkaOperation extends AbstractProcessOperation<DokkaOperation> {
* *
* @param jars the jars * @param jars the jars
* @return this operation instance * @return this operation instance
* @see #pluginsClasspath(Path...)
*/ */
public DokkaOperation pluginsClasspathPaths(Collection<Path> jars) { public DokkaOperation pluginsClasspathPaths(Collection<Path> jars) {
pluginsClasspath_.addAll(jars.stream().map(Path::toFile).toList()); return pluginsClasspath(jars.stream().map(Path::toFile).toList());
return this;
} }
/** /**
@ -819,10 +825,10 @@ public class DokkaOperation extends AbstractProcessOperation<DokkaOperation> {
* *
* @param jars the jars * @param jars the jars
* @return this operation instance * @return this operation instance
* @see #pluginsClasspath(String...)
*/ */
public DokkaOperation pluginsClasspathStrings(Collection<String> jars) { public DokkaOperation pluginsClasspathStrings(Collection<String> jars) {
pluginsClasspath_.addAll(jars.stream().map(File::new).toList()); return pluginsClasspath(jars.stream().map(File::new).toList());
return this;
} }
/** /**

View file

@ -87,8 +87,7 @@ public class SourceSet {
* @return this operation instance * @return this operation instance
*/ */
public SourceSet apiVersion(int apiVersion) { public SourceSet apiVersion(int apiVersion) {
apiVersion_ = String.valueOf(apiVersion); return apiVersion(String.valueOf(apiVersion));
return this;
} }
/** /**
@ -240,6 +239,7 @@ public class SourceSet {
* *
* @param files one or more file * @param files one or more file
* @return this operation instance * @return this operation instance
* @see #classpath(Collection)
*/ */
public SourceSet classpath(File... files) { public SourceSet classpath(File... files) {
return classpath(List.of(files)); return classpath(List.of(files));
@ -254,6 +254,7 @@ public class SourceSet {
* *
* @param files one or more file * @param files one or more file
* @return this operation instance * @return this operation instance
* @see #classpathStrings(Collection)
*/ */
public SourceSet classpath(String... files) { public SourceSet classpath(String... files) {
return classpathStrings(List.of(files)); return classpathStrings(List.of(files));
@ -268,6 +269,7 @@ public class SourceSet {
* *
* @param files one or more file * @param files one or more file
* @return this operation instance * @return this operation instance
* @see #classpathPaths(Collection)
*/ */
public SourceSet classpath(Path... files) { public SourceSet classpath(Path... files) {
return classpathPaths(List.of(files)); return classpathPaths(List.of(files));
@ -282,6 +284,7 @@ public class SourceSet {
* *
* @param files the collection of files * @param files the collection of files
* @return this operation instance * @return this operation instance
* @see #classpath(File...)
*/ */
public SourceSet classpath(Collection<File> files) { public SourceSet classpath(Collection<File> files) {
classpath_.addAll(files); classpath_.addAll(files);
@ -306,10 +309,10 @@ public class SourceSet {
* *
* @param files the collection of files * @param files the collection of files
* @return this operation instance * @return this operation instance
* @see #classpath(Path...)
*/ */
public SourceSet classpathPaths(Collection<Path> files) { public SourceSet classpathPaths(Collection<Path> files) {
classpath_.addAll(files.stream().map(Path::toFile).toList()); return classpath(files.stream().map(Path::toFile).toList());
return this;
} }
/** /**
@ -321,10 +324,10 @@ public class SourceSet {
* *
* @param files the collection of files * @param files the collection of files
* @return this operation instance * @return this operation instance
* @see #classpath(String...)
*/ */
public SourceSet classpathStrings(Collection<String> files) { public SourceSet classpathStrings(Collection<String> files) {
classpath_.addAll(files.stream().map(File::new).toList()); return classpath(files.stream().map(File::new).toList());
return this;
} }
/** /**
@ -448,10 +451,10 @@ public class SourceSet {
* *
* @param files one or more files * @param files one or more files
* @return this operation instance * @return this operation instance
* @see #includes(Collection)
*/ */
public SourceSet includes(File... files) { public SourceSet includes(File... files) {
includes_.addAll(List.of(files)); return includes(List.of(files));
return this;
} }
/** /**
@ -464,6 +467,7 @@ public class SourceSet {
* *
* @param files one or more files * @param files one or more files
* @return this operation instance * @return this operation instance
* @see #classpathStrings(Collection)
*/ */
public SourceSet includes(String... files) { public SourceSet includes(String... files) {
return includesStrings(List.of(files)); return includesStrings(List.of(files));
@ -479,6 +483,7 @@ public class SourceSet {
* *
* @param files one or more files * @param files one or more files
* @return this operation instance * @return this operation instance
* @see #classpathPaths(Collection)
*/ */
public SourceSet includes(Path... files) { public SourceSet includes(Path... files) {
return includesPaths(List.of(files)); return includesPaths(List.of(files));
@ -504,6 +509,7 @@ public class SourceSet {
* *
* @param files the collection of files * @param files the collection of files
* @return this operation instance * @return this operation instance
* @see #includes(File...)
*/ */
public SourceSet includes(Collection<File> files) { public SourceSet includes(Collection<File> files) {
includes_.addAll(files); includes_.addAll(files);
@ -520,10 +526,10 @@ public class SourceSet {
* *
* @param files the collection of files * @param files the collection of files
* @return this operation instance * @return this operation instance
* @see #includes(Path...)
*/ */
public SourceSet includesPaths(Collection<Path> files) { public SourceSet includesPaths(Collection<Path> files) {
includes_.addAll(files.stream().map(Path::toFile).toList()); return includes(files.stream().map(Path::toFile).toList());
return this;
} }
/** /**
@ -536,10 +542,10 @@ public class SourceSet {
* *
* @param files the collection of files * @param files the collection of files
* @return this operation instance * @return this operation instance
* @see #classpath(String...)
*/ */
public SourceSet includesStrings(Collection<String> files) { public SourceSet includesStrings(Collection<String> files) {
includes_.addAll(files.stream().map(File::new).toList()); return includes(files.stream().map(File::new).toList());
return this;
} }
/** /**
@ -579,8 +585,7 @@ public class SourceSet {
* @return this operation instance * @return this operation instance
*/ */
public SourceSet jdkVersion(int jdkVersion) { public SourceSet jdkVersion(int jdkVersion) {
jdkVersion_ = String.valueOf(jdkVersion); return jdkVersion(String.valueOf(jdkVersion));
return this;
} }
/** /**
@ -601,8 +606,7 @@ public class SourceSet {
* @return this operation instance * @return this operation instance
*/ */
public SourceSet languageVersion(int languageVersion) { public SourceSet languageVersion(int languageVersion) {
languageVersion_ = String.valueOf(languageVersion); return languageVersion(String.valueOf(languageVersion));
return this;
} }
/** /**
@ -704,8 +708,7 @@ public class SourceSet {
* @return this operation instance * @return this operation instance
*/ */
public SourceSet perPackageOptions(String... perPackageOptions) { public SourceSet perPackageOptions(String... perPackageOptions) {
perPackageOptions_.addAll(List.of(perPackageOptions)); return perPackageOptions(List.of(perPackageOptions));
return this;
} }
/** /**
@ -734,6 +737,7 @@ public class SourceSet {
* *
* @param samples the samples * @param samples the samples
* @return this operation instance * @return this operation instance
* @see #samples(File...)
*/ */
public SourceSet samples(Collection<File> samples) { public SourceSet samples(Collection<File> samples) {
samples_.addAll(samples); samples_.addAll(samples);
@ -757,6 +761,7 @@ public class SourceSet {
* *
* @param samples nne or more samples * @param samples nne or more samples
* @return this operation instance * @return this operation instance
* @see #samples(Collection)
*/ */
public SourceSet samples(File... samples) { public SourceSet samples(File... samples) {
return samples(List.of(samples)); return samples(List.of(samples));
@ -770,6 +775,7 @@ public class SourceSet {
* *
* @param samples nne or more samples * @param samples nne or more samples
* @return this operation instance * @return this operation instance
* @see #samplesStrings(Collection)
*/ */
public SourceSet samples(String... samples) { public SourceSet samples(String... samples) {
return samplesStrings(List.of(samples)); return samplesStrings(List.of(samples));
@ -783,6 +789,7 @@ public class SourceSet {
* *
* @param samples nne or more samples * @param samples nne or more samples
* @return this operation instance * @return this operation instance
* @see #samplesPaths(Collection)
*/ */
public SourceSet samples(Path... samples) { public SourceSet samples(Path... samples) {
return samplesPaths(List.of(samples)); return samplesPaths(List.of(samples));
@ -796,10 +803,10 @@ public class SourceSet {
* *
* @param samples the samples * @param samples the samples
* @return this operation instance * @return this operation instance
* @see #samples(Path...)
*/ */
public SourceSet samplesPaths(Collection<Path> samples) { public SourceSet samplesPaths(Collection<Path> samples) {
samples_.addAll(samples.stream().map(Path::toFile).toList()); return samples(samples.stream().map(Path::toFile).toList());
return this;
} }
/** /**
@ -810,10 +817,10 @@ public class SourceSet {
* *
* @param samples the samples * @param samples the samples
* @return this operation instance * @return this operation instance
* @see #samples(String...)
*/ */
public SourceSet samplesStrings(Collection<String> samples) { public SourceSet samplesStrings(Collection<String> samples) {
samples_.addAll(samples.stream().map(File::new).toList()); return samples(samples.stream().map(File::new).toList());
return this;
} }
/** /**
@ -850,6 +857,7 @@ public class SourceSet {
* *
* @param src the source code roots * @param src the source code roots
* @return this operation instance * @return this operation instance
* @see #src(File...)
*/ */
public SourceSet src(Collection<File> src) { public SourceSet src(Collection<File> src) {
src_.addAll(src); src_.addAll(src);
@ -864,6 +872,7 @@ public class SourceSet {
* *
* @param src pne ore moe source code roots * @param src pne ore moe source code roots
* @return this operation instance * @return this operation instance
* @see #src(Collection)
*/ */
public SourceSet src(File... src) { public SourceSet src(File... src) {
return src(List.of(src)); return src(List.of(src));
@ -877,6 +886,7 @@ public class SourceSet {
* *
* @param src pne ore moe source code roots * @param src pne ore moe source code roots
* @return this operation instance * @return this operation instance
* @see #srcStrings(Collection)
*/ */
public SourceSet src(String... src) { public SourceSet src(String... src) {
return srcStrings(List.of(src)); return srcStrings(List.of(src));
@ -890,6 +900,7 @@ public class SourceSet {
* *
* @param src pne ore moe source code roots * @param src pne ore moe source code roots
* @return this operation instance * @return this operation instance
* @see #srcPaths(Collection)
*/ */
public SourceSet src(Path... src) { public SourceSet src(Path... src) {
return srcPaths(List.of(src)); return srcPaths(List.of(src));
@ -926,8 +937,19 @@ public class SourceSet {
* @return this operation instance * @return this operation instance
*/ */
public SourceSet srcLink(File srcPath, String remotePath, String lineSuffix) { public SourceSet srcLink(File srcPath, String remotePath, String lineSuffix) {
srcLinks_.put(srcPath.getAbsolutePath(), remotePath + lineSuffix); return srcLink(srcPath.getAbsolutePath(), remotePath, lineSuffix);
return this; }
/**
* 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 * @param src the source code roots
* @return this operation instance * @return this operation instance
* @see #src(Path...)
*/ */
public SourceSet srcPaths(Collection<Path> src) { public SourceSet srcPaths(Collection<Path> src) {
src_.addAll(src.stream().map(Path::toFile).toList()); return src(src.stream().map(Path::toFile).toList());
return this;
} }
/** /**
@ -961,10 +983,10 @@ public class SourceSet {
* *
* @param src the source code roots * @param src the source code roots
* @return this operation instance * @return this operation instance
* @see #src(String...)
*/ */
public SourceSet srcStrings(Collection<String> src) { public SourceSet srcStrings(Collection<String> src) {
src_.addAll(src.stream().map(File::new).toList()); return src(src.stream().map(File::new).toList());
return this;
} }
/** /**
@ -974,6 +996,7 @@ public class SourceSet {
* *
* @param suppressedFiles the suppressed files * @param suppressedFiles the suppressed files
* @return this operation instance * @return this operation instance
* @see #suppressedFiles(File...)
*/ */
public SourceSet suppressedFiles(Collection<File> suppressedFiles) { public SourceSet suppressedFiles(Collection<File> suppressedFiles) {
suppressedFiles_.addAll(suppressedFiles); suppressedFiles_.addAll(suppressedFiles);
@ -996,6 +1019,7 @@ public class SourceSet {
* *
* @param suppressedFiles one or moe suppressed files * @param suppressedFiles one or moe suppressed files
* @return this operation instance * @return this operation instance
* @see #suppressedFilesStrings(Collection)
*/ */
public SourceSet suppressedFiles(String... suppressedFiles) { public SourceSet suppressedFiles(String... suppressedFiles) {
return suppressedFilesStrings(List.of(suppressedFiles)); return suppressedFilesStrings(List.of(suppressedFiles));
@ -1008,6 +1032,7 @@ public class SourceSet {
* *
* @param suppressedFiles one or moe suppressed files * @param suppressedFiles one or moe suppressed files
* @return this operation instance * @return this operation instance
* @see #suppressedFiles(Collection)
*/ */
public SourceSet suppressedFiles(File... suppressedFiles) { public SourceSet suppressedFiles(File... suppressedFiles) {
return suppressedFiles(List.of(suppressedFiles)); return suppressedFiles(List.of(suppressedFiles));
@ -1020,6 +1045,7 @@ public class SourceSet {
* *
* @param suppressedFiles one or moe suppressed files * @param suppressedFiles one or moe suppressed files
* @return this operation instance * @return this operation instance
* @see #suppressedFilesPaths(Collection)
*/ */
public SourceSet suppressedFiles(Path... suppressedFiles) { public SourceSet suppressedFiles(Path... suppressedFiles) {
return suppressedFilesPaths(List.of(suppressedFiles)); return suppressedFilesPaths(List.of(suppressedFiles));
@ -1032,10 +1058,10 @@ public class SourceSet {
* *
* @param suppressedFiles the suppressed files * @param suppressedFiles the suppressed files
* @return this operation instance * @return this operation instance
* @see #suppressedFiles(Path...)
*/ */
public SourceSet suppressedFilesPaths(Collection<Path> suppressedFiles) { public SourceSet suppressedFilesPaths(Collection<Path> suppressedFiles) {
suppressedFiles_.addAll(suppressedFiles.stream().map(Path::toFile).toList()); return suppressedFiles(suppressedFiles.stream().map(Path::toFile).toList());
return this;
} }
/** /**
@ -1045,9 +1071,9 @@ public class SourceSet {
* *
* @param suppressedFiles the suppressed files * @param suppressedFiles the suppressed files
* @return this operation instance * @return this operation instance
* @see #suppressedFiles(String...)
*/ */
public SourceSet suppressedFilesStrings(Collection<String> suppressedFiles) { public SourceSet suppressedFilesStrings(Collection<String> suppressedFiles) {
suppressedFiles_.addAll(suppressedFiles.stream().map(File::new).toList()); return suppressedFiles(suppressedFiles.stream().map(File::new).toList());
return this;
} }
} }

View file

@ -245,7 +245,7 @@ class DokkaOperationTest {
@Test @Test
void pluginClasspathTest() { void pluginClasspathTest() {
var op = new DokkaOperation(); var op = new DokkaOperation();
op.pluginsClasspath(List.of(new File(FILE_1), new File(FILE_2))); op.pluginsClasspath(List.of(new File(FILE_1), new File(FILE_2)));
assertThat(op.pluginsClasspath()).as("List(File...)").containsExactly(new File(FILE_1), new File(FILE_2)); assertThat(op.pluginsClasspath()).as("List(File...)").containsExactly(new File(FILE_1), new File(FILE_2));
op.pluginsClasspath().clear(); op.pluginsClasspath().clear();

View file

@ -42,6 +42,7 @@ class SourceSetTest {
private static final String OPTION_2 = "option2"; private static final String OPTION_2 = "option2";
private static final String PATH_1 = "path1"; private static final String PATH_1 = "path1";
private static final String PATH_2 = "path2"; 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_1 = "samples1";
private static final String SAMPLES_2 = "samples2"; private static final String SAMPLES_2 = "samples2";
private static final String SAMPLES_3 = "samples3"; private static final String SAMPLES_3 = "samples3";
@ -221,6 +222,7 @@ class SourceSetTest {
.src(List.of(new File(SRC_4))) .src(List.of(new File(SRC_4)))
.srcLink(PATH_1, "remote1", "#suffix1") .srcLink(PATH_1, "remote1", "#suffix1")
.srcLink(new File(PATH_2), "remote2", "#suffix2") .srcLink(new File(PATH_2), "remote2", "#suffix2")
.srcLink(Path.of(PATH_3), "remote3", "#suffix3")
.suppressedFiles(SUP_1, SUP_2); .suppressedFiles(SUP_1, SUP_2);
assertThat(sourceSet.classpath()).as("classpath").hasSize(2); assertThat(sourceSet.classpath()).as("classpath").hasSize(2);
@ -231,7 +233,7 @@ class SourceSetTest {
assertThat(sourceSet.perPackageOptions()).as("perPackageOptions").hasSize(2); assertThat(sourceSet.perPackageOptions()).as("perPackageOptions").hasSize(2);
assertThat(sourceSet.samples()).as("samples").hasSize(2); assertThat(sourceSet.samples()).as("samples").hasSize(2);
assertThat(sourceSet.src()).as("src").hasSize(4); 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); assertThat(sourceSet.suppressedFiles()).as("suppressedFiles").hasSize(2);
var params = sourceSet.args(); var params = sourceSet.args();
@ -266,7 +268,8 @@ class SourceSetTest {
"-samples", localPath(SAMPLES_1, SAMPLES_2), "-samples", localPath(SAMPLES_1, SAMPLES_2),
"-skipDeprecated", "-skipDeprecated",
"-src", localPath(SRC_1, SRC_2, SRC_3, SRC_4), "-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", "-sourceSetName", "setName",
"-suppressedFiles", localPath(SUP_1, SUP_2)); "-suppressedFiles", localPath(SUP_1, SUP_2));