Ensure that Gradle plugin dependencies do not include kotlin-stdlib,
kotlin-reflect and other dependencies that are provided by Gradle
runtime.
^KT-41142 Fixed
Without explicit version we cannot use those modules in buildscripts with Gradle 6.8+ because Gradle doesn't set flag `skipPrereleaseCheck` (previously was named `skipMetadataVersionCheck`). This way we make it compatible with all supported versions of Gradle.
Use {de,}capitalizeAsciiOnly and to{Lower,Upper}CaseAsciiOnly where
possible, and stdlib's functions with Locale.US everywhere else.
Otherwise, if the default system locale is Turkish, the capital latin
letter "I" is transformed in toLowerCase to "ı" (see
66bc142f92/libraries/stdlib/jvm/test/text/StringJVMTest.kt (L119)),
which for example breaks the codegen for `intArrayOf` in
KT-25400/KT-43405.
Similarly, lower case latin letter "i" is transformed to "İ".
#KT-13631 Fixed
#KT-25400 Fixed
#KT-43405 Fixed
Java Properties format is extremely trivial and does not support any
kind of references or variables. It makes konan.properties repetitive.
This commits adds support of perl-like `$` sigil which allows to
reference properties inside values.
A fix for KT-37550 requires us to stop using system properties when
the compiler is started from Gradle. This patch stops reading the
konan.home property to determine a path to the compiler and requires
this path to be explicitly specified in a constructor of the
Distribution class.
Issue #KT-37550
The sysroot for linux_mips doesn't contain one of platform
libs available for Linux (zlib). So we need to put def-files
to the K/N distribution on a per-target basis instead of putting
a single set of def-files for all targets of the same OS.
Corresponding change in the K/N repository:
https://github.com/JetBrains/kotlin-native/pull/4023
This patch take this change into account at the Gradle plugin side.
Since 1.4, a regular K/N distribution will not contain prebuilt
platform libraries, so the libraries must be generated at the
user side.
This patch adds support for such generation to the MPP Gradle
plugin. The generation itself is performed by separate utility
provided by the K/N compiler distribution. The plugin checks
existence of platform libraries for required targets and starts
this utility if some some of these libraries are missing. Building
caches for platform libraries is also performed at this step.
The patch also adds some project properties allowing a user to
workaround potential problems. User will be able to:
- Use a special distribution with prebuilt platform libraries.
- Force building platform libraries in the good old sourcecode mode
in case of some issues with the new metadata mode.
Kotlin/Native counterpart: https://github.com/JetBrains/kotlin-native/pull/3829.
Issue #KT-32931 Fixed
`resolveSingleFileKlib` by default doesn't support klibs with
non-default ir providers. In case of cache generation for native interop
libraries we need to override this behavior because they have
ir_provider=kotlin.native.cinterop.
Detect when it's really necessary to run commonizer. Resolve Kotlin/Native
platform dependencies. Add dependencies to the proper Gradle configurations.
Note: The most common source sets such as "commonMain" and "commonTest"
should not be used as Native intermediate source sets.