Skip to content

Commit a9b3ee1

Browse files
Update KGP to 1.8.20 (#2989)
* Update KGP to 1.8.20 * Update AGP to be compatible with KGP * Replace `AndroidSourceSet` * Dump API * Update integration tests * Update GH actions tests * Refactor Gradle Runner * Fix `TYPE_MISMATCH_WARNING_FOR_INCORRECT_CAPTURE_APPROXIMATION` * Suppress source sets without compilations Dokka suppresses source sets that do no have compilation since such configuration is invalid, it reports a warning or an error * Introduce `dependsOn` for a new `com.android.build.api.dsl.AndroidSourceSet` * API dump * Add comment * Suppress remaining `TYPE_MISMATCH_WARNING_FOR_INCORRECT_CAPTURE_APPROXIMATION` * Add comment --------- Co-authored-by: Ignat Beresnev <ignat.beresnev@jetbrains.com>
1 parent 3fc8b83 commit a9b3ee1

File tree

33 files changed

+75
-69
lines changed

33 files changed

+75
-69
lines changed

.github/workflows/preview-publish-ga.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
uses: gradle/gradle-build-action@v2
2828
with:
2929
gradle-home-cache-cleanup: true
30-
arguments: :integration-tests:gradle:integrationTest --tests org.jetbrains.dokka.it.gradle.kotlin.CoroutinesGradleIntegrationTest --stacktrace
30+
arguments: :integration-tests:gradle:integrationTest --tests org.jetbrains.dokka.it.gradle.kotlin.CoroutinesGradleIntegrationTest --stacktrace "-Dorg.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=500m"
3131
env:
3232
DOKKA_TEST_OUTPUT_PATH: /home/runner/work/dokka/coroutines
3333
- name: Copy files to GitHub Actions Artifacts
@@ -56,7 +56,7 @@ jobs:
5656
uses: gradle/gradle-build-action@v2
5757
with:
5858
gradle-home-cache-cleanup: true
59-
arguments: :integration-tests:gradle:integrationTest --tests org.jetbrains.dokka.it.gradle.kotlin.SerializationGradleIntegrationTest --stacktrace
59+
arguments: :integration-tests:gradle:integrationTest --tests org.jetbrains.dokka.it.gradle.kotlin.SerializationGradleIntegrationTest --stacktrace "-Dorg.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=500m"
6060
env:
6161
DOKKA_TEST_OUTPUT_PATH: /home/runner/work/dokka/serialization
6262
- name: Copy files to GitHub Actions Artifacts

.github/workflows/preview-publish-web-s3.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
uses: gradle/gradle-build-action@v2
2525
with:
2626
gradle-home-cache-cleanup: true
27-
arguments: :integration-tests:gradle:integrationTest --tests org.jetbrains.dokka.it.gradle.kotlin.CoroutinesGradleIntegrationTest --stacktrace
27+
arguments: :integration-tests:gradle:integrationTest --tests org.jetbrains.dokka.it.gradle.kotlin.CoroutinesGradleIntegrationTest --stacktrace "-Dorg.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=500m"
2828
env:
2929
DOKKA_TEST_OUTPUT_PATH: /home/runner/work/dokka/coroutines
3030
- name: Configure AWS credentials for S3 access
@@ -55,7 +55,7 @@ jobs:
5555
uses: gradle/gradle-build-action@v2
5656
with:
5757
gradle-home-cache-cleanup: true
58-
arguments: :integration-tests:gradle:integrationTest --tests org.jetbrains.dokka.it.gradle.kotlin.SerializationGradleIntegrationTest --stacktrace
58+
arguments: :integration-tests:gradle:integrationTest --tests org.jetbrains.dokka.it.gradle.kotlin.SerializationGradleIntegrationTest --stacktrace "-Dorg.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=500m"
5959
env:
6060
DOKKA_TEST_OUTPUT_PATH: /home/runner/work/dokka/serialization
6161
- name: Configure AWS credentials for S3 access

.github/workflows/tests-smoke.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
if: matrix.os == 'windows-latest'
3030
# Running tests with the Gradle daemon on windows agents leads to some very strange
3131
# JVM crashes for some reason. Most likely a problem of Gradle/GitHub/Windows server
32-
run: ./gradlew clean test --stacktrace --no-daemon
32+
run: ./gradlew clean test --stacktrace --no-daemon --no-parallel "-Dorg.gradle.jvmargs=-Xmx1g -XX:MaxMetaspaceSize=500m"
3333
- name: Run tests under Ubuntu
3434
if: matrix.os != 'windows-latest'
3535
run: ./gradlew clean test --stacktrace

.github/workflows/tests-thorough.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
if: matrix.os == 'windows-latest'
3131
# Running tests with the Gradle daemon on windows agents leads to some very strange
3232
# JVM crashes for some reason. Most likely a problem of Gradle/GitHub/Windows server
33-
run: ./gradlew clean test --stacktrace --no-daemon
33+
run: ./gradlew clean test --stacktrace --no-daemon --no-parallel "-Dorg.gradle.jvmargs=-Xmx1g -XX:MaxMetaspaceSize=500m"
3434
- name: Run tests under Ubuntu/Macos
3535
if: matrix.os != 'windows-latest'
3636
run: ./gradlew clean test --stacktrace

core/api/core.api

+1-1
Original file line numberDiff line numberDiff line change
@@ -4687,7 +4687,7 @@ public final class org/jetbrains/dokka/utilities/ServiceLookupException : java/l
46874687

46884688
public final class org/jetbrains/dokka/utilities/TypeReference {
46894689
public static final field Companion Lorg/jetbrains/dokka/utilities/TypeReference$Companion;
4690-
public synthetic fun <init> (Lcom/fasterxml/jackson/core/type/TypeReference;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
4690+
public fun <init> (Lcom/fasterxml/jackson/core/type/TypeReference;)V
46914691
}
46924692

46934693
public final class org/jetbrains/dokka/utilities/TypeReference$Companion {

core/src/main/kotlin/utilities/json.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,11 @@ private val objectMapper = run {
2020
}
2121

2222
@PublishedApi
23-
internal class TypeReference<T> private constructor(
23+
internal class TypeReference<T> @PublishedApi internal constructor(
2424
internal val jackson: JacksonTypeReference<T>
2525
) {
2626
companion object {
27+
@PublishedApi
2728
internal inline operator fun <reified T> invoke(): TypeReference<T> = TypeReference(jacksonTypeRef())
2829
}
2930
}

gradle/libs.versions.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[versions]
22

3-
gradlePlugin-kotlin = "1.8.10"
4-
gradlePlugin-android = "4.0.1"
3+
gradlePlugin-kotlin = "1.8.20"
4+
gradlePlugin-android = "4.1.3"
55
gradlePlugin-dokka = "1.7.10"
66

77
kotlinx-coroutines = "1.6.3"
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
dokka_it_kotlin_version=1.8.10
2-
dokka_it_android_gradle_plugin_version=4.0.0
2+
dokka_it_android_gradle_plugin_version=4.1.3
33
android.useAndroidX=true

integration-tests/gradle/projects/it-multiplatform-0/build.gradle.kts

+6-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,12 @@ kotlin {
2525
}
2626
named("commonMain") {
2727
dependencies {
28-
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9")
28+
if (properties["dokka_it_kotlin_version"] in listOf("1.4.32", "1.5.31"))
29+
// otherwise for a modern versin of coroutines:
30+
// Failed to resolve Kotlin library: project/build/kotlinSourceSetMetadata/commonMain/org.jetbrains.kotlinx-kotlinx-coroutines-core/org.jetbrains.kotlinx-kotlinx-coroutines-core-commonMain.klib
31+
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9")
32+
else
33+
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4")
2934
}
3035
}
3136
}

integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/SequentialTasksExecutionStressTest.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class SequentialTasksExecutionStressTest(override val versions: BuildVersions) :
3737
"--info",
3838
"--stacktrace",
3939
"-Ptask_number=100",
40-
jvmArgs = listOf("-Xmx1G", "-XX:MaxMetaspaceSize=350m")
40+
jvmArgs = listOf("-Xmx1G", "-XX:MaxMetaspaceSize=400m")
4141
).buildRelaxed()
4242

4343
assertEquals(TaskOutcome.SUCCESS, assertNotNull(result.task(":runTasks")).outcome)

integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/TestedVersions.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package org.jetbrains.dokka.it.gradle
22

33
internal object TestedVersions {
44

5-
val LATEST = BuildVersions("7.4.2", "1.8.10")
5+
val LATEST = BuildVersions("7.4.2", "1.8.20")
66

77
/**
88
* All supported Gradle/Kotlin versions, including [LATEST]
@@ -46,5 +46,6 @@ internal object TestedVersions {
4646
"1.7.20" to "18.2.0-pre.391",
4747
"1.8.0" to "18.2.0-pre.467",
4848
"1.8.10" to "18.2.0-pre.490",
49+
"1.8.20" to "18.2.0-pre.546"
4950
)
5051
}

integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/kotlin/CoroutinesGradleIntegrationTest.kt

+4-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ class CoroutinesGradleIntegrationTest(override val versions: BuildVersions) : Ab
3333

3434
@Test
3535
fun execute() {
36-
val result = createGradleRunner(":dokkaHtmlMultiModule", "-i", "-s").buildRelaxed()
36+
val result = createGradleRunner(
37+
":dokkaHtmlMultiModule", "-i", "-s",
38+
jvmArgs = listOf("-Xmx2G", "-XX:MaxMetaspaceSize=500m")
39+
).buildRelaxed()
3740

3841
assertEquals(TaskOutcome.SUCCESS, assertNotNull(result.task(":dokkaHtmlMultiModule")).outcome)
3942

integration-tests/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/AbstractGradleIntegrationTest.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ abstract class AbstractGradleIntegrationTest : AbstractIntegrationTest() {
2828

2929
fun createGradleRunner(
3030
vararg arguments: String,
31-
jvmArgs: List<String> = listOf("-Xmx4G", "-XX:MaxMetaspaceSize=2G")
31+
jvmArgs: List<String> = listOf("-Xmx2G", "-XX:MaxMetaspaceSize=1G")
3232
): GradleRunner {
3333
return GradleRunner.create()
3434
.withProjectDir(projectDir)

plugins/base/api/base.api

+1-1
Original file line numberDiff line numberDiff line change
@@ -1109,7 +1109,7 @@ public abstract class org/jetbrains/dokka/base/templating/SubstitutionCommand :
11091109

11101110
public final class org/jetbrains/dokka/base/templating/TypeReference {
11111111
public static final field Companion Lorg/jetbrains/dokka/base/templating/TypeReference$Companion;
1112-
public synthetic fun <init> (Lcom/fasterxml/jackson/core/type/TypeReference;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
1112+
public fun <init> (Lcom/fasterxml/jackson/core/type/TypeReference;)V
11131113
}
11141114

11151115
public final class org/jetbrains/dokka/base/templating/TypeReference$Companion {

plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@ class KotlinSignatureProvider(ctcc: CommentsToContentConverter, logger: DokkaLog
102102
}
103103
}
104104

105-
private fun <T : DClasslike> classlikeSignature(c: T): List<ContentNode> {
105+
private fun classlikeSignature(c: DClasslike): List<ContentNode> {
106106
@Suppress("UNCHECKED_CAST")
107-
val typeAliasUnderlyingType = (c as? WithExtraProperties<out DClasslike>)
107+
val typeAliasUnderlyingType = (c as? WithExtraProperties<DClasslike>)
108108
?.extra
109109
?.get(ActualTypealias)
110110
?.underlyingType

plugins/base/src/main/kotlin/templating/jsonMapperForPlugins.kt

+4-2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import com.fasterxml.jackson.module.kotlin.jacksonTypeRef
1111
import org.jetbrains.dokka.base.DokkaBase
1212
import java.io.File
1313

14+
// TODO [beresnev] try to get rid of this copy-paste in #2933
1415
// THIS IS COPIED FROM BASE SINCE IT NEEDS TO BE INSTANTIATED ON THE SAME CLASS LOADER AS PLUGINS
1516

1617
private val objectMapper = run {
@@ -26,10 +27,11 @@ private val objectMapper = run {
2627
}
2728

2829
@PublishedApi
29-
internal class TypeReference<T> private constructor(
30+
internal class TypeReference<T> @PublishedApi internal constructor(
3031
internal val jackson: com.fasterxml.jackson.core.type.TypeReference<T>
3132
) {
3233
companion object {
34+
@PublishedApi
3335
internal inline operator fun <reified T> invoke(): TypeReference<T> = TypeReference(jacksonTypeRef())
3436
}
3537
}
@@ -53,4 +55,4 @@ private object FileSerializer : StdScalarSerializer<File>(File::class.java) {
5355
private class PluginTypeFactory: TypeFactory(null) {
5456
override fun findClass(className: String): Class<out Any>? =
5557
Class.forName(className, true, DokkaBase::class.java.classLoader) ?: super.findClass(className)
56-
}
58+
}

plugins/base/src/main/kotlin/transformers/documentables/utils.kt

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ import org.jetbrains.dokka.model.Documentable
55
import org.jetbrains.dokka.model.ExceptionInSupertypes
66
import org.jetbrains.dokka.model.properties.WithExtraProperties
77

8-
val <T : WithExtraProperties<out Documentable>> T.isException: Boolean
8+
val <T : Documentable> WithExtraProperties<T>.isException: Boolean
99
get() = extra[ExceptionInSupertypes] != null
1010

1111

12-
val <T> T.deprecatedAnnotation where T : WithExtraProperties<out Documentable>
12+
val <T : Documentable> WithExtraProperties<T>.deprecatedAnnotation
1313
get() = extra[Annotations]?.let { annotations ->
1414
annotations.directAnnotations.values.flatten().firstOrNull {
1515
it.isDeprecated()
@@ -20,7 +20,7 @@ val <T> T.deprecatedAnnotation where T : WithExtraProperties<out Documentable>
2020
* @return true if [T] has [kotlin.Deprecated] or [java.lang.Deprecated]
2121
* annotation for **any** source set
2222
*/
23-
fun <T> T.isDeprecated() where T : WithExtraProperties<out Documentable> = deprecatedAnnotation != null
23+
fun <T : Documentable> WithExtraProperties<T>.isDeprecated() = deprecatedAnnotation != null
2424

2525
/**
2626
* @return true for [kotlin.Deprecated] and [java.lang.Deprecated]

plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,7 @@ private val divergentDocumentableComparator =
724724

725725
@Suppress("UNCHECKED_CAST")
726726
private fun <T : Documentable> T.nameAfterClash(): String =
727-
((this as? WithExtraProperties<out Documentable>)?.extra?.get(DriClashAwareName)?.value ?: name).orEmpty()
727+
((this as? WithExtraProperties<Documentable>)?.extra?.get(DriClashAwareName)?.value ?: name).orEmpty()
728728

729729
@Suppress("UNCHECKED_CAST")
730730
internal inline fun <reified T : TagWrapper> GroupedTags.withTypeUnnamed(): SourceSetDependent<T> =

plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/pages/htmlPreprocessors.kt

+4-3
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,10 @@ object DeprecatedPageCreator : PageTransformer {
119119
override fun invoke(input: RootPageNode): RootPageNode {
120120
val elements = HashMap<DeprecatedPageSection, MutableSet<DeprecatedNode>>().apply {
121121

122-
fun <T> T.putAs(deprecatedPageSection: DeprecatedPageSection) where
122+
fun <T, V> T.putAs(deprecatedPageSection: DeprecatedPageSection) where
123123
T : NavigableJavadocNode,
124-
T : WithJavadocExtra<out Documentable> {
124+
V : Documentable,
125+
T : WithJavadocExtra<V> {
125126
val deprecatedNode = DeprecatedNode(
126127
listOfNotNull(
127128
getDRI().packageName?.takeUnless { it.isBlank() },
@@ -159,7 +160,7 @@ object DeprecatedPageCreator : PageTransformer {
159160
it.takeIf { it.isDeprecated() }?.putAs(DeprecatedPageSection.DeprecatedEnumConstants)
160161
}
161162
node.takeIf { it.isDeprecated() }?.putAs(
162-
if ((node as? WithJavadocExtra<out Documentable>)?.isException == true) DeprecatedPageSection.DeprecatedExceptions
163+
if ((node as? WithJavadocExtra<*>)?.isException == true) DeprecatedPageSection.DeprecatedExceptions
163164
else when (node.kind) {
164165
"enum" -> DeprecatedPageSection.DeprecatedEnums
165166
"interface" -> DeprecatedPageSection.DeprecatedInterfaces

plugins/kotlin-as-java/src/main/kotlin/converters/KotlinToJavaConverter.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ internal fun ClassKind.asJava(): ClassKind {
482482
}
483483
}
484484

485-
private fun PropertyContainer<out Documentable>.mergeAdditionalModifiers(second: SourceSetDependent<Set<ExtraModifiers>>) =
485+
private fun <T : Documentable> PropertyContainer<T>.mergeAdditionalModifiers(second: SourceSetDependent<Set<ExtraModifiers>>) =
486486
this[AdditionalModifiers]?.squash(AdditionalModifiers(second)) ?: AdditionalModifiers(second)
487487

488488
private fun AdditionalModifiers.squash(second: AdditionalModifiers) =
@@ -494,4 +494,4 @@ internal fun ClassId.classNames(): String =
494494
private fun DProperty.hasModifier(modifier: ExtraModifiers.KotlinOnlyModifiers): Boolean =
495495
extra[AdditionalModifiers]
496496
?.content
497-
?.any { (_, modifiers) -> modifier in modifiers } == true
497+
?.any { (_, modifiers) -> modifier in modifiers } == true

plugins/kotlin-as-java/src/main/kotlin/jvmField.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import org.jetbrains.dokka.model.Documentable
55
import org.jetbrains.dokka.model.properties.WithExtraProperties
66
import org.jetbrains.kotlin.util.firstNotNullResult
77

8-
internal fun WithExtraProperties<out Documentable>.jvmField(): Annotations.Annotation? =
8+
internal fun <T : Documentable> WithExtraProperties<T>.jvmField(): Annotations.Annotation? =
99
extra[Annotations]?.directAnnotations?.entries?.firstNotNullResult { (_, annotations) -> annotations.jvmFieldAnnotation() }
1010

1111
internal fun List<Annotations.Annotation>.jvmFieldAnnotation(): Annotations.Annotation? =
12-
firstOrNull { it.dri.packageName == "kotlin.jvm" && it.dri.classNames == "JvmField" }
12+
firstOrNull { it.dri.packageName == "kotlin.jvm" && it.dri.classNames == "JvmField" }

plugins/kotlin-as-java/src/main/kotlin/jvmName.kt

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ import org.jetbrains.dokka.model.isJvmName
77
import org.jetbrains.dokka.model.properties.WithExtraProperties
88
import org.jetbrains.kotlin.util.firstNotNullResult
99

10-
internal fun WithExtraProperties<out Documentable>.directlyAnnotatedJvmName(): Annotations.Annotation? =
10+
internal fun <T : Documentable> WithExtraProperties<T>.directlyAnnotatedJvmName(): Annotations.Annotation? =
1111
extra[Annotations]?.directAnnotations?.entries?.firstNotNullResult { (_, annotations)-> annotations.jvmNameAnnotation() }
1212

13-
internal fun WithExtraProperties<out Documentable>.fileLevelJvmName(): Annotations.Annotation? =
13+
internal fun <T : Documentable> WithExtraProperties<T>.fileLevelJvmName(): Annotations.Annotation? =
1414
extra[Annotations]?.fileLevelAnnotations?.entries?.firstNotNullResult { (_, annotations) -> annotations.jvmNameAnnotation() }
1515

1616
internal fun List<Annotations.Annotation>.jvmNameAnnotation(): Annotations.Annotation? =
1717
firstOrNull { it.isJvmName() }
1818

19-
internal fun Annotations.Annotation.jvmNameAsString(): String? = (params["name"] as? StringValue)?.value
19+
internal fun Annotations.Annotation.jvmNameAsString(): String? = (params["name"] as? StringValue)?.value

plugins/kotlin-as-java/src/main/kotlin/jvmOverloads.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ import org.jetbrains.dokka.model.Annotations
44
import org.jetbrains.dokka.model.Documentable
55
import org.jetbrains.dokka.model.properties.WithExtraProperties
66

7-
internal fun WithExtraProperties<out Documentable>.hasJvmOverloads(): Boolean {
7+
internal fun <T : Documentable> WithExtraProperties<T>.hasJvmOverloads(): Boolean {
88
return extra[Annotations]
99
?.directAnnotations
1010
?.entries
1111
?.any { (_, annotations) ->
1212
annotations.any { it.dri.packageName == "kotlin.jvm" && it.dri.classNames == "JvmOverloads" }
1313
} == true
14-
}
14+
}

plugins/kotlin-as-java/src/main/kotlin/jvmStatic.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import org.jetbrains.dokka.model.Documentable
55
import org.jetbrains.dokka.model.properties.WithExtraProperties
66
import org.jetbrains.kotlin.util.firstNotNullResult
77

8-
internal fun WithExtraProperties<out Documentable>.jvmStatic(): Annotations.Annotation? =
8+
internal fun <T : Documentable> WithExtraProperties<T>.jvmStatic(): Annotations.Annotation? =
99
extra[Annotations]?.directAnnotations?.entries?.firstNotNullResult { (_, annotations) -> annotations.jvmStaticAnnotation() }
1010

1111
internal fun List<Annotations.Annotation>.jvmStaticAnnotation(): Annotations.Annotation? =
12-
firstOrNull { it.dri.packageName == "kotlin.jvm" && it.dri.classNames == "JvmStatic" }
12+
firstOrNull { it.dri.packageName == "kotlin.jvm" && it.dri.classNames == "JvmStatic" }
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
package org.jetbrains.dokka.kotlinAsJava
22

33
import org.jetbrains.dokka.model.Annotations
4-
import org.jetbrains.dokka.model.Documentable
54
import org.jetbrains.dokka.model.properties.WithExtraProperties
65

7-
internal fun WithExtraProperties<out Documentable>.hasJvmSynthetic(): Boolean {
6+
internal fun <T : org.jetbrains.dokka.model.AnnotationTarget> WithExtraProperties<T>.hasJvmSynthetic(): Boolean {
87
return extra[Annotations]
98
?.directAnnotations
109
?.entries
1110
?.any { (_, annotations) ->
1211
annotations.any { it.dri.packageName == "kotlin.jvm" && it.dri.classNames == "JvmSynthetic" }
1312
} == true
14-
}
13+
}

plugins/kotlin-as-java/src/main/kotlin/transformers/JvmNameProvider.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ data class Name(val fqName: String) {
1111
}
1212

1313
class JvmNameProvider {
14-
fun <T> nameFor(entry: T): String where T : Documentable, T : WithExtraProperties<out Documentable> =
14+
fun <T> nameFor(entry: T): String where T : Documentable, T : WithExtraProperties<T> =
1515
entry.directlyAnnotatedJvmName()?.jvmNameAsString()
1616
?: entry.name
1717
?: throw IllegalStateException("Failed to provide a name for ${entry.javaClass.canonicalName}")
1818

19-
fun <T> nameForSyntheticClass(entry: T): Name where T : WithSources, T : WithExtraProperties<out Documentable>, T : Documentable {
19+
fun <T> nameForSyntheticClass(entry: T): Name where T : WithSources, T : WithExtraProperties<T>, T : Documentable {
2020
val name: String = (entry.fileLevelJvmName()?.params?.get("name") as? StringValue)?.value
2121
?: (entry.sources.entries.first().value.path.split("/").last().split(".").first().capitalize() + "Kt")
2222
return Name("${entry.dri.packageName}.$name")

runners/gradle-plugin/api/gradle-plugin.api

+1
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ public class org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilder : org/jetbra
131131
}
132132

133133
public final class org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderExtensionsKt {
134+
public static final fun dependsOn (Lorg/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilder;Lcom/android/build/api/dsl/AndroidSourceSet;)V
134135
public static final fun dependsOn (Lorg/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilder;Lcom/android/build/gradle/api/AndroidSourceSet;)V
135136
public static final fun dependsOn (Lorg/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilder;Lorg/jetbrains/kotlin/gradle/plugin/KotlinSourceSet;)V
136137
public static final fun kotlinSourceSet (Lorg/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilder;Lorg/jetbrains/kotlin/gradle/plugin/KotlinSourceSet;)V

0 commit comments

Comments
 (0)