14764 Commits

Author SHA1 Message Date
Sebastian Sellmair d80e6f8d66 [kotlin-tooling-core] Implement 'closure' sequence APIs 2024-02-23 15:48:47 +00:00
Sebastian Sellmair 704379934e [kotlin-tooling-core] Allow nullable extra values
The change is binary compatible, but not source compatible.
Potential clients like Google might need to adapt
a potential `IdeaKotlinExtrasSerializationExtension` implementaiton.

Right now, no such implementation is known
2024-02-23 07:31:32 +00:00
Ilya Gorbunov 85854a6b8d [stdlib] Make enumEntriesIntrinsic not reified/inline
It's required to simplify the corresponding backends' inliners.

KT-59712, KT-59713
2024-02-23 05:50:37 +00:00
Ilya Gorbunov 86d5e83f4b [stdlib] Remove bootstrap implementation of enumEntriesIntrinsic
It should have been already implemented as intrinsic in all backends.

Do not test enumEntries intrinsic in the old JVM BE.

KT-53154

Co-authored-by: Alexander Udalov <alexander.udalov@jetbrains.com>
2024-02-23 05:50:37 +00:00
Dmitriy Dolovov d70dd7808b [kotlinp] Fix: Forgotten sorting of KmClasses in KlibKotlinp
The declarations that are printed by the kotlinp tool may be optionally
sorted. That's controlled by `sortDeclarations` flag in
`org.jetbrains.kotlin.kotlinp.Settings`. However, there was no sorting
implemented for `KmClass`es.

This commit fixes that.

^KT-62340
2024-02-22 22:21:30 +00:00
Yahor Berdnikau 1d9129f688 [Gradle] Bump max Gradle version in tests to 8.6
^KT-64378 Verification Pending
2024-02-22 19:01:29 +00:00
Andrey Yastrebov d76a6d6a9c KT-65741 Add Swift Export KGP tasks 2024-02-22 18:46:01 +00:00
Ilya Goncharov eabd2f0fc7 [Gradle, Wasm] Fix mismatch report message for upgradeLockFile
^KT-65870 fixed
2024-02-22 18:33:46 +00:00
Ilya Goncharov bca785a87c [Gradle, Wasm] Fix copying wasm file to destination dir
^KT-65889 fixed
2024-02-22 14:53:54 +00:00
Yahor Berdnikau 6b19b8b9d0 [Repo] Don't use kotlinOptions in repo build scripts
^KT-63419 In Progress
2024-02-22 14:48:10 +00:00
Bogdan Mukvich ff2fea390b Fix snapshot deployment maven params
^KT-65944
2024-02-21 17:13:29 +00:00
Ilya Gorbunov 0ecbbbf1ca [stdlib] Set AV to 2.0, LV to 1.9 for main compilations, build tests with K2 2024-02-21 16:28:12 +00:00
Artem Daugel-Dauge 7ab691fcef [Gradle] Forbid using embedAndSign together with Pod-dependencies
^KT-64096 Verification Pending
2024-02-21 11:25:31 +00:00
Yahor Berdnikau f5de0f9399 [Gradle] Use BuildFeatures service to get project isolation feature state
^KT-64355 Verification Pending
2024-02-21 10:20:20 +00:00
Yahor Berdnikau e405072419 [Gradle] Use BuildFeatures service to get configuration cache feature state
^KT-64355 In Progress
2024-02-21 10:20:19 +00:00
Yahor Berdnikau 2a195062a8 [Gradle] Add plugin variant for Gradle 8.5
^KT-64355 In Progress
2024-02-21 10:20:19 +00:00
Ilya Gorbunov c2e28149e6 [stdlib] Enable link-via-signatures to workaround KT-62798 2024-02-20 19:59:16 +00:00
Dmitrii Krasnov f525d03e67 [Gradle] Moved downloading konan dependencies from compiler to Gradle
^KT-65823 Fixed
2024-02-20 15:47:58 +00:00
Ilya Gorbunov 709076acc9 [stdlib] Improve documentation of Char.isWhitespace and test it behaves the same in different targets 2024-02-20 03:48:08 +00:00
Ilya Gorbunov baca742a31 [stdlib] Minor: fix various grammar in docs 2024-02-20 03:48:08 +00:00
Ilya Gorbunov 15375c0fd5 [stdlib] Use more idiomatic and performant implementation of isBlank
Also replace expect-actual with a common function because its implementation is no longer different in different platforms.

KT-65590
2024-02-20 03:48:08 +00:00
vladislav.grechko b74501ee93 Compare module metadata in JVM ABI consistency tests 2024-02-19 18:17:37 +00:00
Anton Bannykh 302e38dd18 JS: enable test after bootstrap
Check that a custom Promise declaration is supported for the @AfterTest
annotation functionality in the kotlin.test library

This is a part of the fix for KT-63359


Merge-request: KT-MR-14333
Merged-by: Anton Bannykh <Anton.Bannykh@jetbrains.com>
2024-02-19 11:56:18 +00:00
Anton Lakotka bd84f93333 [Gradle, Test] makeSnapshotTo should fail when called in TC env
Developers (me) often forget to remove calls to this debugging
utility. Usually this changes is visible during Code Review but we
shouldn't rely on a sharp eye of a human. It is better to automatically
check it during remote run execution.
2024-02-19 10:42:46 +00:00
Anton Lakotka cd8843289b [Gradle, Test] Make utility isTeamCityRun as top-level function 2024-02-19 10:42:46 +00:00
Ilya Goncharov abb5f55087 [Wasm] Use static import for wasm imports
^KT-65777 fixed
2024-02-19 10:01:10 +00:00
Timofey Solonin 700432e111 Add a closure function to return a graph in explicit bfs order
^KT-65540
2024-02-19 09:28:08 +00:00
Ilya Goncharov 87fdf8e764 [Gradle, Wasm] Binaryen by default for production main binary
^KT-64553 fixed
2024-02-19 09:06:44 +00:00
Anton Lakotka 7a150cce47 [Gradle] Introduce defaultFragmentName for K2 MPP Structure
It is possible to add source files to task directly. Especially this is
a very popular case for Android integration. Android variants can
contain any number of extra-source files that should be compiled
together with other android-specific sources.
Android specific sources that come from Android source sets already
compiled together as part of "main" fragment (KT-62508).
With this change this logic is extended to any extra sources
that are added directly to the compile task.

^KT-62508 Verification Pending
2024-02-18 16:42:19 +00:00
Anton Lakotka 020bb72d2b [Gradle] Associate Android java sources with related Kotlin Source Set
Java sources can be produced by the task or can be configured with
task dependencies. Previously sources were included into task directly
now they are properly configured with Kotlin Android Source Set.

^KT-63753 Verification Pending
^KT-65426 Verification Pending
2024-02-18 16:42:19 +00:00
Anton Lakotka b5ed2326e7 [Gradle] Merge Android Source Sets into one K2 Fragment
Android projects has a number of build type/flavor specific source set.
These source sets are included into compilation of multiple variants.
In Android compilation model they should be compiled together and they
should see each-others declarations. With Kotlin MPP plugin applied
these android source sets gets associated with Kotlin Source Sets
counter parts. However in Kotlin Multiplatform Source sets have
a semantics about "expect/actual" refinement and with K2 it also got
stricter and visibility is checked. This is not compatible with Android
compilation model thus the solution is to merge Android Source Sets
into one K2 Fragment.

^KT-62508 Verification Pending
2024-02-18 16:42:19 +00:00
Anton Lakotka 0a86f03457 [Gradle] Don't pass -Xfragment-sources for non-mpp compilations
It is unnecessary and confusing.

^KT-65768 Verification Pending
2024-02-18 16:42:19 +00:00
Anton Lakotka fabf75f4e2 [Gradle] Pass Android-related sources to KotlinSourceSet instead task
Setting sources through compile task is not compatible with
Multiplatform K2 because for such sources no K2 Fragment relations
will be set and compilation will fail.

^KT-63753 Verification Pending
2024-02-18 16:42:19 +00:00
Anton Lakotka b13b27a715 [Gradle] Migrate new-mpp-android from Groovy to Kotlin Script 2024-02-18 16:42:19 +00:00
Pavel Mikhailovskii 20bb6b0ea8 [KAPT] KT-64391 Make sure that all K2 KAPT tests really run with K2
Merge-request: KT-MR-14346
Merged-by: Pavel Mikhailovskii <Pavel.Mikhailovskii@jetbrains.com>
2024-02-16 19:27:46 +00:00
Yahor Berdnikau 0f8a416496 [Gradle] Migrate MppHighlightingTestDataWithGradleIT to new test DSL
^KT-65528 In Progress
2024-02-16 18:16:41 +00:00
Yahor Berdnikau a40459c520 [Gradle] Bump max Gradle version in tests to 8.5
^KT-62540 Verification Pending
2024-02-16 16:47:16 +00:00
Dmitriy Novozhilov acf2296590 [Test] Regenerate tests after two previous commits 2024-02-16 12:48:24 +00:00
Nataliya.Valtman 7ad371b215 Fix ConcurrencyModification exception in KotlinBuildStatsBeanService
#KT-65825 Fixed
2024-02-16 11:43:52 +00:00
Dmitriy Dolovov 1f257e98a0 [kotlinp] Add missing the dependency for kotlinp-jvm-shadow.jar
Without the dependency on project :tools:kotlinp the shadow Jar
lacks the necessary classes.

^KT-62340
2024-02-16 10:08:48 +00:00
Yahor Berdnikau d662f72d07 [Gradle] Deprecate KotlinCompilation.compilerOptions
Users quite often confuse that compilerOptions in KotlinCompilation is
actually the same object in the Kotlin compilation task. We want to make
 our API more straightforward and remove this ambiguity by proposing to
 use task compiler options DSL.

^KT-65568 Verification Pending
2024-02-15 18:27:31 +00:00
Yahor Berdnikau 5df05d5797 [Gradle] Deprecate HasCompilerOptions
This DSL is not consistent with other DSL to configuring compiler
options.

^KT-65568 In Progress
2024-02-15 18:27:31 +00:00
Yahor Berdnikau e3b7366b10 [Gradle] Compile Gradle plugins against Gradle API 8.5
^KT-65819 Fixed
2024-02-15 18:04:59 +00:00
Leonid Startsev a6cdf27204 Fix compilation of :tools:kotlinp-klib and related projects
Conflicting PRs https://jetbrains.team/p/kt/reviews/14253 and https://jetbrains.team/p/kt/reviews/14384/files
were merged too close to each other for Safe-Merge to catch the problem and therefore resulted in compilation error.
2024-02-15 17:15:58 +00:00
Yahor Berdnikau 05359ba9e5 [Gradle] Migrate VariantAwareDependenciesMppIT to new test DSL
^KT-65528 In Progress
2024-02-15 16:09:34 +00:00
Dmitriy Dolovov 83cc0d75a7 [kotlinp] Support rendering KLIB metadata using "kotlinp" format
This commit includes:
1. New subproject :tools:kotlinp-klib that contains the facade for
   rendering the metadata in "kotlinp" format given just
   KlibModuleMetadata
2. A tool for computing (external) IR signatures that are not directly
   available in metadata: KlibKotlinpExternalSignatureComputer

^KT-62340
2024-02-15 15:38:27 +00:00
Leonid Startsev ed30221f42 Publish kotlin-metadata-jvm as a part of Kotlin distribution
and add a corresponding POM test.

#KT-63161 Fixed
2024-02-15 15:32:33 +00:00
Leonid Startsev 09e89db82f Change kotlinx- to kotlin- in kotlin-metadata-jvm and related projects
Change package, artifact group, artifact name, and Gradle module name to
kotlin-metadata and kotlin-metadata-jvm, respectively.

In Kotlin 2.0, kotlin-metadata-jvm library is promoted to stable, and is
a part of Kotlin distribution now.

Note that kotlinx-metadata-klib is left with org.jetbrains.kotlinx group, artifact name and package
because -klib part is considered not stable and for internal use. Since it is still published via Sonatype,
it should have kotlinx group. Therefore, it will have both classes from kotlin.metadata and kotlinx.metadata packages. This is not a problem, because we already had kotlinx.metadata split package between -jvm and -klib before.

#KT-63219 Fixed
2024-02-15 15:32:33 +00:00
Yahor Berdnikau 4971af293c [Gradle] Remove ownModuleName input
^KT-64504 Verification Pending
2024-02-15 15:02:51 +00:00
Nataliya.Valtman 090407b7e3 Add compiler IRMeasurement to build reports
#KT-65091: Fixed
2024-02-15 07:51:51 +00:00