Skip to content
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

readonly field in companion object with @JvmField doesn't in outer class in javadoc even with kotlin-as-java #2086

Closed
anatawa12 opened this issue Aug 22, 2021 · 0 comments · Fixed by #2681
Labels
bug plugin: kotlin-as-java An issue/PR related to Dokka's kotlin-as-java plugin

Comments

@anatawa12
Copy link

Describe the bug
A clear and concise description of what the bug is

With this class, the field should exist in Class with public static final but exists in Class.Companion with getClass() function.

class Class {
  companion object {
    /** Doc */
    @JvmField
    val field = "value"
  }
}

Expected behaviour
A clear and concise description of what you expected to happen

field should exist in Class with public static final.

Screenshots
If applicable, add screenshots to help explain your problem

image
image

To Reproduce
Steps to reproduce the behavior, ideally with an example project

Dokka configuration
Configuration of dokka used to reproduce the bug

tasks.withType(AbstractDokkaLeafTask::class).all {
    moduleName.set("class-ast tree")
    dependencies {
        plugins("org.jetbrains.dokka:kotlin-as-java-plugin:1.5.0")
    }
    dokkaSourceSets["main"].includes.from("kdoc.md")
}

Installation

  • Operating system: macOS
  • Build tool: Gradle v7.1
  • Dokka version: 1.5.0

Additional context
Add any other context about the problem here

Are you willing to provide a PR?
Providing a PR can drastically speed up the process of fixing this bug

@anatawa12 anatawa12 added the bug label Aug 22, 2021
@anatawa12 anatawa12 changed the title readonly companion field with @JvmField doesn't in outer class in javadoc even with kotlin-as-java readonly field in companion object with @JvmField doesn't in outer class in javadoc even with kotlin-as-java Aug 22, 2021
@MarcinAman MarcinAman added the plugin: kotlin-as-java An issue/PR related to Dokka's kotlin-as-java plugin label Aug 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug plugin: kotlin-as-java An issue/PR related to Dokka's kotlin-as-java plugin
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants