Commit Graph

103454 Commits

Author SHA1 Message Date
Yahor Berdnikau 73e8fc6183 [Gradle] Always add kotlin-stdlib-wasm
Published kotlin-stdlib with Gradle metadata does not yet include
kotlin-stdlib-wasm variant, so KGP should always add it separately even
if kotlin-stdlib was added into a common source set.

^KT-59000
2023-08-03 14:47:21 +00:00
Yahor Berdnikau 94013b1ff2 [Gradle] Updated logic to add stdlib default dependency published with Gradle metadata
Since Kotlin 1.9.20, Kotlin stdlib is published with Gradle metadata,
which allows Gradle itself to select proper dependency subtypes. Now
stdlib in MPP projects is only added to common dependencies.

The default artifact for JVM was changed from 'kotlin-stdlib-jdk8' to
'kotlin-stdlib'.

^KT-59000 Fixed
2023-08-03 14:47:21 +00:00
Yahor Berdnikau 8154f7ab37 [Gradle] Remove adding stdlib to KPM modules
KPM is deprecated and scheduled for removal

^KT-59000 In Progress
2023-08-03 14:47:21 +00:00
Ilya Gorbunov 21565c6128 [stdlib-mpp] Add dependency constraints to JVM variant, KT-55297 2023-08-03 14:47:21 +00:00
Ilya Gorbunov b0106de209 [stdlib-mpp] Mute legacy kotlin.platform.js plugin integration tests
That plugin is not prepared to distinguish several variants of JS in kotlin-stdlib-js dependency.
2023-08-03 14:47:21 +00:00
Ilya Gorbunov 671451fb67 [stdlib-mpp] publish legacy MPP common metadata additionally in a variant under 'common' classifier 2023-08-03 14:47:21 +00:00
Ilya Gorbunov ff1dbab290 [stdlib-mpp] Extract separate variants of kotlin-test for jsIR and jsV1
Otherwise stdlib-js dependency can't be resolved by spdx plugin
 because stdlib has different variants for legacy and IR JS.

KT-56106
2023-08-03 14:47:21 +00:00
Ilya Gorbunov a9bc8fa402 [stdlib-mpp] Exclude kotlin-stdlib-js/js-ir projects and use kotlin-stdlib instead
- Specify disambiguating attributes in kotlin-dom-api-compat
  compile dependency configurations
  because it uses the flag that removes JS compiler type attribute
  from all configurations and variants

  KT-56106
2023-08-03 14:47:21 +00:00
Ilya Gorbunov a4c75338f3 [stdlib-mpp] js artifacts for dist
KT-56106
2023-08-03 14:47:21 +00:00
Ilya Gorbunov 8e78a433e7 [stdlib-mpp] Suppress warnings to please the Kotlin compiler in Gradle DSL
KT-56106
2023-08-03 14:47:21 +00:00
Ilya Gorbunov b3707807b6 [stdlib-mpp] Do not depend on kotlin-stdlib-common in kotlin-test-common
KT-56106
2023-08-03 14:47:21 +00:00
Ilya Gorbunov 8172bbcb3a [stdlib-mpp] Update expected poms of the standard library
KT-56106
2023-08-03 14:47:21 +00:00
Ilya Gorbunov 9390afa749 [stdlib-mpp] Remove workaround for building kotlin-test-js as a modern K/JS project
KT-56106
2023-08-03 14:47:21 +00:00
Ilya Gorbunov 19cbd4dd3e [stdlib-mpp] Disable js-v1 test execution and compilation and remove the corresponding workarounds
KT-56106
2023-08-03 14:47:20 +00:00
Ilya Gorbunov 09bb0b5566 Draft: change stdlib autoconfiguration and import expectations for mpp stdlib
#KT-59000
2023-08-03 14:47:20 +00:00
Ilya Gorbunov d5fd6937ce Fix HierarchicalMppIT: kotlin-stdlib now contains composite metadata artifact
KT-56106
2023-08-03 14:47:20 +00:00
Ilya Gorbunov 51dcbc8520 [stdlib-mpp] Disable browser test runs on TC
KT-56106
2023-08-03 14:47:20 +00:00
Ilya Gorbunov cfa6c39015 [stdlib-mpp] Change path to the new stdlib artifact in BCV and JdkApi tests
KT-56106
2023-08-03 14:47:20 +00:00
Ilya Gorbunov 12c314cfa4 [stdlib-mpp] Fix artifact classifiers for dist
KT-56106
2023-08-03 14:47:20 +00:00
Ilya Gorbunov 69a87efdd9 js.tests: change paths to kotlin-stdlib-js.klib
Change the expected klib name of stdlib

KT-56106
2023-08-03 14:47:20 +00:00
Ilya Gorbunov 34720f27d4 [stdlib-mpp] Switch kotlin-stdlib project to multiplatform
#KT-56106
2023-08-03 14:47:20 +00:00
Ilya Gorbunov fac620df0b [stdlib-mpp] Setup custom publishing, disable default publications
KT-56106, KT-53791

Co-authored-by: Anton Lakotka <anton.lakotka@jetbrains.com>
2023-08-03 14:47:20 +00:00
Ilya Gorbunov 184cbd6eb1 [stdlib-mpp] Exclude transitive mpp stdlib dependency when compiling with legacy js plugin
#KT-56106
2023-08-03 14:47:20 +00:00
Ilya Gorbunov dcc71e77f3 [stdlib-mpp] Specify configuration attributes for stdlib-js variant disambiguation
#KT-56106
2023-08-03 14:47:20 +00:00
Ilya Gorbunov be0bf91961 Exclude copied sources from code conformance test 2023-08-03 14:47:20 +00:00
Ilya Gorbunov 3090181cc5 [stdlib-mpp] Workaround legacy JS stdlib test run not using freshly-built kotlin.js
Move kotlin.js and kotlin-test-js-v1 output
closer to kotlin-stdlib-js-v1-test to avoid picking (or missing)
kotlin.js from bootstrap higher in hierarchy

#KT-56106
2023-08-03 14:47:20 +00:00
Ilya Gorbunov d7d14e7e9e [stdlib-mpp] Do not merge legacy js content into kotlin-stdlib-js.klib
#KT-56106
2023-08-03 14:47:20 +00:00
Ilya Gorbunov 58c5746fe4 [stdlib-mpp] Reconfigure jvm, js-ir, js-v1 mpp stdlib compilations
- jdk7/8 source sets
- source copying task dependencies
- jar manifest entries
- module-info.class
- jdk 9-11 test runs
- sources jars

#KT-56106
2023-08-03 14:47:20 +00:00
Ilya Gorbunov 72e1578ece YarnAndNpmSuppressor: more allowed test task names
#KT-56106
2023-08-03 14:47:20 +00:00
Ilya Gorbunov ff499a6361 [stdlib-mpp] Support java9 source set compilations in MPP library projects
#KT-56106
2023-08-03 14:47:19 +00:00
Ilya Gorbunov 9ed6574979 [stdlib-mpp] Disable sources for IDEA sync in conflicting projects
#KT-56106
2023-08-03 14:47:19 +00:00
Ilya Gorbunov 46cee9d0a3 [stdlib-mpp] Setup JVM, JS-IR and JS-legacy unit tests
The latter do not work for now

#KT-56106
2023-08-03 14:47:19 +00:00
Ilya Gorbunov 79d5c87f30 [stdlib-mpp] Disable test retries for MPP libraries
Not compatible with org.jetbrains.kotlin.gradle.targets.jvm.tasks.KotlinJvmTest
executer.

#KT-56106
2023-08-03 14:47:19 +00:00
Ilya Gorbunov 9bdd365be4 [stdlib-mpp] Workaround for building kotlin-test-js as a modern K/JS project
#KT-56106
2023-08-03 14:47:19 +00:00
Ilya Gorbunov e53602e763 [stdlib-mpp] use stdlib-mpp dependency instead of stdlib in kotlin-test projects
#KT-56106
2023-08-03 14:47:19 +00:00
Ilya Gorbunov 5c6d3b03df [stdlib-mpp] add JS-IR target
#KT-56106
2023-08-03 14:47:19 +00:00
Ilya Gorbunov 34fc6278ea [stdlib-mpp] initial approach in a separate project
- produce similar jvm, js and common jars
- try default publishing

#KT-56106
2023-08-03 14:47:19 +00:00
Yahor Berdnikau 8469b8cbb5 [Gradle] Simplify wiring target compiler options to compilations options
Now it happens as a default postConfigure action in factories for all
KotlinCompilations including external one.

^KT-57292 In Progress
2023-08-03 14:29:44 +00:00
Yahor Berdnikau 3a148f97b5 [Gradle] Configure tryK2 for target compiler options
^KT-57292 In Progress
2023-08-03 14:29:44 +00:00
Yahor Berdnikau 7dfbf28d93 [Gradle] Introduce compilerOptions for Kotlin external target
Kotlin external target now properly exposes compilerOptions which could
be used by target users to configure target compilations compiler
options.

^KT-57292 In Progress
2023-08-03 14:29:44 +00:00
Yahor Berdnikau c1e26bfa47 [Gradle] Introduce compilerOptions for Kotlin metadata target
KotlinMetadataTarget now exposes experimental compiler options DSL that
are passed as a convention into target compilations compiler options.

^KT-57292 In Progress
2023-08-03 14:29:44 +00:00
Yahor Berdnikau a40e59306a [Gradle] Introduce compilerOptions for Kotlin js target
KotlinJsIrTarget now exposes experimental compiler options DSL that
are passed as a convention into target compilations compiler options.

^KT-57292 In Progress
2023-08-03 14:29:44 +00:00
Yahor Berdnikau a158d09768 [Gradle] Introduce compilerOptions for Kotlin native target
KotlinNativeTarget now exposes experimental compiler options DSL that
are passed as a convention into target compilations compiler options.

^KT-57292 In Progress
2023-08-03 14:29:43 +00:00
Yahor Berdnikau 6f394f42a6 [Gradle] Introduce compilerOptions on Kotlin targets for JVM
KotlinJvmTarget, KotlinAndroidTarget, KotlinWithJavaTarget now expose
compiler options that are passed as a convention into target
compilations compiler options. Compiler options from Kotlin/JVM and
Kotlin/Android plugins compiler options are used now as convention for
target compiler options.

^KT-57292 In Progress
2023-08-03 14:29:43 +00:00
Yahor Berdnikau 38b17420c1 [Gradle] Introduce compilerOptions on KotlinTarget
This will allow configuring compiler options for all compilations in the
target.

^KT-57292 In Progress
2023-08-03 14:29:43 +00:00
Ilya Gorbunov 589492ae2c Suppress KGP errors about using obsolete properties in the whole project 2023-08-03 14:19:07 +00:00
Alexander Udalov 954db5e70c K2: fix reporting of INTERFACE_CANT_CALL_DEFAULT_METHOD_VIA_SUPER
Also detect deserialized Kotlin interfaces which have method bodies in
the interface (as opposed to DefaultImpls), as K1's
`isCompiledToJvmDefault` does.

No test added because this fixes an existing test
`CompileKotlinAgainstCustomBinariesTest.testJvmDefaultNonDefaultInheritanceSuperCall`
for K2 (set LV to 2.0 there to check).

 #KT-60779 Fixed
2023-08-03 14:06:32 +00:00
Alexander Udalov 7fc3e60854 K2: add JVM checker for NO_REFLECTION_IN_CLASS_PATH warning
It's based on the existing K1 checker `JvmReflectionAPICallChecker`.

 #KT-60587 Fixed
2023-08-03 13:42:03 +00:00
Denis.Zharkov bd46bb02c1 K1: Enhance deprecation messages for getFirst/getLast JDK 21 members
^KT-60659 Fixed
^KT-60769 Fixed
2023-08-03 13:31:07 +00:00
Denis.Zharkov 0694ee50a3 K1: Report deprecation on synthetic properties for NOT_CONSIDERED JDK members
Currently, for other synthetic properties, deprecation from the original
method is already being propagated to the relevant new synthetic
property accessor.

But what we need is also reporting warnings on synthetic properties
accessors call-sites if original methods are considered deprecated
as a result of deprecation propagation.

KT-60659 Fixed
^KT-60769 Fixed
2023-08-03 13:31:07 +00:00