Added script to list parameters

This commit is contained in:
Erik C. Thauvin 2024-05-27 16:11:40 -07:00
parent 1bdbe86519
commit 749f43b6b2
Signed by: erik
GPG key ID: 776702A6A2DA330E
3 changed files with 62 additions and 45 deletions

View file

@ -32,25 +32,27 @@ class DokkaOperationTest {
@SuppressWarnings({"ExtractMethodRecommender", "PMD.AvoidDuplicateLiterals"})
void executeConstructProcessCommandListTest() {
var params = List.of(
"-delayTemplateSubstitution",
"-failOnWarning",
"-globalLinks",
"-globalPackageOptions",
"-globalSrcLink",
"-includes",
"-loggingLevel",
"-moduleName",
"-moduleVersion",
"-outputDir",
"-sourceSet",
"-pluginsConfiguration",
"-pluginsClasspath",
"-offlineMode",
"-failOnWarning",
"-delayTemplateSubstitution",
"-noSuppressObviousFunctions",
"-includes",
"-suppressInheritedMembers",
"-globalPackageOptions",
"-globalLinks",
"-globalSrcLink",
"-loggingLevel");
"-offlineMode",
"-outputDir",
"-pluginsClasspath",
"-pluginsConfiguration",
"-sourceSet",
"-suppressInheritedMembers");
var examples = new File("examples");
var jsonConf = new File("config.json");
var args = new DokkaOperation()
.delayTemplateSubstitution(true)
.failOnWarning(true)
.fromProject(new BaseProjectBlueprint(examples, "com.example", "Example"))
.globalLinks("s", "link")
.globalLinks(Map.of("s2", "link2"))
@ -60,12 +62,7 @@ class DokkaOperationTest {
.globalSrcLink(List.of("link3", "link4"))
.includes("file1", "file2")
.includes(List.of("file3", "file4"))
.pluginConfigurations("name", "{\"json\"}")
.pluginConfigurations(Map.of("{\"name2\"}", "json2", "name3}", "{json3"))
.pluginsClasspath("path1", "path2")
.pluginsClasspath(List.of("path3", "path4"))
.delayTemplateSubstitution(true)
.failOnWarning(true)
.json(jsonConf)
.loggingLevel(LoggingLevel.DEBUG)
.moduleName("name")
.moduleVersion("1.0")
@ -73,13 +70,16 @@ class DokkaOperationTest {
.offlineMode(true)
.outputDir(new File(examples, "build"))
.outputFormat(OutputFormat.JAVADOC)
.suppressInheritedMembers(true)
.pluginConfigurations("name", "{\"json\"}")
.pluginConfigurations(Map.of("{\"name2\"}", "json2", "name3}", "{json3"))
.pluginsClasspath("path1", "path2")
.pluginsClasspath(List.of("path3", "path4"))
.sourceSet(new SourceSet().classpath(
List.of(
new File("examples/foo.jar"),
new File("examples/bar.jar")
)))
.json(jsonConf)
.suppressInheritedMembers(true)
.executeConstructProcessCommandList();
for (var p : params) {

View file

@ -54,52 +54,52 @@ class SourceSetTest {
@SuppressWarnings("PMD.AvoidDuplicateLiterals")
void sourceSetTest() {
var params = List.of(
"-sourceSetName",
"-displayName",
"-analysisPlatform",
"-apiVersion",
"-classpath",
"-src",
"-dependentSourceSets",
"-samples",
"-includes",
"-displayName",
"-documentedVisibilities",
"-reportUndocumented",
"-noSkipEmptyPackages",
"-skipDeprecated",
"-externalDocumentationLinks",
"-includes",
"-jdkVersion",
"-languageVersion",
"-apiVersion",
"-noStdlibLink",
"-noJdkLink",
"-suppressedFiles",
"-analysisPlatform",
"-noSkipEmptyPackages",
"-noStdlibLink",
"-perPackageOptions",
"-externalDocumentationLinks",
"-srcLink"
"-reportUndocumented",
"-samples",
"-skipDeprecated",
"-sourceSetName",
"-src",
"-srcLink",
"-suppressedFiles"
);
var sourceSet = new SourceSet()
.analysisPlatform(AnalysisPlatform.JVM)
.apiVersion("1.0")
.classpath("classpath1", "classpath2")
.dependentSourceSets("moduleName", "sourceSetName")
.displayName("name")
.documentedVisibilities(DocumentedVisibility.PACKAGE, DocumentedVisibility.PRIVATE)
.externalDocumentationLinks("url1", "packageListUrl1")
.externalDocumentationLinks("url2", "packageListUrl2")
.includes("includes1", "includes2")
.perPackageOptions("options1", "options2")
.samples("samples1", "sample2")
.srcLink("path1", "remote1", "#suffix1")
.srcLink("path2", "remote2", "#suffix2")
.src("src1", "src2")
.suppressedFiles("sup1", "sup2")
.analysisPlatform(AnalysisPlatform.JVM)
.apiVersion("1.0")
.displayName("name")
.jdkVersion(18)
.languageVersion("2.0")
.noJdkLink(true)
.noSkipEmptyPackages(true)
.noStdlibLink(true)
.perPackageOptions("options1", "options2")
.reportUndocumented(true)
.samples("samples1", "sample2")
.skipDeprecated(true)
.sourceSetName("setName");
.sourceSetName("setName")
.src("src1", "src2")
.srcLink("path1", "remote1", "#suffix1")
.srcLink("path2", "remote2", "#suffix2")
.suppressedFiles("sup1", "sup2");
var args = sourceSet.args();