Skip to content

Commit b2cacb6

Browse files
committed
refactor: cleanup unused scripts and update dokka configs
1 parent c7cee0d commit b2cacb6

File tree

9 files changed

+5
-1084
lines changed

9 files changed

+5
-1084
lines changed

.github/workflows/docs-generate.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ on:
77
push:
88
branches:
99
- dev
10-
- main
1110
paths:
1211
- 'core/**'
1312
- 'feature/**'
@@ -18,7 +17,6 @@ on:
1817
pull_request:
1918
branches:
2019
- dev
21-
- main
2220
paths:
2321
- 'core/**'
2422
- 'feature/**'

build.gradle.kts

Lines changed: 3 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -48,104 +48,13 @@ plugins {
4848
alias(libs.plugins.dokka)
4949
}
5050

51-
// Apply Dokka to subprojects
5251
subprojects {
5352
apply(plugin = "org.jetbrains.dokka")
5453
}
5554

56-
// Dokka Configuration
57-
tasks.withType<org.jetbrains.dokka.gradle.DokkaMultiModuleTask>().configureEach {
58-
moduleName.set("KMP Project Documentation")
59-
60-
outputDirectory.set(layout.buildDirectory.dir("docs/html"))
61-
62-
val readmeFile = rootProject.file("README.md")
63-
if (readmeFile.exists()) {
64-
includes.from(readmeFile)
65-
}
66-
}
67-
68-
subprojects {
69-
tasks.withType<org.jetbrains.dokka.gradle.DokkaTaskPartial>().configureEach {
70-
moduleName.set(project.name)
71-
72-
moduleVersion.set(project.version.toString())
73-
74-
dokkaSourceSets.configureEach {
75-
suppress.set(false)
76-
77-
displayName.set(name)
78-
79-
val readmeFile = project.file("README.md")
80-
if (readmeFile.exists()) {
81-
includes.from(readmeFile)
82-
}
83-
84-
sourceLink {
85-
localDirectory.set(projectDir.resolve("src"))
86-
remoteUrl.set(
87-
java.net.URI(
88-
"https://github.com/YOUR_USERNAME/YOUR_REPO/tree/main/${project.path.replace(":", "/")}/src"
89-
).toURL()
90-
)
91-
remoteLineSuffix.set("#L")
92-
}
93-
94-
externalDocumentationLink {
95-
url.set(java.net.URI("https://kotlinlang.org/api/kotlinx.coroutines/").toURL())
96-
packageListUrl.set(
97-
java.net.URI("https://kotlinlang.org/api/kotlinx.coroutines/package-list").toURL()
98-
)
99-
}
100-
101-
externalDocumentationLink {
102-
url.set(java.net.URI("https://kotlinlang.org/api/kotlinx-serialization/").toURL())
103-
}
104-
105-
externalDocumentationLink {
106-
url.set(java.net.URI("https://api.ktor.io/").toURL())
107-
}
108-
109-
platform.set(
110-
when {
111-
name.contains("android", ignoreCase = true) ->
112-
org.jetbrains.dokka.Platform.jvm
113-
name.contains("jvm", ignoreCase = true) ->
114-
org.jetbrains.dokka.Platform.jvm
115-
name.contains("js", ignoreCase = true) ->
116-
org.jetbrains.dokka.Platform.js
117-
name.contains("native", ignoreCase = true) ||
118-
name.contains("ios", ignoreCase = true) ->
119-
org.jetbrains.dokka.Platform.native
120-
name.contains("common", ignoreCase = true) ->
121-
org.jetbrains.dokka.Platform.common
122-
else -> org.jetbrains.dokka.Platform.common
123-
}
124-
)
125-
126-
suppressInheritedMembers.set(false)
127-
suppressObviousFunctions.set(true)
128-
skipEmptyPackages.set(true)
129-
reportUndocumented.set(false)
130-
skipDeprecated.set(false)
131-
jdkVersion.set(17)
132-
133-
perPackageOption {
134-
matchingRegex.set(".*\\.internal.*")
135-
suppress.set(true)
136-
}
137-
// Exclude Compose Resources generated and API packages from Dokka
138-
perPackageOption {
139-
// org.jetbrains.compose.resources API
140-
matchingRegex.set("org\\.jetbrains\\.compose\\.resources(\\..*)?")
141-
suppress.set(true)
142-
}
143-
perPackageOption {
144-
// common pattern used by compose.resources generated classes
145-
matchingRegex.set(".*\\.generated\\.resources(\\..*)?")
146-
suppress.set(true)
147-
}
148-
}
55+
dokka {
56+
dokkaPublications.html {
57+
outputDirectory.set(layout.buildDirectory.dir("$rootDir/docs-website/static/api"))
14958
}
15059
}
15160

docs-generator/README.md

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

docs-generator/dokka-config/dokka.gradle.kts

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

0 commit comments

Comments
 (0)