Ant 1.8.2 has the API (namely,
CompilerAdapterExtension#getSupportedFileExtensions) which will allow to fix a
critical bug in <withKotlin/> task (see KT-7870)
Users' Java code will not break in common cases (when passing functions to
Kotlin), and deprecation warnings will be reported.
Provide an inspection with a quick fix which allows to replace deprecated
function class usages to the new classes. Include this fix to the "code
cleanup" action
Reflection interfaces (interfaces in kotlin.reflect.* in core/builtins/) are
now fully considered as built-ins and can be accessed via KotlinBuiltIns. This
increases runtime size by ~20kb, but only because KotlinBuiltIns is static and
is therefore constructed only via resource loading from the compiler classpath
at the moment. As soon as it's possible to inject KotlinBuiltIns to the
particular resolution process, the metadata on JVM will be loaded via standard
annotation mechanism (kotlin.jvm.internal.KotlinClass/KotlinPackage) and wasted
runtime space will be reclaimed
Similar to "new-kotlinc" macro. Before this change bootstrap-runtime appeared
earlier on the classpath than the newly built compiler, and so everything was
breaking when e.g. built-ins metadata had been updated (old version in the old
runtime was found earlier than the newer version in the compiler)
Files starting with dot are considered as hidden on Unix systems, and sometimes
are ignored by the tools. For example, Android build tools do not package such
files to the resulting application, which causes Kotlin reflection to fail
there
#KT-7088 Fixed
It was error-prone, not very useful (only a couple seconds saved on a 3min
build), and in fact did not work since 5194310d, because <skip> element was
failing inside the default javac
It's necessary to use bootstrap-compiler and runtime but new compiler in classpath when increasing ABI.
For example ABI was X, then we increase it to X':
- It compiles in Bootstrap (B) build with compiler that knows
old ABI version, so compiled compiler (C1) will still have version X, but new
runtime's version is X' (R1).
So when we compile android-compiler-plugin each part has version X.
- Then project compiles by new compiler (C1)
(that class-files have ABI version X, but it knows about X') in main build.
Here compiled compiler (C2) will have X' version of class-files,
either has runtime (R1) compiled on previous stage.
On this step android-compiler-plugin will be compiled fine by C1 and with C2, R1.
Reflection will be distributed in a separate jar and not in kotlin-runtime.jar
for two primary reasons:
- Reflection implementation at the moment takes almost 2Mb
- Separate libraries for separate features is a technique encouraged by Maven,
and it's inconvenient to make it different in the compiler distribution
Generate K*Function as a supertype for a function reference instead of
K*FunctionImpl; this will allow one binary library to be used with or without
reflection