-
Notifications
You must be signed in to change notification settings - Fork 286
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
Switching to Kotlin Multiplatform for JVM use #1654
Switching to Kotlin Multiplatform for JVM use #1654
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with this as a starting point, but I would prefer it only be done for the main artifact.
I'll also note that the biggest inhibitor to doing this work already is needing something like https://youtrack.jetbrains.com/issue/KT-34668 or https://youtrack.jetbrains.com/issue/KT-20427. I tried migrating the project many years ago and found the duplication/indirection needed to be too much to bear. |
@JakeWharton |
305930d
to
b85cfb6
Compare
I have applied the KMP plugin exclusively to the kotlinpoet module. Please review the changes and let me know if there are any concerns or suggestions for improvement. |
I don't know why, but it seems that the format has not been applied to the main branch.
|
Add the exclude, please. Basically assume whatever is in the file currently is correct. |
Oh, sorry, I overlooked the 'targetExclude' in the kotlinpoet module. I've fixed it since the source set name changed. |
TypeNameTest and JavaClassWithArrayValueAnnotation are Java classes in the test. We can separate the Java test module. But it may take some maintenance costs. What do you think? |
I was able to run the Java-related tests. 564b448 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this all looks great, but I'm not sure we can land it without figuring out the Dokka situation because that's a bit of a blocker.
564b448
to
06bfb03
Compare
d8d8e0f
to
6ede2fd
Compare
I've applied the workaround for Dokka from this link: Kotlin/dokka#3122. Now, we can view the Dokka report. |
Any update ? |
Note that merging this does not immediately change the supported targets. It's still JVM only. |
tasks.named<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>("compileTestKotlinJvm") { | ||
compilerOptions { | ||
freeCompilerArgs.add("-opt-in=com.squareup.kotlinpoet.DelicateKotlinPoetApi") | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a DSL for this we can use in a follow-up
#304
This Pull Request aims to transition our codebase from org.jetbrains.kotlin.jvm to org.jetbrains.kotlin.multiplatform with JVM configuration. The primary intention behind this shift is to establish a foundation for adaptation to other platforms in the future.
Additionally, I encountered an issue when trying to run Dokka with a single-target multiplatform project using Kotlin 1.9.0. As a workaround, I've had to comment out the Dokka-related processes for now. You can find more information about this issue here: Kotlin/dokka#3038
Please review these changes, and let me know if there are any concerns or suggestions. Thanks!