This is needed to remove dependencies from fir modules to
`:core:descriptors` module
What was extracted:
- Modality
- ClassKind
- org.jetbrains.kotlin.name package
"-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.