For some test class where most of the sub tests are able to run
warning-mode=fail, we should not disable that warning mode for all
sub tests in that class.
Currently, KotlinPlatformJvmPlugin and KotlinPlatformJsPlugin are
adding expectedBy deps to "compile" configuration which is deprecated
by Gradle. This PR fixes that by replacing "compile" with "api" which
is what we are doing in KotlinPlatformAndroidPlugin.
This PR also makes integration tests running with warning-mode=fail by
default and fixes most of the integration tests. For the remaining tests
to be fixed, we make them run with warning-mode=summary and will fix
them incrementally in following PRs.
Class methods and fields are currently sorted at serialization (see
DescriptorSerializer.sort) and at deserialization (see
DeserializedMemberScope.OptimizedImplementation#addMembers). Therefore,
the contents of the generated stub files are sorted in incremental
builds but not in clean builds.
The consequence is that the contents of the generated stub files may not
be consistent across a clean build and an incremental build, making the
build non-deterministic and dependent tasks run unnecessarily (see
KT-40882).
To work around that, this commit sorts class methods and fields when
outputting stub files.
Bug: KT-40882 (there are actually 2 issues in here; this commit fixes
the first one)
Test: New DeterministicBuildIT + Updated existing test expectation files
If tasks are created eagerly, it is possible for this
mapping to be initalized too early. This causes incremental
compilation to fail, as it will contain mappings only for
projects that have been evaluated thus far.
Fixes KT-43489
KAPT classpath now uses extendsFrom in order to
resolve all configurations as a single graph.
Also, use Configuration.extendsFrom instead of
DependencyHandler.add that is being deprecated
in Gradle 6.7.
Kotlin options are accessed via compilation. Compilation field is marked as transient and so not available after deserializing task from Gradle configuration cache.
Accessing 'isCompatibilityMetadataVariantEnabled' property via project in tasks 'onlyIf' causes Gradle to project instance serialization attempt that fails
(#KT-43141, #KT-43329) Fixed
In POM rewriting logic, ensure that non-serializable entities are
accessed from within project.provider { ... } and their evaluation
results are therefore properly serialized.
Issue #KT-43054 Fixed
Dex can't merge class files from both android-extensions-runtime and parcelize-runtime, so we have to keep only one copy of each class.
Instead of @Deprecated annotations, there are new diagnostics (without quick-fixes yet).
The goal is to allow simple usages (@Parcelize alone) but forbid kotlinx.android.synthetic.Parceler usage.
KotlinProjectStructureMetadata is created by inspecting source sets
with metadata compilation. Single backend common source sets are
currently not supported for metadata compilation and therefore
did not register one. Foreseeing to support this case with KT-42468,
metadata compilation is now created and registered, but just disabled.
This change will include android variants in
KotlinProjectStructureMetadata even when not officially published.
With those variants, the IDE can infer visibility from some module's
"jvmAndAndroidMain" source set to another modules "jvmAndAndroidMain"
KotlinMetadataTargetConfigurator: rename getPublishedCommonSourceSets to getCommonSourceSetsForMetadataCompilation
KotlinMetadataTargetConfigurator: isMetadataCompilationSupported and add comment to getPublishedCommonSourceSets
Re-use androidPluginIds in KotlinPlugin
KotlinAndroidTarget: Create KotlinComponents for non-published variants and mark them with publishable=false
JvmAndAndroidIntermediateSourceSetTest: add KotlinProjectStructureMetadata jvmAndAndroidMain exists in jvm variants test
AbstractAndroidProjectHandler: Add java sources only in post processing
KotlinAndroidTarget: Inline creation of usageContexts
KotlinAndroidTarget.doCreateComponents: filter non-publishable variants when publishLibraryVariantsGroupedByFlavor is enabled
#KT-42383 fixed