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

Unable to run dokka with single target multiplatform project and kotlin 1.9.0 #3038

Closed
atyrin opened this issue Jun 8, 2023 · 2 comments
Closed
Labels
bug regression An issue/bug that appeared after recent changes runner: Gradle plugin An issue/PR related to Dokka's Gradle plugin

Comments

@atyrin
Copy link
Contributor

atyrin commented Jun 8, 2023

Dokka tasks for a multiplatform project with a single target fail with

* Exception is:
org.gradle.api.internal.tasks.TaskDependencyResolveException: Could not determine the dependencies of task ':single-target-mpp-module:dokkaHtml'
Caused by: java.lang.UnsupportedOperationException: Empty collection can't be reduced.
	at org.jetbrains.dokka.gradle.kotlin.KotlinClasspathUtilsKt.classpathOf(kotlinClasspathUtils.kt:83)
	at org.jetbrains.dokka.gradle.kotlin.KotlinSourceSetGistKt$gistOf$3.call(KotlinSourceSetGist.kt:22)
	at org.jetbrains.dokka.gradle.kotlin.KotlinSourceSetGistKt$gistOf$3.call(KotlinSourceSetGist.kt)

Installation

  • Dokka version: 1.8.20
  • Kotlin Gradle plugin version: 1.9.0-Beta
@atyrin atyrin added the bug label Jun 8, 2023
@IgnatBeresnev IgnatBeresnev added runner: Gradle plugin An issue/PR related to Dokka's Gradle plugin regression An issue/bug that appeared after recent changes labels Jun 9, 2023
@IgnatBeresnev
Copy link
Member

Note: the problem is in Dokka's Gradle plugin, in the code about classpath and dependency resolution, and it appeared because KGP 1.9.0 started returning different compilations as compared to KGP 1.8.20.

vmishenev added a commit that referenced this issue Jul 21, 2023
* Update Kotlin Gradle Plugin to 1.9.0

* Update Android Gradle Plugin to 4.2.2

* Introduce convention plugin for Gradle runner

gradle/gradle#8301

* Fix unit test `common, jvm and macos source sets with kotlin multiplatform`

* Update compiler to 1.9.0

* Update integration test

* Add empty target for WASM integration test to avoid single target project

See #3038

* Remove unused `plugins.shadow` from toml
IgnatBeresnev pushed a commit that referenced this issue Jul 21, 2023
* Update Kotlin Gradle Plugin to 1.9.0

* Update Android Gradle Plugin to 4.2.2

* Introduce convention plugin for Gradle runner

gradle/gradle#8301

* Fix unit test `common, jvm and macos source sets with kotlin multiplatform`

* Update compiler to 1.9.0

* Update integration test

* Add empty target for WASM integration test to avoid single target project

See #3038

* Remove unused `plugins.shadow` from toml

(cherry picked from commit f5393dd)
swankjesse pushed a commit to square/okio that referenced this issue Jul 27, 2023
The new okio-wasifilesystem module is a multiplatform module
with a single artifact. This configuration is broken on the
latest version of Dokka.
    Kotlin/dokka#3038
swankjesse pushed a commit to square/okio that referenced this issue Jul 27, 2023
The new okio-wasifilesystem module is a multiplatform module
with a single artifact. This configuration is broken on the
latest version of Dokka.
    Kotlin/dokka#3038
@IgnatBeresnev
Copy link
Member

IgnatBeresnev commented Aug 16, 2023

We found a workaround in Dokka for this particular issue, and the fix will be released in Dokka 1.9.0, which should hopefully happen next week.

I've provided more details on single-target multiplatform project support in general and on this particular issue in #3122.

To reduce the spread of information and keep the discussion in a single place, I'll close this issue in favour of #3122 - let's continue there if anyone has anything to add.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug regression An issue/bug that appeared after recent changes runner: Gradle plugin An issue/PR related to Dokka's Gradle plugin
Projects
None yet
Development

No branches or pull requests

2 participants