Conversation
// Conflicts: // src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/ShadowJavaPlugin.kt
da479ea to
c7f8fef
Compare
12f42f4 to
b0f310f
Compare
b0f310f to
0ea49ac
Compare
This reverts commit 48a84b4.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
antohaby
reviewed
Mar 28, 2025
| override fun apply(project: Project) { | ||
| with(project) { | ||
| val kmpExtension = extensions.getByType(KotlinMultiplatformExtension::class.java) | ||
| val kotlinJvmMain = kmpExtension.jvm().compilations.named("main") |
There was a problem hiding this comment.
Please don't call jvm(). Because this method declares a jvm target in KMP project. And users should do that explicitly.
More over, they can specify a custom name for their jvm target.
The correct API is to lazily iterate over targets collection. And check for KotlinJvmTarget instance.
kmpExtension.targets.configureEach { target ->
if (target is KotlinJvmTarget) // do configuration here
}
Member
Author
There was a problem hiding this comment.
You are right, I didn't know how to defer this. Thanks for the reporting. Creating a new issue in #1377.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.