How do I set the library version number for a KMM library (iOS and Android)? Do I set it in the gradle file for Android? And do I have to generate an Xcode project and set the value in the project?
Or is there a simple way to have it set for both in the gradle file(s)?
l
Landry Norris
05/03/2023, 2:51 PM
Depends how the iOS library is distributed. If it's a Kotlin library, you just set the version variable in build.gradle.kts, and maven publish will recognize this for all maven publications in that module. If via cocoapods or swift package manager, the gradle plugin will ask you to give a version.
d
David Nedrow
05/03/2023, 3:04 PM
Interesting. There's a builtin SPM routine in the KMM gradle plugin?
I've using the following plugin to try and create the package. It seams to work, but signing is an issue.
io.github.luca992.multiplatform-swiftpackage
l
Landry Norris
05/03/2023, 3:05 PM
There's nothing built in for now. There's a few third party ones, including the one you mention.