Simplifies and make it aligned with official documentation, which
removes some old workarounds. Additionally, it enables publication of
Gradle metadata file, which is required for plugin variants feature
support.
Instead of using 'gradleApi()' as Gradle API dependency, which provides
build current Gradle version api, now setup is using
"dev.gradleplugins:gradle-api" artifacts with specific Gradle version.
This allows to have more fine-grained Gradle support for removed apis.
^KT-49227 In Progress
When generating synthetic Function{N+1}.invoke implementations for
SuspendFunction{N} subclasses, use SYNTHETIC_OFFSET instead of
suspend invoke function location offsets.
This location is more suitable for generated synthetic functions.
Additionally, this fixes the case when suspend invoke is fake override:
fake overrides use UNDEFINED_OFFSET, so the generated function was
getting UNDEFINED_OFFSET as well, leading to incorrect debug
information.
Fix suspendFunctionAsSupertype.kt and suspendFunctionAsSupertypeCall.kt
ExperimentalUsageChecker.checkCompilerArguments() will crash if there was an error running analyze().
This checks for the error first so it can be properly reported.
To avoid extra indirection via `IrElement$DefaultImpls` for elements
whose `transform` uses the default implementation. And also, to simplify
migration to auto-generated IR tree.
Presence of 'junit-platform.properties' in the JAR makes JUnit5
IDE tests run in parallel. The IDE infrastructure isn't prepared
for this, and tests fail miserably with a variety of exceptions.
When counting .class files, stop once the required number is reached.
Also, implement simple counting logic directly, it is 25% faster than
using File.walk(). The way this information is used is a heuristic, so
reducing computation cost makes sense.
^KT-41456 Fixed
Because incremental KAPT tries to reuse .class files produced by kotlinc
and javac, it should check for their existence before starting
an incremental run. Otherwise, annotation processors that perform type
validation will fail to run.
Current check counts the number of declared types in processed .java
sources, and it makes sure the total number of .class files in compiled
sources dirs is equal or higher. Otherwise, KAPT runs non-incrementally.
Tests: KaptIncrementalWithIsolatingApt.testMissingKotlinOutputForcesNonIncrementalRun
^KT-41456 In Progress
When storing source information needed for type analysis, store
.java file and .class file information separately. This is because
for class files only declared typed is needed.
Tests: updating existing ones
^KT-41456 In Progress
createTempFile can fail, if you pass non-existent path to kotlin.jps.dir.for.module.files or java.io.tmpdir. Now we try to create non-existent dirs and provide more info if it also fails
#KTIJ-17280 Fixed
New module was added in '52baf7338edcbc877e2ca1b0c7b63665d15f0e80',
however unless it's present in the 'compilerModulesForJps' list,
it's not packed inside the JPS plugin.