Compilation of `:kotlin-gradle-statistics:test` is broken in gradle
too, so this module is removed from JPS to allow build project with
"Rebuild project" action
Dependency on `:kotlin-uast-base` changed to `implementation` because
project import assumes `shadow` dependency as _Provided_ instead of
_Compile_ in module structure which leads to problem that this
dependency is missing during build (this is bug inside JPS itself)
Limit use-case of UsesKotlinJavaToolchain interface to only Gradle tasks
and allow to query all tasks using
'taskContainer.withType(UsesKotlinJavaToolchain.class)'.
^KT-43095 In Progress
Add method into "kotlin" extension to set toolchain for all tasks.
This will also set toolchain for java compile tasks. Also user may
set toolchain via "java" extension and it will be applied to Kotlin
tasks as well.
^KT-43092 In Progress
Has to split jdk/toolchain setters, because, when toolchain setter is
in the 'UsesKotlinJavaToolchain', Groovy fails to create meta class
on <Gradle 6.7 with ClassNotFoundException.
^KT-43092 In Progress
The way JS compilations are mapped to task requirements were changed from `compilation` objects to compilations's `disambiguatedName` in order to support Gradle configuration cache. This may lead to implicitly adding unwanted dependencies in multi-module projects since compilation's `disambiguatedName` is unique within a module, not within a whole multi-module project.
#KT-47045 Fixed
This reverts commit 15e978dbd3.
Together with the previous revert, this led to multiple failures in
Gradle integration tests:
ConfigurationCacheIT.testIncrementalKaptProject
ConfigurationCacheForAndroidIT.testAndroidKaptProject
KotlinAndroid34GradleIT.testParcelize
KotlinAndroid34GradleIT.testAndroidExtensionsManyVariants
KotlinAndroid36GradleIT.testAndroidWithNewMppApp
KotlinAndroid36GradleIT.testParcelize
KotlinAndroid36GradleIT.testAndroidIcepickProject
We are planning to improve incremental Kotlin compile with a new
approach using classpath snapshot (see
https://youtrack.jetbrains.com/issue/KT-45777 for more details).
The estimated steps will be as follows:
[x] Add a flag for the new approach, disabled by default
[ ] Add tests for the new approach, and update them as we go
[ ] Add computation of classpath snapshot using artifact transforms
[ ] Add computation of classpath snapshot changes
[ ] Ensure incremental compile is fully functional with the new approach
[ ] Measure performance + optimize: Repeat until we see evidence that
the new approach is clearly better than the current approach
[ ] Advertise the flag, and later on enable it by default
This commit is the first step. Although it's simple, it allows further
changes to be made safely without impacting the current approach.
Bug: KT-45777
Test: N/A (will be added in a subsequent change)
Gradle's detached configurations doesn't respect extends from relation
to other configurations due to gradle bug.
In fact extendsFrom isn't required for resolvableMetadataConfiguration
business logic. It is enough to include all originalDependencies to
freshly created detached configuration.
^KT-46417 Fixed
... as that is not supported by the underlying mechanism.
Build service that holds info about the incremnetal compilation
may be instantiated only during execution, and multiple tasks may
try to do that. Because the container which holds info about all
build services is not thread-safe, this change adds synchronization.
Fixes #KT-46820
Previously when kotlin.build.report.enable=true, the build report
contained lines such as:
org.jetbrains.kotlin.gradle.report.TaskRecord@2db49688 was skipped
This commit prints the task name instead of TaskRecord@hashCode so that
it is more readable, like this:
Task ':app:compileDebugKotlin' was skipped
Bug: N/A (Clean up)
Test: Existing tests + manually checked the build report output
Refactor common code into new abstract class
IncrementalCompilationBaseIT to make the code cleaner and easier to
evolve.
Also add a few missing key scenarios for ABI and non-ABI changes in
Kotlin files, and make it consistent with the test for changes in Java
files.
Bug: KT-45777
Test: Updating them
User should instead use KotlinJavaToolchain that will take care of
tracking major java version and provide nicer API.
Gradle will still pass jdkHome value to the compiler, but it should
be changed in Kotlin 1.6 release.
^KT-45611 Fixed