Skip to content

Commit

Permalink
bumped dokka to 2.0.0-Beta and fixed all util functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Jolanrensen committed Nov 17, 2024
1 parent cdfddc9 commit 5963d17
Show file tree
Hide file tree
Showing 7 changed files with 343 additions and 164 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
kotlin("jvm") version "2.0.10" apply false
kotlin("jvm") version "2.0.20" apply false
id("com.github.johnrengelman.shadow") version "8.1.1" apply false
id("org.jlleitschuh.gradle.ktlint") version "12.1.1"
}
Expand Down
9 changes: 5 additions & 4 deletions doc-processor-gradle-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
Expand Down Expand Up @@ -38,15 +39,15 @@ dependencies {
shadow(gradleKotlinDsl())

// Dokka dependencies
val dokkaVersion = "1.8.10"
shadow("org.jetbrains.dokka:dokka-analysis:$dokkaVersion")
val dokkaVersion = "2.0.0-Beta"
shadow("org.jetbrains.dokka:analysis-kotlin-symbols:$dokkaVersion")
shadow("org.jetbrains.dokka:dokka-base:$dokkaVersion")
shadow("org.jetbrains.dokka:dokka-core:$dokkaVersion")
shadow("org.jetbrains.dokka:dokka-base-test-utils:$dokkaVersion")
shadow("org.jetbrains.dokka:dokka-gradle-plugin:$dokkaVersion")

// logging
api("io.github.microutils:kotlin-logging:3.0.5")
api("io.github.oshai:kotlin-logging:7.0.0")

// Use JUnit test framework for unit tests
testImplementation(kotlin("test"))
Expand Down Expand Up @@ -111,7 +112,7 @@ tasks.check {
}

tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "11"
compilerOptions.jvmTarget = JvmTarget.JVM_11
}

java {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ abstract class DocProcessorFunctionalTest(name: String) {
import nl.jolanrensen.docProcessor.defaultProcessors.*
plugins {
kotlin("jvm") version "1.9.21"
kotlin("jvm") version "2.0.20"
id("nl.jolanrensen.docProcessor") version "$version"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package nl.jolanrensen.docProcessor

import com.intellij.openapi.util.TextRange
import com.intellij.psi.PsiNamedElement
import org.jetbrains.dokka.InternalDokkaApi
import org.jetbrains.dokka.base.signatures.KotlinSignatureUtils.annotations
import org.jetbrains.dokka.model.AnnotationValue
import org.jetbrains.dokka.model.Documentable
Expand All @@ -21,13 +23,14 @@ import java.io.File
* This represents the source of the [documentable] pointing to a language-specific AST/PSI.
* @param [logger] [Dokka logger][DokkaLogger] that's needed for [findClosestDocComment]. Should be given.
*/
@OptIn(InternalDokkaApi::class)
fun DocumentableWrapper.Companion.createFromDokkaOrNull(
documentable: Documentable,
source: DocumentableSource,
logger: DokkaLogger,
): DocumentableWrapper? {
val docComment = findClosestDocComment(
element = source.psi,
element = source.psi as PsiNamedElement,
logger = logger,
)

Expand Down
Loading

0 comments on commit 5963d17

Please sign in to comment.