Fix test failure on Windows, where backslash was not escaped
in a build file. Also, remove obsolete test for Gradle 4.2,
because 4.3 is the minimum supported version.
Earlier, K/N 1.1 was used when testing the kotlin.native.version
property. But this version doesn't support the -no-endorsed-libs
flag add recently. This patch updates K/N version in tests.
- To set custom adapter for kotlin-test, it is necessary to inject adapting
code to webpack's input, so then it is executed inside browser and set
custom adapter
This code will be injected to webpack's input
Fix AbstractScriptDefinitionsOrderTest
Remove updating script dependencies in test because in affects cache behavior: script will be already up to date when highlighting is called for the second time
loadScriptDefinitions is a long running operation, so it shouldn't be called under write lock.
This may cause a freeze when someone else wants to get definitions from the same loader during loading process
^KT-32513 Fixed
When using JDK11, generating stubs for enums is broken.
This commit handles the faulty generation by JDK11 by
fully printing enums in custom implementation of tree
printing.
Test: added JDK11 tests for KAPT stub generation
Switch to Java reflection when getting the ASM version used
to analyze classes. Using Kotlin reflection resulted in the constant
being inlined.
Fixes KT-31291
Fixes KT-33493
When KAPT is unable to run incrementally make sure to
clean directory that contains generated Kotlin sources.
This location is specified using '-Akapt.kotlin.generated'
option.
When analyzing incremental changes in the KAPT task, incremental compilation
can handle directory changes, Java source file changes, jar/.class file changes,
and changes to the ABI structure of the classpath. Anything else should cause
a full recompilation.
Test: KaptIncrementalWithIsolatingApt.testNonIncrementalWithUnrecognizedInputs
- Access underlying fields directly, instead of using accessors. This is
safe since data classes are always final.
- Don't generate a temporary variable in hashCode to use as the
accumulator.
Both optimizations are effectively present in the current JVM backend
and with these changes the generated code is much closer to what the
current backend generates.