Compare commits
No commits in common. "10fd25ebf61f036e3de81e51e1cc0919e4930cdc" and "d2560125d748cc581f193eea0e2fbc480e918e2c" have entirely different histories.
10fd25ebf6
...
d2560125d7
5 changed files with 8 additions and 93 deletions
|
@ -3,15 +3,12 @@
|
||||||
TMPNEW=/tmp/checkcliargs-new
|
TMPNEW=/tmp/checkcliargs-new
|
||||||
TMPOLD=/tmp/checkcliargs-old
|
TMPOLD=/tmp/checkcliargs-old
|
||||||
|
|
||||||
java -cp "lib/compile/*" -jar lib/compile/dokka-cli-*.jar -h >$TMPNEW
|
cd lib/compile
|
||||||
java -cp "/examples/lib/bld*" -jar examples/lib/bld/dokka-cli-*.jar -h >$TMPOLD
|
java -cp "*" -jar dokka-cli-*.jar -h >$TMPNEW
|
||||||
|
|
||||||
|
cd ../../examples/lib/bld
|
||||||
|
java -cp "*" -jar dokka-cli-*.jar -h >$TMPOLD
|
||||||
|
|
||||||
diff $TMPOLD $TMPNEW
|
diff $TMPOLD $TMPNEW
|
||||||
|
|
||||||
java -cp "lib/compile/*" -jar lib/compile/dokka-cli-*.jar -sourceSet -h >$TMPNEW
|
|
||||||
java -cp "/examples/lib/bld*" -jar examples/lib/bld/dokka-cli-*.jar -sourceSet -h >$TMPOLD
|
|
||||||
|
|
||||||
diff $TMPOLD $TMPNEW
|
|
||||||
|
|
||||||
|
|
||||||
rm -rf $TMPNEW $TMPOLD
|
rm -rf $TMPNEW $TMPOLD
|
||||||
|
|
|
@ -56,7 +56,7 @@ public class CompileKotlinOperationBuild extends Project {
|
||||||
scope(test)
|
scope(test)
|
||||||
.include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 10, 2)))
|
.include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 10, 2)))
|
||||||
.include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 10, 2)))
|
.include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 10, 2)))
|
||||||
.include(dependency("org.assertj", "assertj-core", version(3, 26, 0)));
|
.include(dependency("org.assertj", "assertj-core", version(3, 25, 3)));
|
||||||
|
|
||||||
javadocOperation()
|
javadocOperation()
|
||||||
.javadocOptions()
|
.javadocOptions()
|
||||||
|
|
|
@ -54,7 +54,6 @@ public class DokkaOperation extends AbstractProcessOperation<DokkaOperation> {
|
||||||
private final Map<String, String> pluginsConfiguration_ = new ConcurrentHashMap<>();
|
private final Map<String, String> pluginsConfiguration_ = new ConcurrentHashMap<>();
|
||||||
private boolean delayTemplateSubstitution_;
|
private boolean delayTemplateSubstitution_;
|
||||||
private boolean failOnWarning_;
|
private boolean failOnWarning_;
|
||||||
private File json;
|
|
||||||
private LoggingLevel loggingLevel_;
|
private LoggingLevel loggingLevel_;
|
||||||
private String moduleName_;
|
private String moduleName_;
|
||||||
private String moduleVersion_;
|
private String moduleVersion_;
|
||||||
|
@ -217,11 +216,6 @@ public class DokkaOperation extends AbstractProcessOperation<DokkaOperation> {
|
||||||
args.add("-suppressInheritedMembers");
|
args.add("-suppressInheritedMembers");
|
||||||
}
|
}
|
||||||
|
|
||||||
// json
|
|
||||||
if (json != null) {
|
|
||||||
args.add(json.getAbsolutePath());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (LOGGER.isLoggable(Level.FINE)) {
|
if (LOGGER.isLoggable(Level.FINE)) {
|
||||||
LOGGER.fine(String.join(" ", args));
|
LOGGER.fine(String.join(" ", args));
|
||||||
}
|
}
|
||||||
|
@ -387,16 +381,6 @@ public class DokkaOperation extends AbstractProcessOperation<DokkaOperation> {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* JSON configuration file path.
|
|
||||||
*
|
|
||||||
* @param configuration the configuration file path
|
|
||||||
*/
|
|
||||||
public DokkaOperation json(File configuration) {
|
|
||||||
json = configuration;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the logging level.
|
* Sets the logging level.
|
||||||
*
|
*
|
||||||
|
|
|
@ -31,25 +31,7 @@ class DokkaOperationTest {
|
||||||
@Test
|
@Test
|
||||||
@SuppressWarnings({"ExtractMethodRecommender", "PMD.AvoidDuplicateLiterals"})
|
@SuppressWarnings({"ExtractMethodRecommender", "PMD.AvoidDuplicateLiterals"})
|
||||||
void executeConstructProcessCommandListTest() {
|
void executeConstructProcessCommandListTest() {
|
||||||
var params = List.of(
|
|
||||||
"-moduleName",
|
|
||||||
"-moduleVersion",
|
|
||||||
"-outputDir",
|
|
||||||
"-sourceSet",
|
|
||||||
"-pluginsConfiguration",
|
|
||||||
"-pluginsClasspath",
|
|
||||||
"-offlineMode",
|
|
||||||
"-failOnWarning",
|
|
||||||
"-delayTemplateSubstitution",
|
|
||||||
"-noSuppressObviousFunctions",
|
|
||||||
"-includes",
|
|
||||||
"-suppressInheritedMembers",
|
|
||||||
"-globalPackageOptions",
|
|
||||||
"-globalLinks",
|
|
||||||
"-globalSrcLink",
|
|
||||||
"-loggingLevel");
|
|
||||||
var examples = new File("examples");
|
var examples = new File("examples");
|
||||||
var jsonConf = new File("config.json");
|
|
||||||
var args = new DokkaOperation()
|
var args = new DokkaOperation()
|
||||||
.fromProject(new BaseProjectBlueprint(examples, "com.example", "Example"))
|
.fromProject(new BaseProjectBlueprint(examples, "com.example", "Example"))
|
||||||
.globalLinks("s", "link")
|
.globalLinks("s", "link")
|
||||||
|
@ -59,7 +41,6 @@ class DokkaOperationTest {
|
||||||
.globalSrcLink("link1", "link2")
|
.globalSrcLink("link1", "link2")
|
||||||
.globalSrcLink(List.of("link3", "link4"))
|
.globalSrcLink(List.of("link3", "link4"))
|
||||||
.includes("file1", "file2")
|
.includes("file1", "file2")
|
||||||
.includes(List.of("file3", "file4"))
|
|
||||||
.pluginConfigurations("name", "{\"json\"}")
|
.pluginConfigurations("name", "{\"json\"}")
|
||||||
.pluginConfigurations(Map.of("{\"name2\"}", "json2", "name3}", "{json3"))
|
.pluginConfigurations(Map.of("{\"name2\"}", "json2", "name3}", "{json3"))
|
||||||
.pluginsClasspath("path1", "path2")
|
.pluginsClasspath("path1", "path2")
|
||||||
|
@ -79,20 +60,8 @@ class DokkaOperationTest {
|
||||||
new File("examples/foo.jar"),
|
new File("examples/foo.jar"),
|
||||||
new File("examples/bar.jar")
|
new File("examples/bar.jar")
|
||||||
)))
|
)))
|
||||||
.json(jsonConf)
|
|
||||||
.executeConstructProcessCommandList();
|
.executeConstructProcessCommandList();
|
||||||
|
|
||||||
for (var p : params) {
|
|
||||||
var found = false;
|
|
||||||
for (var a : args) {
|
|
||||||
if (a.startsWith(p)) {
|
|
||||||
found = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
assertThat(found).as(p + " not found.").isTrue();
|
|
||||||
}
|
|
||||||
|
|
||||||
var path = examples.getAbsolutePath();
|
var path = examples.getAbsolutePath();
|
||||||
var dokkaJar = "1.9.20.jar";
|
var dokkaJar = "1.9.20.jar";
|
||||||
var matches = List.of("java",
|
var matches = List.of("java",
|
||||||
|
@ -109,15 +78,14 @@ class DokkaOperationTest {
|
||||||
"-globalLinks", "s^link^^s2^link2",
|
"-globalLinks", "s^link^^s2^link2",
|
||||||
"-globalPackageOptions", "option1;option2;option3;option4",
|
"-globalPackageOptions", "option1;option2;option3;option4",
|
||||||
"-globalSrcLinks_", "link1;link2;link3;link4",
|
"-globalSrcLinks_", "link1;link2;link3;link4",
|
||||||
"-includes", "file1;file2;file3;file4",
|
"-includes", "file1;file2",
|
||||||
"-loggingLevel", "debug",
|
"-loggingLevel", "debug",
|
||||||
"-moduleName", "name",
|
"-moduleName", "name",
|
||||||
"-moduleVersion", "1.0",
|
"-moduleVersion", "1.0",
|
||||||
"-noSuppressObviousFunctions",
|
"-noSuppressObviousFunctions",
|
||||||
"-offlineMode",
|
"-offlineMode",
|
||||||
"-pluginsConfiguration", "{\\\"name2\\\"}={json2}^^{name}={\\\"json\\\"}^^{name3}}={{json3}",
|
"-pluginsConfiguration", "{\\\"name2\\\"}={json2}^^{name}={\\\"json\\\"}^^{name3}}={{json3}",
|
||||||
"-suppressInheritedMembers",
|
"-suppressInheritedMembers");
|
||||||
jsonConf.getAbsolutePath());
|
|
||||||
|
|
||||||
assertThat(args).hasSize(matches.size());
|
assertThat(args).hasSize(matches.size());
|
||||||
|
|
||||||
|
|
|
@ -53,29 +53,6 @@ class SourceSetTest {
|
||||||
@Test
|
@Test
|
||||||
@SuppressWarnings("PMD.AvoidDuplicateLiterals")
|
@SuppressWarnings("PMD.AvoidDuplicateLiterals")
|
||||||
void sourceSetTest() {
|
void sourceSetTest() {
|
||||||
var params = List.of(
|
|
||||||
"-sourceSetName",
|
|
||||||
"-displayName",
|
|
||||||
"-classpath",
|
|
||||||
"-src",
|
|
||||||
"-dependentSourceSets",
|
|
||||||
"-samples",
|
|
||||||
"-includes",
|
|
||||||
"-documentedVisibilities",
|
|
||||||
"-reportUndocumented",
|
|
||||||
"-noSkipEmptyPackages",
|
|
||||||
"-skipDeprecated",
|
|
||||||
"-jdkVersion",
|
|
||||||
"-languageVersion",
|
|
||||||
"-apiVersion",
|
|
||||||
"-noStdlibLink",
|
|
||||||
"-noJdkLink",
|
|
||||||
"-suppressedFiles",
|
|
||||||
"-analysisPlatform",
|
|
||||||
"-perPackageOptions",
|
|
||||||
"-externalDocumentationLinks",
|
|
||||||
"-srcLink"
|
|
||||||
);
|
|
||||||
var sourceSet = new SourceSet()
|
var sourceSet = new SourceSet()
|
||||||
.classpath("classpath1", "classpath2")
|
.classpath("classpath1", "classpath2")
|
||||||
.dependentSourceSets("moduleName", "sourceSetName")
|
.dependentSourceSets("moduleName", "sourceSetName")
|
||||||
|
@ -103,17 +80,6 @@ class SourceSetTest {
|
||||||
|
|
||||||
var args = sourceSet.args();
|
var args = sourceSet.args();
|
||||||
|
|
||||||
for (var p : params) {
|
|
||||||
var found = false;
|
|
||||||
for (var a : args) {
|
|
||||||
if (a.startsWith(p)) {
|
|
||||||
found = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
assertThat(found).as(p + " not found.").isTrue();
|
|
||||||
}
|
|
||||||
|
|
||||||
var matches = List.of(
|
var matches = List.of(
|
||||||
"-analysisPlatform", "jvm",
|
"-analysisPlatform", "jvm",
|
||||||
"-apiVersion", "1.0",
|
"-apiVersion", "1.0",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue