Commit Graph

10399 Commits

Author SHA1 Message Date
vladislav.grechko b74501ee93 Compare module metadata in JVM ABI consistency tests 2024-02-19 18:17:37 +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 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
Dmitrii Krasnov 70a887e3ba [Gradle IT] Separated adding repositories block and dependencyManagement
In Gradle, there is a bug that leads to race condition,
when we use ivy repo in the settings file.
This bug was solved only in 8.1,
 so we supported dependencyManagement in our IT only since 8.1.
 For Gradle less 8.1 we just add the same repos to build script.

 ^KT-65708 Fixed
2024-02-14 20:02:25 +00:00
Dmitriy Dolovov 03418c11c3 [kotlinp] Change the package name in :tools:kotlinp-jvm subproject
Change the package name for all *.kt files inside
the :tools:kotlinp-jvm subproject from "org.jetbrains.kotlin.kotlinp"
to "org.jetbrains.kotlin.kotlinp.jvm"

^KT-62340
2024-02-13 21:01:08 +00:00
Dmitriy Dolovov d30efdb001 [kotlinp] Split :tools:kotlinp into "common" and "jvm" subprojects
The "common" subproject keeps only backend-neutral logic and depends
only on :kotlinx-metadata library. It takes the name of the former
project - :tools:kotlinp

The "jvm" subproject depends on the "common" one and also depends
on :kotlinx-metadata-jvm. It gets the new name - :tools:kotlinp-jvm

There is a lot of touched files in this commit. The majority of them
is just moved files (tests, test data, etc).

Only the following files were actually modified:
  .space/CODEOWNERS
  build.gradle.kts
  libraries/tools/abi-comparator/build.gradle.kts
  libraries/tools/kotlinp/build.gradle.kts
  libraries/tools/kotlinp/jvm/build.gradle.kts
  plugins/kapt3/kapt3-compiler/build.gradle.kts
  settings.gradle

 ^KT-62340
2024-02-13 21:01:08 +00:00
Dmitriy Dolovov eec76865a7 [kotlinp] Refactor to separate common part from JVM-specific part
This refactoring includes the following:
1. Separate backend-neutral part of the metadata printer `Kotlinp`
   from the part that accesses JVM-specifics: `JvmKotlinp`.
2. Introduce `org.jetbrains.kotlin.kotlinp.Printer`: The component
   that renders both individual `Km*` nodes and the whole metadata
   tree, and does so with the proper indentation.

^KT-62340
2024-02-13 21:01:08 +00:00
Dmitriy Dolovov d769328311 [kotlinp] Minor. Remove unnecessary -opt-in=kotlin.RequiresOptIn
This opt-in is no more required in :tools:kotlinp

^KT-62340
2024-02-13 21:01:08 +00:00
Yahor Berdnikau 53d42df76b [Gradle] Migrate MppCInteropDependencyTransformationIT to new test DSL
^KT-65528 In Progress
2024-02-13 09:16:19 +00:00
Filip Dolník a4854cf81f [Gradle] Fix that CInterop commonizer modified project description
KT-65754
2024-02-13 07:38:50 +00:00
Yahor Berdnikau e1533579f9 [Gradle] Limit Gradle daemon memory to 1g
Limiting spawned by our Gradle integrations tests Gradle daemons maximum
heap size to 1g helps to reduce memory pressure on the system when
running these tests in parallel. Especially it is actual for our CI
agents.

^KT-65701 Fixed
2024-02-12 16:41:46 +00:00
Yahor Berdnikau cf1a1693b3 [Gradle] Remove exceptions for warnings-as-errors flag enable
^KT-56904 Fixed
2024-02-12 14:39:33 +00:00
Yahor Berdnikau de40306f8e [Gradle] Fix warnings in KotlinPerformancePlugin
^KT-56904 In Progress
2024-02-12 14:39:33 +00:00
Yahor Berdnikau 05f3019fcf [Gradle] Fix warnings in experimentalConifguration.kt
^KT-56904 In Progress
2024-02-12 14:39:33 +00:00
Yahor Berdnikau d2c8565d55 [Gradle] Fix warnings in SetupKotlinNativePlatformDependenciesAndStdlib
^KT-56904 In Progress
2024-02-12 14:39:33 +00:00
Yahor Berdnikau e10b4066d5 [Gradle] Fix warnings in KotlinNativeTargetPreset
^KT-56904 In Progress
2024-02-12 14:39:33 +00:00
Yahor Berdnikau afd5dbec81 [Gradle] Fix warnings in DefaultCInteropSettings
^KT-56904 In Progress
2024-02-12 14:39:33 +00:00
Yahor Berdnikau bbf933ce70 [Gradle] Fix warnings in YarnWorkspaces
^KT-56904 In Progress
2024-02-12 14:39:33 +00:00
Yahor Berdnikau 40fa94b23b [Gradle] Fix warnings in Yarn
^KT-56904 In Progress
2024-02-12 14:39:33 +00:00
Yahor Berdnikau 00f8c23092 [Gradle] Fix warnings in KotlinNpmInstallTask
^KT-56904 In Progress
2024-02-12 14:39:32 +00:00
Yahor Berdnikau aba89b6676 [Gradle] Fix warnings in CreateTargetConfigurationsSideEffect
^KT-56904 In Progress
2024-02-12 14:39:32 +00:00
Yahor Berdnikau 1ad9462c72 [Gradle] Fix warnings in CreateDefaultCompilationsSideEffect
^KT-56904 In Progress
2024-02-12 14:39:32 +00:00
Yahor Berdnikau e72704ce86 [Gradle] Fix warnings in ConfigureBuildSideEffect
^KT-56904 In Progress
2024-02-12 14:39:32 +00:00
Yahor Berdnikau 36233bd17d [Gradle] Fix warnings in GradleLoggerAdapter
^KT-56904 In Progress
2024-02-12 14:39:32 +00:00
Yahor Berdnikau 3586f624a3 [Gradle] Fix warnings in kotlinTargetPresets.kt
^KT-56904 In Progress
2024-02-12 14:39:32 +00:00
Yahor Berdnikau 85f7dd1c20 [Gradle] Fix warnings in kotlinTestDependencyManagement.kt
^KT-56904 In Progress
2024-02-12 14:39:32 +00:00