Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changes/30477ab1-a876-4671-9c89-fcfc3c6ff3b8.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"id": "30477ab1-a876-4671-9c89-fcfc3c6ff3b8",
"type": "documentation",
"description": "update API reference doc styling"
}
11 changes: 11 additions & 0 deletions aws-runtime/aws-config/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* SPDX-License-Identifier: Apache-2.0.
*/
import aws.sdk.kotlin.gradle.codegen.dsl.smithyKotlinPlugin
import org.jetbrains.dokka.gradle.DokkaTaskPartial

plugins {
id("aws.sdk.kotlin.codegen")
Expand Down Expand Up @@ -187,3 +188,13 @@ listOf("apiElements", "runtimeElements").forEach {
}
}


// suppress internal generated clients
tasks.named<DokkaTaskPartial>("dokkaHtmlPartial") {
dokkaSourceSets.configureEach {
perPackageOption {
matchingRegex.set(""".*\.internal.*""")
suppress.set(true)
}
}
}
29 changes: 17 additions & 12 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ allprojects {
val pluginConfigMap = mapOf(
"org.jetbrains.dokka.base.DokkaBase" to """
{
"customStyleSheets": ["${rootProject.file("docs/dokka-presets/css/logo-styles.css")}"],
"customStyleSheets": [
"${rootProject.file("docs/dokka-presets/css/logo-styles.css")}",
"${rootProject.file("docs/dokka-presets/css/aws-styles.css")}"
],
"customAssets": [
"${rootProject.file("docs/dokka-presets/assets/logo-icon.svg")}",
"${rootProject.file("docs/dokka-presets/assets/aws_logo_white_59x35.png")}"
Expand Down Expand Up @@ -90,19 +93,21 @@ if (project.prop("kotlinWarningsAsErrors")?.toString()?.toBoolean() == true) {
}
}

// configure the root multimodule docs
tasks.dokkaHtmlMultiModule.configure {
moduleName.set("AWS SDK for Kotlin")
project.afterEvaluate {
// configure the root multimodule docs
tasks.dokkaHtmlMultiModule.configure {
moduleName.set("AWS SDK for Kotlin")

includes.from(
// NOTE: these get concatenated
rootProject.file("docs/dokka-presets/README.md"),
)
includes.from(
// NOTE: these get concatenated
rootProject.file("docs/dokka-presets/README.md"),
)

val excludeFromDocumentation = listOf(
project(":aws-runtime:testing"),
)
removeChildTasks(excludeFromDocumentation)
val excludeFromDocumentation = listOf(
project(":aws-runtime:testing")
)
removeChildTasks(excludeFromDocumentation)
}
}

if (
Expand Down
9 changes: 9 additions & 0 deletions docs/dokka-presets/css/aws-styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/


:root {
--color-dark: #232f3e;
}
31 changes: 14 additions & 17 deletions docs/dokka-presets/css/logo-styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,20 @@
* SPDX-License-Identifier: Apache-2.0.
*/

#logo {
background-image: url('../images/aws_logo_white_59x35.png');
background-color: #232f3e;
color: #333;
background-size: 59px 35px;
.library-name a {
position: relative;
--logo-width: 72px;
margin-left: calc(var(--logo-width) + 5px);
}

body {
background-color: #f2f3f3;
.library-name a::before {
content: '';
/* path is relative to final asset location output dir */
background-image: url('../images/aws_logo_white_59x35.png');
background-size: contain;
position: absolute;
width: 59px;
height: 35px;
top: -10px;
left: calc(-1 * var(--logo-width) - 5px);
}

/*
* override markdown samples which appear to have broken and/or minimal style
*/
.sample-container {
padding: 16px;
border-radius: 6px;
background-color: rgb(280, 280, 280);
margin: 12px 0 12px 0;
}
9 changes: 9 additions & 0 deletions services/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,15 @@ subprojects {
}
}

tasks.withType<org.jetbrains.dokka.gradle.DokkaTaskPartial>().configureEach {
dokkaSourceSets {
named("main") {
platform.set(org.jetbrains.dokka.Platform.jvm)
sourceRoots.from(kotlin.sourceSets.getByName("main").kotlin.srcDirs)
}
}
}

tasks.test {
useJUnitPlatform()
testLogging {
Expand Down