mbonnin
12/13/2024, 2:09 PMorg.jetbrains.kotlin.multiplatform
, can I add variants to the "main" publication? In JVM world, I can do this:
val outgoingConfiguration = configurations.consumable("myOutgoingConfiguration") {
attributes {
attribute(Usage.USAGE_ATTRIBUTE, objects.named<Usage>("myUsage"))
}
}.get()
artifacts {
add(outgoingConfiguration.name, myArtifact)
}
// How do I do this in KMP?
(components.get("java") as AdhocComponentWithVariants).addVariantsFromConfiguration(outgoingConfiguration) {}
Is there a KMP equivalent?tapchicoma
12/13/2024, 2:15 PMAnton Lakotka [JB]
12/13/2024, 2:23 PMmbonnin
12/13/2024, 2:24 PMmbonnin
12/13/2024, 2:25 PMAnton Lakotka [JB]
12/13/2024, 2:25 PMmbonnin
12/13/2024, 2:26 PMCLOVIS
12/13/2024, 2:36 PMAnton Lakotka [JB]
12/13/2024, 2:37 PMmbonnin
12/13/2024, 2:48 PMmbonnin
12/13/2024, 2:55 PMrootSoftwareComponent
without reflection?mbonnin
12/13/2024, 2:56 PMkotlin.targets.getByName("jvm").components
but the root component doesn't have a target or does it?Anton Lakotka [JB]
12/13/2024, 2:56 PMmbonnin
12/13/2024, 2:57 PMmbonnin
12/13/2024, 2:58 PMAlexey Illarionov
12/13/2024, 4:20 PMmbonnin
12/13/2024, 4:40 PMKotlinSoftwareComponentWithCoordinatesAndPublication
, not a KotlinTargetSoftwareComponent
, no adhocComponent thermbonnin
12/16/2024, 3:00 PM