diff --git a/cliargs.sh b/cliargs.sh new file mode 100755 index 0000000..26016e6 --- /dev/null +++ b/cliargs.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +java -cp "lib/compile/*" -jar lib/compile/dokka-cli-*.jar -h |\ +grep " -" |\ +sed -e "s/ -/\"-/" -e "s/ \[.*//" -e "s/ -.*//" -e "s/\$/\",/" -e '/help/d' |\ +sort |\ +sed -e '$s/,//' + +echo +echo ---------------------------------------- +echo + +java -cp "lib/compile/*" -jar lib/compile/dokka-cli-*.jar -sourceSet -h |\ +grep " -" |\ +sed -e "s/ -/\"-/" -e "s/ \[.*//" -e "s/ -.*//" -e "s/\$/\",/" -e '/help/d' -e '/includeNonPublic/d' |\ +sort |\ +sed -e '$s/,//' diff --git a/src/test/java/rife/bld/extension/dokka/DokkaOperationTest.java b/src/test/java/rife/bld/extension/dokka/DokkaOperationTest.java index f115a27..f0be118 100644 --- a/src/test/java/rife/bld/extension/dokka/DokkaOperationTest.java +++ b/src/test/java/rife/bld/extension/dokka/DokkaOperationTest.java @@ -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", + "-noSuppressObviousFunctions", + "-offlineMode", "-outputDir", - "-sourceSet", - "-pluginsConfiguration", "-pluginsClasspath", - "-offlineMode", - "-failOnWarning", - "-delayTemplateSubstitution", - "-noSuppressObviousFunctions", - "-includes", - "-suppressInheritedMembers", - "-globalPackageOptions", - "-globalLinks", - "-globalSrcLink", - "-loggingLevel"); + "-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 @@ void executeConstructProcessCommandListTest() { .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 @@ void executeConstructProcessCommandListTest() { .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) { diff --git a/src/test/java/rife/bld/extension/dokka/SourceSetTest.java b/src/test/java/rife/bld/extension/dokka/SourceSetTest.java index ac1c20b..3b5226e 100644 --- a/src/test/java/rife/bld/extension/dokka/SourceSetTest.java +++ b/src/test/java/rife/bld/extension/dokka/SourceSetTest.java @@ -54,52 +54,52 @@ void sourceSetCollectionsTest() { @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();