Skip to content

java.lang.OutOfMemoryError: Java heap space  #3885

@mahozad

Description

@mahozad

Describe the bug
When upgrading Dokka from 1.9.20 to 2.0.0-Beta, executing dokkaGenerate task fails:

...
> Task :wavy-slider:dokkaGenerateModuleHtml
> Task :wavy-slider:dokkaGeneratePublicationHtml

java.lang.OutOfMemoryError: Java heap space
Dumping heap to java_pid37140.hprof ...
java.lang.OutOfMemoryError: Java heap space
Dumping heap to java_pid20352.hprof ...
Heap dump file created [804336399 bytes in 7.145 secs]

> Task :wavy-slider:dokkaGenerateModuleHtml FAILED
Heap dump file created [804312093 bytes in 6.518 secs]
> Task :wavy-slider:dokkaGeneratePublicationHtml FAILED

Expected behaviour
Should generate HTML output.

To Reproduce
Please checkout this commit and apply the below dokka configs in library/build.gradle.kts and run ./gradlew wavy-slider:dokkaGenerate

Dokka configuration
gradle.properties:

org.jetbrains.dokka.experimental.gradle.pluginMode=V2EnabledWithHelpers

library/build.gradle.kts:

dokka {
    moduleName = "Hello"

    dokkaSourceSets.configureEach {
        reportUndocumented = true
        enableJdkDocumentationLink = true
        enableAndroidDocumentationLink = true
        enableKotlinStdLibDocumentationLink = true
        jdkVersion = libs.versions.java.get().toInt()
    }

    pluginsConfiguration.html {
        customStyleSheets.from(file("../asset/logo-styles.css"))
        customAssets.from(file("../asset/logo-icon.svg"))
        separateInheritedMembers = true
    }
}

Installation

  • Operating system: Windows
  • Build tool: Gradle v8.10.2
  • Dokka version: 2.0.0-Beta

Additional context
Dokka 1.9.20 worked properly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions