Not publishing this attribute fixes the consumers that don't set it.
Those may encounter either a conflict of Kotlin <= 1.5.31 rule on
{JVM, Android} -> Android vs Gradle rule
{standard-jvm, android} -> standard-jvm (causing disambiguation
failures). Or they may run Gradle < 7.0 which doesn't have
disambiguation rules for `org.gradle.jvm.environment` and therefore
treats it as an ordinary extra attribute, thus eventually preferring
variants which don't have it if no other disambiguation rule worked
(again causing disambiguation failures since some rules may prefer the
variants where this attribute *is* set).
Also set a "non-jvm" value of this attribute for non-JVM variants for
project-to-project dependencies in order to "align" them so that Gradle
doesn't prefer variants not marked with this attribute.
Extend the set of dependency resolution tests which check
compatibility of different kinds of Android & JVM consumers against
project and published library: add Kotlin 1.5.31 consumers, also check
consumption with different Gradle version than the one which did the
publication.
Issue #KT-49835
Kotlin Libraries
This part of the project contains the sources of the following libraries:
- kotlin-stdlib, the standard library for Kotlin/JVM, Kotlin/JS and its additional parts for JDK 7 and JDK 8
- kotlin-reflect, the library for full reflection support
- kotlin-test, the library for multiplatform unit testing
- kotlin-annotations-jvm, the annotations to improve types in the Java code to look better when being consumed in the Kotlin code.
These libraries are built as a part of the root Gradle project.
Kotlin Maven Tools
This area of the project is the root for Maven build.
You can work with the maven modules of this maven project in IDEA from the root IDEA project. After importing you'll be able to explore maven projects and run goals directly from IDEA with the instruments on the right sidebar.
Building
You need to install a recent (at least 3.3) Maven distribution.
Before building this Maven project you need to build and install the required artifacts built with Gradle to the local maven repository, by issuing the following command in the root project:
./gradlew install
Note: on Windows type
gradlewwithout the leading./
This command assembles and puts the artifacts to the local maven repository to be used by the subsequent maven build. See also root ReadMe.md, section "Building".
Then you can build maven artifacts with Maven:
mvn install
If your maven build is failing with Out-Of-Memory errors, set JVM options for maven in MAVEN_OPTS environment variable like this:
MAVEN_OPTS="-Xmx2G"