Commit Graph

13626 Commits

Author SHA1 Message Date
Artem Kobzar a29fa428b3 [K/JS] Add warning for ES-modules on the klibgen stage on the uniqueness of the exported names from the module 2023-08-08 15:45:02 +00:00
Ilya Gorbunov 0072189fb1 [stdlib-mpp] Configure SBOM for published artifacts KT-53791 2023-08-08 12:32:18 +00:00
Abduqodiri Qurbonzoda 21619264d0 [K/N] Add a note to Regex documentation about future changes of behavior
This note will allow us to fix https://youtrack.jetbrains.com/issue/KT-58198/Native-Regex-issues in the future.

Co-authored-by: Ilya Gorbunov <Ilya.Gorbunov@jetbrains.com>


Merge-request: KT-MR-11387
Merged-by: Abduqodiri Qurbonzoda <abduqodiri.qurbonzoda@jetbrains.com>
2023-08-08 08:21:10 +00:00
Kirill Rakhman 8ae751926c [FIR] Let OptIn LV checker only run on last module in HMPP compilation
This fixes an issue where the opt-in annotation is defined in one of the
source sets of the compilation but opt-ins are defined for the whole
compilation which leads to false-positive "Opt-in requirement marker is
unresolved" in (e.g. common) source sets that don't have a dependency on
the module that contains the annotation.

#KT-60755 Fixed
2023-08-08 07:57:56 +00:00
Nataliya.Valtman 2719dd188f Added build metrics for Kotlin/Native tasks
#KT-58315 Fixed

Co-authored-by: Nataliya Valtman <Nataliya.Valtman@jetbrains.com>


Merge-request: KT-MR-11343
Merged-by: Dmitrii Krasnov <Dmitrii.Krasnov@jetbrains.com>
2023-08-08 07:43:18 +00:00
Ivan Kylchik 7cbf3b28ca [K2] Properly serialize annotation that has vararg with single argument
#KT-60163 Fixed
2023-08-08 07:01:48 +00:00
Sebastian Sellmair 8ff2782045 [Gradle] Promote val Project.kotlinToolingVersion
^KT-61034 Verification Pending
2023-08-08 06:50:01 +00:00
Alexander Udalov cceb138c6c Stdlib: do not check radix twice in Byte/Short.toString
`checkRadix` is already called in `Int.toString`.
2023-08-07 21:47:10 +00:00
Yahor Berdnikau 1b82477ffa [Gradle] Add multiplatform compiler options DSL integration test
^KT-57292 Fixed
2023-08-07 14:09:31 +00:00
Yahor Berdnikau 07593da3f0 [Gradle] Update how JVM toolchain is wired in MPP projects
^KT-57292 In Progress
2023-08-07 14:09:31 +00:00
Yahor Berdnikau bc871c6cfa [Gradle] Add multiplatform extension compiler options DSL
Now the multiplatform extension exposes compiler option DSL for common
compiler arguments. This compiler option synced as a convention for
targets compiler option.

In the case of Kotlin source sets which are not used as defaultSourceSet
 in compilations - extension compiler options are synced as convention
 into those.

^KT-57292 In Progress
2023-08-07 14:09:31 +00:00
Sebastian Sellmair 41e5a31e1b [Gradle] ObservableSet: Only add listeners when a new object is indeed added
^KT-60937 Verification Pending
2023-08-07 13:40:33 +00:00
Sebastian Sellmair d2bd749861 [Gradle] Add integration test for associated 'functionalTest' style sources
Experiments with the DefaultKotlinCompilationAssociator where made
during KT-60937. One experiment broke running functionalTests in
kotlin.git in bootstrap mode. This case was not yet covered by
CI.

^KT-60937 Verification Pending
2023-08-07 13:40:32 +00:00
Sebastian Sellmair 6c6200a9c5 [Gradle][Minor] Deprecate 'KotlinCompilation.associateWith' property...
... in favor of associateCompilations and allAssociateCompilations

^KT-60937 Verification Pending
2023-08-07 13:40:32 +00:00
Sebastian Sellmair 8ce820d944 [Gradle][Minor] KotlinJsIrSourceSetProcessor: Access runtimeDependencyFiles safely
As it might happen, that the configure code could be triggered
too early, capturing the state of 'runtimeDependencyFiles' to early as well.

^KT-60937 Verification Pending
2023-08-07 13:40:32 +00:00
Sebastian Sellmair ba270fc7df [Gradle][Minor] KotlinCompilationAssociator: Use listProperty util function
^KT-60937 Verification Pending
2023-08-07 13:40:32 +00:00
Sebastian Sellmair d978640c42 [Gradle] Remove KotlinOutputDependency
The IdeBinaryDependencyResolver will filter respective
files by using a simpler check: testing if the files
do reside within the build dir of the current project.

^KT-60937 Verification Pending
2023-08-07 13:40:32 +00:00
Ilya Gorbunov 1a8cb02a43 [stdlib-mpp] Fix implicit signing task dependency on shared javadoc artifact
By not using shared javadoc artifact for all publications.
See the commit e6df34805f for details.
2023-08-04 16:11:56 +00:00
Ilya Gorbunov 28992b1302 [stdlib-mpp] Move KGP obsolete property suppress closer to usage
Also remove no-op property enableGranularSourceSetsMetadata
2023-08-04 16:11:56 +00:00
Sebastian Sellmair d510c93241 [Commonizer] Support generic/simple annotation commonization (to support kotlinx.cinterop.* annotations)
^KT-59302 Verification Pending
2023-08-04 11:29:23 +00:00
Timofey Solonin 65649673a7 [MPP] Only add test framework dependency once per configuration
^KT-56828
2023-08-04 09:50:35 +00:00
Timofey Solonin 256d9da24c [MPP] Emit a warning when kotlin-test testing framework couldn't be inferred
^KT-56828
2023-08-04 09:50:35 +00:00
Sebastian Sellmair 2ab2f408f3 [Gradle] PomDependenciesRewriter: Fix missing 'component' in configuration cache
^KT-60159 Verification Pending
2023-08-04 07:22:20 +00:00
Sebastian Sellmair b9a520b593 [Gradle] createMavenPublications: Defensively defer adding gradleComponents to 'AfterFinaliseCompilations'
... as the code previously states that this code might race
with actually adding variants from configurations

^KT-60159 Verification Pending
2023-08-04 07:22:20 +00:00
Sebastian Sellmair 84eacd5cde [Gradle] KotlinProjectStructureMetadata: Use name from KotlinUsageContext by: 'kotlinVariantNameFromPublishedVariantName'
^KT-60159 Verification Pending
2023-08-04 07:22:20 +00:00
Sebastian Sellmair fd50b80aa1 [Gradle][Minor] Handle 'isSourcesPublishable' more lazily
... as the value is allowed to change until 'finaliseDsl'

^KT-60159 Verification Pending
2023-08-04 07:22:20 +00:00
Sebastian Sellmair 9f2c2b7265 [Gradle] Implement tests for External target publications
^KT-60159 Verification Pending
2023-08-04 07:22:20 +00:00
Sebastian Sellmair 06d5d2522c [Gradle] Multiplatform publishing: Support external targets
...by only requiring InternalKotlinTarget instead of AbstractKotlinTarget

KT-60159
2023-08-04 07:22:20 +00:00
Sebastian Sellmair 3d593f0ee9 [Gradle] ExternalKotlinTargetComponent: Implement 'usages' as 'KotlinUsageContext'
... to support multiplatform publication components as
re-writing pom dependencies and project structure metadata

KT-60159
2023-08-04 07:22:20 +00:00
Sebastian Sellmair 93f8e21e9e [Gradle][Minor] Add assertion on KotlinAndroidTarget checking components do not get created to early
KT-60159
2023-08-04 07:22:20 +00:00
Sebastian Sellmair 2734207b52 [Gradle][Minor] Make Future<T> covariant Future<out T>
KT-60159
2023-08-04 07:22:20 +00:00
Sebastian Sellmair 29d15235bb [Gradle][Minor] Add Property.awaitFinalValueOrThrow util function
KT-60159
2023-08-04 07:22:20 +00:00
Ilya Gorbunov 171d156688 [stdlib-mpp] Disable/ignore failing tests in Kotlin Dev
KT-60901, KT-59000, KT-56106
2023-08-03 14:47:21 +00:00
Ilya Gorbunov d72631a773 [stdlib-mpp] Workarounds for opt-in problems caused by languageSettings DSL rework
KT-56106
2023-08-03 14:47:21 +00:00
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 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 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