@@ -18,13 +18,13 @@ buildscript {
1818}
1919
2020plugins {
21- alias(libs.plugins. dokka)
21+ ` dokka- convention`
2222 alias(libs.plugins.kotlinx.binary.compatibility.validator)
23+ alias(libs.plugins.aws.kotlin.repo.tools.artifactsizemetrics)
2324 // ensure the correct version of KGP ends up on our buildscript classpath
2425 // since build-plugins also has <some> version in its dependency closure
25- alias(libs.plugins.kotlin.multiplatform) apply false
26- alias(libs.plugins.kotlin.jvm) apply false
27- alias(libs.plugins.aws.kotlin.repo.tools.artifactsizemetrics)
26+ id(libs.plugins.kotlin.multiplatform.get().pluginId) apply false
27+ id(libs.plugins.kotlin.jvm.get().pluginId) apply false
2828}
2929
3030artifactSizeMetrics {
@@ -40,35 +40,9 @@ val testJavaVersion = typedProp<String>("test.java.version")?.let {
4040}
4141
4242allprojects {
43- tasks.withType< org.jetbrains.dokka.gradle.AbstractDokkaTask > ().configureEach {
44- val sdkVersion: String by project
45- moduleVersion.set(sdkVersion)
46-
47- val year = java.time.LocalDate .now().year
48- val pluginConfigMap = mapOf (
49- " org.jetbrains.dokka.base.DokkaBase" to """
50- {
51- "customStyleSheets": [
52- "${rootProject.file(" docs/dokka-presets/css/logo-styles.css" )} ",
53- "${rootProject.file(" docs/dokka-presets/css/aws-styles.css" )} "
54- ],
55- "customAssets": [
56- "${rootProject.file(" docs/dokka-presets/assets/logo-icon.svg" )} ",
57- "${rootProject.file(" docs/dokka-presets/assets/aws_logo_white_59x35.png" )} ",
58- "${rootProject.file(" docs/dokka-presets/scripts/accessibility.js" )} "
59- ],
60- "footerMessage": "© $year , Amazon Web Services, Inc. or its affiliates. All rights reserved.",
61- "separateInheritedMembers" : true,
62- "templatesDir": "${rootProject.file(" docs/dokka-presets/templates" )} "
63- }
64- """ ,
65- )
66- pluginsMapConfiguration.set(pluginConfigMap)
67- }
68-
6943 if (rootProject.typedProp<Boolean >(" kotlinWarningsAsErrors" ) == true ) {
7044 tasks.withType< org.jetbrains.kotlin.gradle.tasks.KotlinCompile > {
71- kotlinOptions .allWarningsAsErrors = true
45+ compilerOptions .allWarningsAsErrors = true
7246 }
7347 }
7448
@@ -90,27 +64,18 @@ allprojects {
9064}
9165
9266// configure the root multimodule docs
93- tasks.dokkaHtmlMultiModule.configure {
67+ dokka {
9468 moduleName.set(" Smithy Kotlin" )
9569
96- // Output subprojects' docs to <docs-base>/project-name/* instead of <docs-base>/path/to/project-name/*
97- // This is especially important for inter-repo linking (e.g., via externalDocumentationLink) because the
98- // package-list doesn't contain enough project path information to indicate where modules' documentation are
99- // located.
100- fileLayout.set { parent, child ->
101- parent.outputDirectory.dir(child.moduleName)
70+ dokkaPublications.html {
71+ includes.from(
72+ rootProject.file(" docs/dokka-presets/README.md" ),
73+ )
10274 }
75+ }
10376
104- includes.from(
105- // NOTE: these get concatenated
106- rootProject.file(" docs/dokka-presets/README.md" ),
107- )
108-
109- val excludeFromDocumentation = listOf (
110- project(" :runtime:testing" ),
111- project(" :runtime:smithy-test" ),
112- )
113- removeChildTasks(excludeFromDocumentation)
77+ dependencies {
78+ dokka(project(" :runtime" ))
11479}
11580
11681// Publishing
@@ -121,6 +86,7 @@ val lintPaths = listOf(
12186 " **/*.{kt,kts}" ,
12287 " !**/generated-src/**" ,
12388 " !**/smithyprojections/**" ,
89+ " !**/build/**" ,
12490)
12591
12692configureLinting(lintPaths)
0 commit comments