Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update: host requirements #4549

Open
wants to merge 1 commit into
base: 2-1-0-doc-update
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions docs/topics/multiplatform/multiplatform-publish-lib.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,23 @@ in the publication's scope.

## Host requirements

Except for Apple platform targets, Kotlin/Native supports cross-compilation, allowing any host to produce needed artifacts.
Kotlin/Native supports cross-compilation, allowing any host to produce necessary `.klib` artifacts.

To avoid any issues during publication:
* Publish only from an Apple host when your project targets Apple operating systems.
* Publish all artifacts from one host only to avoid duplicating publications in the repository.

Maven Central, for example, explicitly forbids duplicate publications and fails the process. <!-- TBD: add the actual error -->
To produce artifacts for projects with Apple targets, you'd normally need an Apple machine.
However, if you want to use other hosts, you can set this [Experimental](components-stability.md#stability-levels-explained)
option in your `gradle.properties` file:

```none
kotlin.native.enableKlibsCrossCompilation=true
```

> To build [final binaries](multiplatform-build-native-binaries.md) for Apple targets, you still need to use a Mac machine.
>
{style="note"}

To avoid any issues during publication, publish all artifacts from one host only to avoid duplicating publications in the
repository. Maven Central, for example, explicitly forbids duplicate publications and fails the process.
<!-- TBD: add the actual error -->

### If you use Kotlin 1.7.0 or earlier {initial-collapse-state="collapsed" collapsible="true"}

Expand Down