Skip to content

Commit 8597447

Browse files
committed
Fixed Dokka source links
1 parent 02f56a8 commit 8597447

File tree

9 files changed

+22
-19
lines changed

9 files changed

+22
-19
lines changed

.idea/libraries/bld.xml

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/.idea/libraries/bld.xml

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/.idea/misc.xml

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/java/rife/bld/extension/CompileKotlinOperation.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ public static List<String> getJarList(File directory, String regex) {
6262
var files = directory.listFiles();
6363
if (files != null) {
6464
for (var f : files) {
65-
if (!f.getName().contains("-sources") && f.getName().matches(regex)) {
65+
if (!f.getName().endsWith("-sources.jar") && (!f.getName().endsWith("-javadoc.jar")) &&
66+
f.getName().matches(regex)) {
6667
jars.add(f.getAbsolutePath());
6768
}
6869
}

src/main/java/rife/bld/extension/dokka/DokkaOperation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ protected List<String> executeConstructProcessCommandList() {
142142
args.add("-globalLinks");
143143
var links = new ArrayList<String>();
144144
globalLinks_.forEach((k, v) ->
145-
links.add(String.format("{%s}^{%s}", k, v)));
145+
links.add(String.format("%s^%s", k, v)));
146146
args.add(String.join("^^", links));
147147
}
148148

src/main/java/rife/bld/extension/dokka/SourceSet.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public List<String> args() {
123123
if (!externalDocumentationLinks_.isEmpty()) {
124124
args.add("-externalDocumentationLinks");
125125
var links = new ArrayList<String>();
126-
externalDocumentationLinks_.forEach((k, v) -> links.add(String.format("{%s}^{%s}", k, v)));
126+
externalDocumentationLinks_.forEach((k, v) -> links.add(String.format("%s^%s", k, v)));
127127
args.add(String.join("^^", links));
128128
}
129129

@@ -193,11 +193,11 @@ public List<String> args() {
193193
args.add(String.join(SEMICOLON, src_));
194194
}
195195

196-
// -srcLinks
196+
// -srcLink
197197
if (!srcLinks_.isEmpty()) {
198-
args.add("-srcLinks");
198+
args.add("-srcLink");
199199
var links = new ArrayList<String>();
200-
srcLinks_.forEach((k, v) -> links.add(String.format("{%s}={%s}", k, v)));
200+
srcLinks_.forEach((k, v) -> links.add(String.format("%s=%s", k, v)));
201201
args.add(String.join(SEMICOLON, links));
202202
}
203203

@@ -501,15 +501,15 @@ public SourceSet src(String... src) {
501501
}
502502

503503
/**
504-
* Sets the mpping between a source directory and a Web service for browsing the code.
504+
* Sets the mapping between a source directory and a Web service for browsing the code.
505505
*
506506
* @param srcPath the source path
507507
* @param remotePath the remote path
508508
* @param lineSuffix the line suffix
509509
* @return this operation instance
510510
*/
511-
public SourceSet srcLinks(String srcPath, String remotePath, String lineSuffix) {
512-
srcLinks_.put(srcPath, remotePath + '#' + lineSuffix);
511+
public SourceSet srcLink(String srcPath, String remotePath, String lineSuffix) {
512+
srcLinks_.put(srcPath, remotePath + lineSuffix);
513513
return this;
514514
}
515515

src/test/java/rife/bld/extension/dokka/DokkaOperationTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ void executeConstructProcessCommandListTest() {
6969
"-outputDir", path + "/build",
7070
"-delayTemplateSubstitution", "true",
7171
"-failOnWarning", "true",
72-
"-globalLinks", "{s}^{link}^^{s2}^{link2}",
72+
"-globalLinks", "s^link^^s2^link2",
7373
"-globalPackageOptions", "option1;option2;option3;option4",
7474
"-globalSrcLinks_", "link1;link2;link3;link4",
7575
"-includes", "file1;file2",

src/test/java/rife/bld/extension/dokka/SourceSetTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ void sourceSetCollectionsTest() {
3939
var matches = List.of(
4040
"-classpath", "path1;path2",
4141
"-dependentSourceSets", "set1/set2;set3/set4",
42-
"-externalDocumentationLinks", "{link3}^{link4}^^{link1}^{link2}",
42+
"-externalDocumentationLinks", "link3^link4^^link1^link2",
4343
"-perPackageOptions", "option1;option2",
4444
"-samples", "samples1;samples1",
4545
"-suppressedFiles", "sup1;sup2"
@@ -62,8 +62,8 @@ void sourceSetTest() {
6262
.includes("includes1", "includes2")
6363
.perPackageOptions("options1", "options2")
6464
.samples("samples1", "sample2")
65-
.srcLinks("path1", "remote1", "suffix1")
66-
.srcLinks("path2", "remote2", "suffix2")
65+
.srcLink("path1", "remote1", "#suffix1")
66+
.srcLink("path2", "remote2", "#suffix2")
6767
.src("src1", "src2")
6868
.suppressedFiles("sup1", "sup2")
6969
.analysisPlatform(AnalysisPlatform.JVM)
@@ -86,7 +86,7 @@ void sourceSetTest() {
8686
"-dependentSourceSets", "moduleName/sourceSetName",
8787
"-displayName", "name",
8888
"-documentedVisibilities", "package;private",
89-
"-externalDocumentationLinks", "{url1}^{packageListUrl1}^^{url2}^{packageListUrl2}",
89+
"-externalDocumentationLinks", "url1^packageListUrl1^^url2^packageListUrl2",
9090
"-jdkVersion", "18",
9191
"-includes", "includes1;includes2",
9292
"-languageVersion", "2.0",
@@ -98,7 +98,7 @@ void sourceSetTest() {
9898
"-samples", "samples1;sample2",
9999
"-skipDeprecated", "true",
100100
"-src", "src1;src2",
101-
"-srcLinks", "{path1}={remote1#suffix1};{path2}={remote2#suffix2}",
101+
"-srcLink", "path1=remote1#suffix1;path2=remote2#suffix2",
102102
"-sourceSetName", "setName",
103103
"-suppressedFiles", "sup1;sup2");
104104

0 commit comments

Comments
 (0)