Github Release vs Package #270
Replies: 1 comment
-
Android dependencies use Gradle/Maven. It wouldn't make sense to put them in a different location. SPM dependencies are very different. We're using GitHub release files as a place to store the binary. It makes more sense for SPM. However, if you want to push SPM binaries to Maven and, in this case, GitHub Packages, you can. The quick start tutorial is not the only configuration you can have, but where you ultimately put binaries is up to you. Be aware, though, putting the XCFramework zip file in Maven doesn't mean SPM uses maven directly. It's just a place to store a binary, and SPM directly uses the url. XCFramework publishing to Maven is a bit of a hack.
Well, that depends on you and your project. If you were publishing an Xcode framework directly from your Android repo, you probably wouldn't need to publish Android. In summary, KMMBridge is a tool for publishing Xcode binaries built by KMP. It has nothing to do with Android. KMMBridge provides several options for publishing these binaries. The KMMBridge SPM Quick Start is a tutorial for getting something running quickly. It is not meant to be the default way to use KMMBridge. It was designed to get something working with minimal editing from the user. CI configuration for production projects is usually complex and very specific to the project. That means it usually takes a lot of work to set up. In the case of KMP, the person setting up publishing is usually an Android developer, who generally won't have any experience setting up Xcode builds. In addition, SPM is not very compatible with languages other than Swift and Objective-C, and there is almost zero practical support anywhere about the process. The quick start tutorial is a minimal configuration which avoids many of the pitfalls of setting up KMP Xcode publishing. To configure KMP publishing suited to a specific environment, you'll likely have to learn more about Xcode publishing itself, and read through the various KMMBridge options, or implement an extension yourself. |
Beta Was this translation helpful? Give feedback.
-
Summary
"It uses GitHub Release artifacts to hold the Xcode Framework binary, and GitHub Packages for the (optional) Android dependencies."
Details
Hello! I'm trying to understand your stuff but I don't understand above statement. Why would you put both distribution stuff in separate places? Why would Android be optional? If I do a KMM lib I need it for multiple platforms.
My need is to be able to distribute binaries for iOS and Android in a protected manner, meaning clients should not have access to the code, only the binaries, still not sure this is possible with your solution?
Reproduction
Expected result
Current state
Possible Fix
Beta Was this translation helpful? Give feedback.
All reactions