Releases: frankois944/spm4Kmp
v0.3.1
v0.3.0
New
Add linkerOpts
and compilerOpts
input parameters for each of the products exported to Kotlin, even the bridge.
These flags will be added to the definition file and used by cinterop.
v0.2.0
v0.1.1
Fix
- Some exported dependency didn't have the correct umbrella header set during the cinterop task, now you can access to the ObjC API correctly
Improvement
- Better sync performance by avoiding building non-modified dependency
v0.1.0 : the MVP
The MVP
This release is the first one, and I assume, the good one for continuing the project after experimentation about cInterop and SPM repository; it's the correct approach.
So, finally, this plugin does the equivalent of the CocoaPods Plugins but with the capacity to create a bridge between pure Swift and Kotlin. With that, we can integrate external Swift dependency into your Kotlin project, the Swift Import !
Still remains some issues on SPM package integration, so please, make an issue and I will try to fix that.
What's new ?
- Better compatibility with SPM package
- Increase performance on sync
v0.0.9
Important
#43 : For compatibility issues with Xcode, when there is at least one dependency inside the configuration, a local package is generated and must be added to your Xcode project.
Before, the package was generated when at least one dependency was exported, but for non-exported dependency, some resources were missing and could cause issues (rejection, crash, etc.).
Note: When updating the plugin configuration, please reset the package cache of your Xcode project to apply the modification.
Fix
#42 : The plugin won't make an error if the Gradle runs on a non-macOS host.
0.0.8
-
Change the location of the embedded swift folder from
src/swift
tosrc/swift/[cinteropname/configName]
0.0.7
- Fix unwanted generation of the local package when no product is exported
0.0.6
Breaking change
- Update the way the dependencies are declared
Before
swiftPackageConfig {
create("nativeExample") { // same name as the one in `cinterops.create("...")`
// add your own swift code and/or your external dependencies, it's optional
dependency(
// available only in your own Swift code
SwiftDependency.Package.Remote.Version(
url = "https://github.com/krzyzanowskim/CryptoSwift.git", // Repository URL
names = listOf("CryptoSwift"), // Library names
version = "1.8.4", // Package version
)
)
dependency(
// available in the Swift and Kolin code
SwiftDependency.Package.Remote.Version(
url = "https://github.com/firebase/firebase-ios-sdk.git", // Repository URL
names = listOf("FirebaseAnalytics", "FirebaseCore"), // Libraries from the package
packageName = "firebase-ios-sdk", // (Optional) Package name, can be required in some cases
version = "11.6.0", // Package version
exportToKotlin = true // Export to Kotlin for usage in shared Kotlin code
)
)
}
}
After
swiftPackageConfig {
create("nativeExample") { // same name as the one in `cinterops.create("...")`
// add your embedded swift code and/or your external dependencies, it's optional
dependency(
SwiftDependency.Package.Remote.Version(
// Repository URL
url = URI("https://github.com/firebase/firebase-ios-sdk.git"),
// Libraries from the package
products = {
// Export to Kotlin for use in shared Kotlin code and use it in your swift code
add("FirebaseCore", "FirebaseAnalytics", exportToKotlin = true)
// Add FirebaseDatabase to your swift code but don't export it
add(ProductName("FirebaseDatabase"))
},
// (Optional) Package name, can be required in some cases
packageName = "firebase-ios-sdk",
// Package version
version = "11.6.0",
),
SwiftDependency.Package.Remote.Version(
url = URI("https://github.com/krzyzanowskim/CryptoSwift.git"),
version = "1.8.1",
products = {
// Can be only used in your "src/swift" code.
add("CryptoSwift")
},
),
// see SwiftDependency class for more use cases
)
}
}
0.0.5
- Better support (by a lot) for importing your own code and third-party dependencies to your Kotlin
A local package need to be added to the xcode project when exporting swift code
- A fully working example for using the plugin with iOS
- Better performance and caching
- Bug fix and a lot of improvement