This is needed for the inliner: since the information about Kotlin type
of the bound receiver is nowhere in the output binary, the inliner will
have no clue how to box inline class values. Moving the boxing outside
the object means the inliner doesn't need to know about it; from its
point of view, the captured value has type `Any`.
* Always filter out the variant name attribute: it is never requested
by consumers, while its presence makes Gradle count it as an
unmatched attribute, sometimes leading to ambiguity;
* Filter out the build type attribute: if all variants have the same
build type, then remove the build type attribute from all variants;
Otherwise, remove the build type attribute from the release variants
in order to make them compatible with all other consumer's build
types.
* Add an opt-out flat for always keeping the attribute:
"kotlin.android.buildTypeAttribute.keep" Gradle property
Issue #KT-38954 Fixed
isTransient with default value as false makes it a bit more readable
Some Compiler Plugins can use file outputs properties to dump some data
there and gradle can support incremental build
with file outputs.
For example it fixes compilation of `:kotlin-ide.kotlin.generators:testClasses`
This commit fixes that Gradle tries to find jars of 202 IDEA in ivy repo of 211 IDEA:
```
* What went wrong:
Execution failed for task ':kotlin-ide.kotlin.tests-common:compileTestKotlin'.
> Could not resolve all files for configuration ':kotlin-ide.kotlin.tests-common:testCompileClasspath'.
> Could not find extensions-211.6693.111.jar (kotlin.build:ideaIC:211.6693.111).
Searched in the following locations:
file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/ideaIC/211.6693.111/artifacts/lib/extensions.jar
file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/ideaIC/211.6693.111/artifacts/extensions.jar
file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/intellij-core/211.6693.111/artifacts/extensions.jar
file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/ideaIC/211.6693.111/artifacts/plugins/ideaIC/lib/extensions.jar
file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/sources/extensions-211.6693.111.jar
file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/ideaIC/211.6693.111/extensions.jar
> Could not find guava-29.0-jre-211.6693.111.jar (kotlin.build:ideaIC:211.6693.111).
Searched in the following locations:
file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/ideaIC/211.6693.111/artifacts/lib/guava-29.0-jre.jar
file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/ideaIC/211.6693.111/artifacts/guava-29.0-jre.jar
file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/intellij-core/211.6693.111/artifacts/guava-29.0-jre.jar
file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/ideaIC/211.6693.111/artifacts/plugins/ideaIC/lib/guava-29.0-jre.jar
file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/sources/guava-29.0-jre-211.6693.111.jar
file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/ideaIC/211.6693.111/guava-29.0-jre.jar
> Could not find asm-all-8.0.1-211.6693.111.jar (kotlin.build:ideaIC:211.6693.111).
Searched in the following locations:
file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/ideaIC/211.6693.111/artifacts/lib/asm-all-8.0.1.jar
file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/ideaIC/211.6693.111/artifacts/asm-all-8.0.1.jar
file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/intellij-core/211.6693.111/artifacts/asm-all-8.0.1.jar
file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/ideaIC/211.6693.111/artifacts/plugins/ideaIC/lib/asm-all-8.0.1.jar
file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/sources/asm-all-8.0.1-211.6693.111.jar
file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/ideaIC/211.6693.111/asm-all-8.0.1.jar
> Could not find streamex-0.7.2-211.6693.111.jar (kotlin.build:ideaIC:211.6693.111).
Searched in the following locations:
file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/ideaIC/211.6693.111/artifacts/lib/streamex-0.7.2.jar
file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/ideaIC/211.6693.111/artifacts/streamex-0.7.2.jar
file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/intellij-core/211.6693.111/artifacts/streamex-0.7.2.jar
file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/ideaIC/211.6693.111/artifacts/plugins/ideaIC/lib/streamex-0.7.2.jar
file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/sources/streamex-0.7.2-211.6693.111.jar
file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/ideaIC/211.6693.111/streamex-0.7.2.jar
```
The approach with doLast doesn't work if the test binary failed.
This patch uses a finalization task instead to ensure that we
process the XML report regardless of whether the tests pass
or fail.