Skip to content

Add missing API documentation #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,8 @@ internal abstract class PatternAnnotator : Annotator() {
patterns.any { it.matches(codeElement) }
}

internal fun SourceFile<Java>.qualifiedTopClassName(): String
= relativePath.toString().replace(File.separator, ".").replace(".java", "")
/**
* Obtains the fully qualified name of the top-level class defined in this file.
*/
internal fun SourceFile<Java>.qualifiedTopClassName(): String =
relativePath.toString().replace(File.separator, ".").replace(".java", "")
6 changes: 6 additions & 0 deletions buildSrc/src/main/kotlin/DokkaExts.kt
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,17 @@ fun DependencyHandlerScope.useDokkaWithSpineExtensions() {
private fun DependencyHandler.dokkaPlugin(dependencyNotation: Any): Dependency? =
add("dokkaPlugin", dependencyNotation)

/**
* Resolves the directory where Dokka outputs HTML documentation for the given language.
*/
internal fun Project.dokkaOutput(language: String): File {
val lng = language.titleCaseFirstChar()
return layout.buildDirectory.dir("docs/dokka$lng").get().asFile
}

/**
* Locates a Dokka configuration file under the `buildSrc` resources.
*/
fun Project.dokkaConfigFile(file: String): File {
val dokkaConfDir = project.rootDir.resolve("buildSrc/src/main/resources/dokka")
return dokkaConfDir.resolve(file)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ public object KspGradlePlugin {
*/
public const val id: String = "com.google.devtools.ksp"

/**
* Returns the path to the directory where KSP generates sources for the given [project].
*/
public fun defaultTargetDirectory(project: Project): Path {
val generatedDir = project.layout.buildDirectory.dir("generated")
return generatedDir.get().asFile.toPath()
Expand Down
2 changes: 1 addition & 1 deletion version.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@
*
* Do not rename this property, as it is also used in the integration tests via its name.
*/
val coreJvmCompilerVersion by extra("2.0.0-SNAPSHOT.004")
val coreJvmCompilerVersion by extra("2.0.0-SNAPSHOT.005")
val versionToPublish by extra(coreJvmCompilerVersion)
Loading