https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
m

magnumrocha

03/22/2024, 4:32 PM
does anyone already have this situation when try to publish a Multiplatform library (JVM, Android and iOS) ?
Copy code
Reason: Task ':konnection:publishAndroidDebugPublicationToMavenRepository' uses this output of task ':konnection:signAndroidReleasePublication' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
p

Pablichjenkov

03/22/2024, 4:33 PM
Is a known issue
m

magnumrocha

03/22/2024, 4:33 PM
ok, is there a workaround?
p

Pablichjenkov

03/22/2024, 4:34 PM
val signingTasks = tasks.withType<Sign>() tasks.withType<AbstractPublishToMaven>().configureEach { dependsOn(signingTasks) }
a

Adam S

03/22/2024, 4:36 PM
m

magnumrocha

03/22/2024, 4:38 PM
nice, problem solved! thanks guys 👍
a

Adam S

03/22/2024, 4:42 PM
btw
dependsOn(signingTasks)
means that the signing tasks for all publications will always be triggered, whether they are needed or not.
mustRunAfter(signingTasks)
should also fix it, but won't trigger tasks unnecessarily.
👍 2