![]() ![]() Still, it's not 100% finished, so changes are possible (including ones based on your own feedback). It's almost done, user feedback is especially important now. We decided to productize this idea, but it hasn't reached the final shape yet.īeta means "you can use it, we'll do our best to minimize migration issues for you": If it doesn't work out, we may drop it any minute.Īlpha means "use at your own risk, expect migration issues": We are just trying out an idea and want some users to play with it and give feedback. Here's a quick guide to these stability levels and their meaning:Įxperimental means "try it only in toy projects": ![]() We mark them as Experimental, Alpha or Beta depending on how quickly each component is evolving and how much risk the users are taking when adopting it. Some of them are very early stage, some are more mature. Among such stable components are, for example, the Kotlin compiler for the JVM, the Standard Library, and Coroutines.įollowing the Feedback Loop principle we release many things early for the community to try out, so a number of components are not yet released as Stable. Many of these components were officially released as Stable which means that they are evolved in the backward-compatible way following the principles of Comfortable Updates and Keeping the Language Modern. Tasks.The Kotlin language and toolset are divided into many components such as the compilers for the JVM, JS and Native targets, the Standard Library, various accompanying tools and so on. Create a task building a fat framework. Use export explicitly for the dependencies you need to directly access from your Swift or Objective-C code. In most cases, you don't need to add all these dependencies to the framework API. This could increase both compilation time and binary size. It is not recommended to use transitiveExport: it adds all transitive dependencies of the exported dependencies to the framework. If set to true, the declarations of the library bar are exported as well. You can change this behavior using the transitiveExport option. This means that if you export the library foo depending on the library bar, only methods of foo are added to the output framework. This disables dead code elimination for the exported dependency (and for its dependencies, to some extent).īy default, export works non-transitively. The compiler adds the code from this dependency to the framework, even if you use a small fraction of it. When you export a dependency, it includes all of its API to the framework API. You can export only api dependencies of the corresponding source set. Usage of several Kotlin/Native frameworks in a Swift application is limited, but you can create an umbrella framework and export all these modules to it. It's possible to export different sets of dependencies to different binaries.įor example, you implement several modules in Kotlin and want to access them from Swift. Use the following factory methods to declare elements of the binaries collection.Īpi 'org.example:not-exported-library:1.0'Įxport 'org.example:exported-library:1.0' This means if you distribute a Kotlin/Native-compiled final binary, you should always include necessary license files into your binary distribution. The only binary available by default is a debug test executable that lets you run unit tests from the test compilation.īinaries produced by the Kotlin/Native compiler can include third-party code, data, or derived work. The kotlin-multiplatform plugin doesn't create any production binaries by default. This property represents a collection of native binaries built for this target in addition to the default *.klib artifact and provides a set of methods for declaring and configuring them. To declare final native binaries such as executables or shared libraries, use the binaries property of a native target. Check out the new experimental Kotlin/Native DSL, it should be more efficient and easier to use.īy default, a Kotlin/Native target is compiled down to a *.klib library artifact, which can be consumed by Kotlin/Native itself as a dependency but cannot be executed or used as a native library. This page describes the previous approach to building native binaries.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |