I need to publish a KMM library to a maven repo fo...
# multiplatform
l
I need to publish a KMM library to a maven repo for android only, and publish to a cocoapods repo for iOS only. When I set up maven publish, the multiplatform plugin applies publishing for all targets. Is there a way to get the behaviour of android publishing only? This library is for internal use and is pulled into a native iOS project, so publishing the iOS binaries to maven just wastes time and build minutes.
I think running
publishKotlinMultiplatform publishAndroidDebug publishAndroidRelease
will do this, but is there a good way to make
publish
do this?
n
You could disable the publishing tasks you don’t want. Also IIRC Kotlin targets have a mavenPublication { } block that you can use to access the publication (to get the name for example)