"-Xno-kotlin-nothing-value-exception" is needed to temporarily prevent
the problem happening in the composite build with Kotlin/Native
(ClassNotFoundException from KClassImpl.Data).
"-Xno-optimized-callable-references" is added just in case of any
similar problem.
They are used only in main build's .gradle.kts files, so it is more
flexible to define them as extensions - no need to republish
kotlin-build-gradle-plugin when another such property is to be added.
Exclude jdk files form libraries input. Instead add jdk major version
to inputs. JavaCompile task acts same to ignore fluctuations in JDK
implementations since api should remain same
The Android build pipeline can extract embedded proguard configurations
from dependencies and merge them automatically. This adds a conservative
proguard configuration to the kotlin-reflect JVM artifact in support of
that. This focuses mostly on just retaining what's necessary for
kotlin-reflect's own functionality to operate, but could be expanded if
community feedback discovers other good candidate rules.
With this in place - most Android projects using R8 or Proguard should
Just Work™️ with kotlin-reflect.
Broken in f1e3e26e6cd6e38b473ffe1a23b19b68ebb2d11f.
----
> Task :kotlin-reflect:signArchives FAILED
Build time for tasks:
Compiling kotlin: 1.44s (12.33% of total time)
Processing jars: 4.28s (36.75% of total time)
Uncategorized: 5.39s (46.26% of total time)
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':kotlin-reflect:signArchives'.
> Duplicate key Signature kotlin-reflect:jar.asc:asc:
---
#KT-32192 Fixed
Even though kotlin-annotations-jvm.jar itself doesn't contain those
files, ProGuard pulls them from the project dependency of
:kotlin-annotations-jvm on :core:builtins. They are already present in
kotlin-stdlib.jar and are thus not needed in kotlin-reflect.jar
Now it already included. Manually including causes duplicated contents
in resulting files, for example:
1 kotlin.reflect.jvm.internal.impl.load.java.FieldOverridabilityCondition
2 kotlin.reflect.jvm.internal.impl.load.java.ErasedOverridabilityCondition
3 kotlin.reflect.jvm.internal.impl.load.java.JavaIncompatibilityRulesOverridabilityCondition
4 + kotlin.reflect.jvm.internal.impl.load.java.FieldOverridabilityCondition
5 + kotlin.reflect.jvm.internal.impl.load.java.ErasedOverridabilityCondition
6 + kotlin.reflect.jvm.internal.impl.load.java.JavaIncompatibilityRulesOverridabilityCondition
Removing this line fixes that.
Provide additional modular artifacts as a workaround for KT-21266
Update module-info declarations:
- add new packages
- add exports and opens for internal PlatformImplementations
- remove exports of kotlin.coroutines.experimental.*
#KT-27919 Fixed
Replace ones from org.jetbrains.kotlin package with new annotations from kotlin.annotations.jvm.
No need to copy them to compile kotlin-reflect anymore.
Then simplify reflect project more: no sources — no need to pack its direct output.
Do not pass the jars for modules such as descriptors, descriptors.jvm,
etc to `--module-path` because javac assumes that these are separate
modules (even though they're listed later as parts of this module in
`--patch-module), and prohibits to have split packages and foreign
service implementations among them