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

Support Kotlin Multiplatform Plugin jvm.withJava() #84

Open
sellmair opened this issue Jul 5, 2023 · 3 comments
Open

Support Kotlin Multiplatform Plugin jvm.withJava() #84

sellmair opened this issue Jul 5, 2023 · 3 comments

Comments

@sellmair
Copy link

sellmair commented Jul 5, 2023

The current code

plugins {
    kotlin("multiplatform")
}

kotlin {
    jvm().withJava()
}

Will not apply the java plugin anymore, but relies only on java-base starting from Kotlin 1.9.20.

This might lead to issues for projects migrating to Kotln 1.9.20 using animal sniffer, as relevant tasks might not be configured anymore.

See:

https://youtrack.jetbrains.com/issue/KT-59595/KotlinJvmTarget.withJava-Switch-implementation-from-java-to-java-base-plugin

sellmair added a commit to Kotlin/kotlinx.serialization that referenced this issue Jul 5, 2023
To support Kotlin Multiplatform 1.9.20 and forward
together with the animalsniffer plugin

See:
xvik/gradle-animalsniffer-plugin#84
https://youtrack.jetbrains.com/issue/KT-59595
sellmair added a commit to Kotlin/kotlinx.serialization that referenced this issue Jul 5, 2023
To support Kotlin Multiplatform 1.9.20 and forward
together with the animalsniffer plugin

See:
xvik/gradle-animalsniffer-plugin#84
https://youtrack.jetbrains.com/issue/KT-59595
sandwwraith pushed a commit to Kotlin/kotlinx.serialization that referenced this issue Jul 5, 2023
To support Kotlin Multiplatform 1.9.20 and forward
together with the animalsniffer plugin

See:
xvik/gradle-animalsniffer-plugin#84
https://youtrack.jetbrains.com/issue/KT-59595
xvik added a commit that referenced this issue Jul 5, 2023
Required for kotlin multiplatform 1.9.20 activating only base plugin with jvm().withJava() (#84)
@xvik
Copy link
Owner

xvik commented Jul 5, 2023

I changed plugin activation from JavaPlugin into JavaBasePlugin and checked it for id 'org.jetbrains.kotlin.multiplatform' version '1.9.0-RC'

Seems to be working. I will release new plugin version today

@xvik
Copy link
Owner

xvik commented Jul 5, 2023

released

JesusMcCloud pushed a commit to a-sit-plus/kotlinx.serialization that referenced this issue Jul 5, 2023
To support Kotlin Multiplatform 1.9.20 and forward
together with the animalsniffer plugin

See:
xvik/gradle-animalsniffer-plugin#84
https://youtrack.jetbrains.com/issue/KT-59595
sandwwraith pushed a commit to Kotlin/kotlinx.serialization that referenced this issue Jul 11, 2023
To support Kotlin Multiplatform 1.9.20 and forward
together with the animalsniffer plugin

See:
xvik/gradle-animalsniffer-plugin#84
https://youtrack.jetbrains.com/issue/KT-59595
(cherry picked from commit a87b0f1)
@sellmair
Copy link
Author

Thank you very much! This was very fast!
1.9.0 did not yet change the behaviour here. The plan is to change it with 1.9.20. Let me know if you want to get builds to try this out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants