Skip to content

Commit

Permalink
update: add new attribute to multiplatform libraries publication
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahhaggarty committed May 15, 2024
1 parent 23a0c0b commit be2867f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docs/topics/multiplatform/multiplatform-publish-lib.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,3 +208,16 @@ you can configure and disable sources publication with the `withSourcesJar()` AP
linuxX64()
}
```

## Disable JVM environment attribute publication

Starting with Kotlin 2.0.0, the Gradle attribute [`org.gradle.jvm.environment`](https://docs.gradle.org/current/userguide/variant_attributes.html#sub:jvm_default_attributes)
is automatically published with all Kotlin variants to help distinguish between JVM and Android variants of Kotlin Multiplatform
libraries. The attribute indicates which library variant is suited for which JVM environment, and Gradle uses this information to help with
dependency resolution in your projects. The target environment can be "android", "standard-jvm", or "no-jvm".

You can disable the publication of this attribute by adding the following Gradle property to your `gradle.properties` file:

```none
kotlin.publishJvmEnvironmentAttribute=false
```

0 comments on commit be2867f

Please sign in to comment.