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

17
cliargs.sh Executable file
View file

@ -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/,//'

View file

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

View file

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