Skip to content

Commit 26a0edc

Browse files
Copilotwax911
andauthored
refactor: restore Dokka V2 options in buildSrc
Agent-Logs-Url: https://github.com/AniTrend/retrofit-graphql/sessions/ad1de145-185f-45f6-b98b-8015a0a2f6cf Co-authored-by: wax911 <7859175+wax911@users.noreply.github.com>
1 parent 090d59e commit 26a0edc

1 file changed

Lines changed: 21 additions & 2 deletions

File tree

  • buildSrc/src/main/java/co/anitrend/retrofit/graphql/buildSrc/plugin/components

buildSrc/src/main/java/co/anitrend/retrofit/graphql/buildSrc/plugin/components/AndroidOptions.kt

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import org.gradle.kotlin.dsl.get
1616
import org.gradle.kotlin.dsl.getValue
1717
import org.gradle.kotlin.dsl.invoke
1818
import org.jetbrains.dokka.gradle.DokkaExtension
19+
import java.net.URL
1920
import java.util.*
2021

2122
private fun Properties.applyToBuildConfigForBuild(project: Project, buildType: ApplicationBuildType) {
@@ -107,11 +108,29 @@ private fun Project.configureDokka() {
107108
moduleName.set(this@configureDokka.name)
108109

109110
dokkaSourceSets.configureEach {
111+
platform.set(org.jetbrains.dokka.Platform.jvm)
110112
skipDeprecated.set(false)
111113
reportUndocumented.set(true)
112114
skipEmptyPackages.set(true)
113115
jdkVersion.set(21)
114-
sourceRoots.from(file("src"))
116+
sourceRoot(file("src"))
117+
118+
externalDocumentationLink {
119+
url.set(URL("https://developer.android.com/reference/kotlin/"))
120+
packageListUrl.set(URL("https://developer.android.com/reference/androidx/package-list"))
121+
}
122+
123+
perPackageOption {
124+
matchingRegex.set("kotlin($|\\.).*")
125+
skipDeprecated.set(false)
126+
reportUndocumented.set(true)
127+
includeNonPublic.set(false)
128+
}
129+
130+
perPackageOption {
131+
matchingRegex.set(".*\\.internal.*")
132+
suppress.set(true)
133+
}
115134
}
116135
}
117136
}
@@ -150,4 +169,4 @@ internal fun Project.configureOptions() {
150169
applyConfiguration(this@configureOptions)
151170
}
152171
}
153-
}
172+
}

0 commit comments

Comments
 (0)