Skip to content

Commit eb23944

Browse files
authored
chore(build): dokka upgrade (#523)
1 parent b909658 commit eb23944

File tree

3 files changed

+12
-261
lines changed

3 files changed

+12
-261
lines changed

.github/workflows/api-docs.yml

Lines changed: 0 additions & 239 deletions
This file was deleted.

build.gradle.kts

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,16 @@ subprojects {
4949
}
5050
}
5151

52-
val smithyKotlinPackageListUrl: String by project
53-
val smithyKotlinDocBaseUrl: String by project
54-
// Configure Dokka to link to smithy-kotlin types
55-
dokkaSourceSets.configureEach {
56-
externalDocumentationLink {
57-
packageListUrl.set(URL(smithyKotlinPackageListUrl))
58-
url.set(URL(smithyKotlinDocBaseUrl))
52+
val smithyKotlinPackageListUrl: String? by project
53+
val smithyKotlinDocBaseUrl: String? by project
54+
// Configure Dokka to link to smithy-kotlin types if specified in properties
55+
// These optional properties are supplied api the api docs build job but are unneeded otherwise
56+
if (!smithyKotlinDocBaseUrl.isNullOrEmpty() && !smithyKotlinPackageListUrl.isNullOrEmpty()) {
57+
dokkaSourceSets.configureEach {
58+
externalDocumentationLink {
59+
packageListUrl.set(URL(smithyKotlinPackageListUrl))
60+
url.set(URL(smithyKotlinDocBaseUrl))
61+
}
5962
}
6063
}
6164
}
@@ -89,7 +92,7 @@ if (project.prop("kotlinWarningsAsErrors")?.toString()?.toBoolean() == true) {
8992

9093
// configure the root multimodule docs
9194
tasks.dokkaHtmlMultiModule.configure {
92-
moduleName.set("AWS Kotlin SDK")
95+
moduleName.set("AWS SDK for Kotlin")
9396

9497
includes.from(
9598
// NOTE: these get concatenated
@@ -101,15 +104,6 @@ tasks.dokkaHtmlMultiModule.configure {
101104
project(":aws-runtime:crt-util"),
102105
)
103106
removeChildTasks(excludeFromDocumentation)
104-
105-
// This allows docs generation to be overridden on the command line.
106-
// Used to generate each AWS service individually.
107-
if (project.hasProperty("dokkaOutSubDir")) {
108-
val subDir = project.prop("dokkaOutSubDir");
109-
val targetDir = buildDir.resolve("dokka/$subDir")
110-
println("Generating docs in $targetDir")
111-
outputDirectory.set(targetDir)
112-
}
113107
}
114108

115109
if (

gradle.properties

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ smithyKotlinVersion=0.7.8-SNAPSHOT
1616

1717
# kotlin
1818
kotlinVersion=1.6.10
19-
dokkaVersion=1.6.0
19+
dokkaVersion=1.6.10
2020

2121
# kotlin JVM
2222
kotlinJVMTargetVersion=1.8
@@ -39,7 +39,3 @@ mockkVersion=1.12.0
3939

4040
# logging - JVM
4141
slf4jVersion=1.7.30
42-
43-
# dokka config (values specified at build-time as needed)
44-
smithyKotlinPackageListUrl=
45-
smithyKotlinDocBaseUrl=

0 commit comments

Comments
 (0)