This is only valid for Gradle 7.1+, so new plugin variant was added -
"gradle71". For Gradle <=7.0 old convention approach is still used.
^KT-47047 In Progress
Replace loading the whole world IR with loading only exported (reachable) IR.
For that purpose the direct and inverse dependency graph is used.
It is stored in a cache directory and the cache updater keeps it up to date.
If after loading it is found that other files must be also implicitly rebuilt
(see rebuilt reasons below), IR for that files also will be loaded.
This algorithm repeats until the number of implicitly rebuilt files is not 0.
More rebuilt reasons (dirty state) have been added:
- added file: this is a new file;
- modified ir: ir of the file has been updated;
- updated exports: exports from the file have been added or removed
(e.g. a function has been used from another file);
- updated inline imports: imported inline function has been modified
(transitively);
- removed inverse depends: a dependent file has been removed;
- removed direct depends: a dependency file has been removed;
- removed file: this file has been removed.
Incremental cache tests has been refactored:
- The supporting of all rebuilt reasons (dirty states) has been added;
- New file name format "*.$suffix.kt" for the test steps has been allowed,
so the syntax highlight works now;
- Explicit stdlib dependency usage has been removed.
GranularMetadataTransformation requires the metadata for dependency
projects, for every given source set multiple times. This lead
to the metadata being built extremely often, causing a significant
bottleneck during import.
Do not process any dependency that was already processed previously.
When filling up the 'resolvedDependencyQueue' there is already
one filter present, checking that the resolved dependency was not
already visited.
However, this filter is insufficient, since the queue is just an
ArrayDeque and not a set. It happened that many dependencies
were enqueued multiple, multiple times.
The analyzer can now handle the case where a parameter containing an
inline lambda is overwritten with something else. The local variable
remapper still can't handle that, and KT-51950 is caused by a deeper
underlying issue (the slot should't get overwritten in the first place),
but at least the problem is more visible now:
>java.lang.RuntimeException: Trying to access skipped parameter:
> Lkotlin/jvm/functions/Function1; at 2
ClassCodegen bails before generating code if the filter supplied to
the GenerationState rejects it based on the containing file or class
declaration itself.
Objective-c `@end` doesn't need a semicolon, however KMM exported header
file, for instance:
```
__attribute__((swift_name("KotlinIterator")))
@protocol MyProjectKotlinIterator
@required
- (BOOL)hasNext __attribute__((swift_name("hasNext()")));
- (id _Nullable)next __attribute__((swift_name("next()")));
@end;
```
This creates problems with some code checkers that will not expect it
there, so it seems best to remove it.