10537 Commits

Author SHA1 Message Date
Kirill Rakhman bb8a46c3a0 [Test] Parallelize test generation 2023-08-28 08:02:05 +00:00
Alex Kuznetsov 35b3a9ec82 [Docs] Samples for 'step' function 2023-08-25 19:34:39 +00:00
Timofey Solonin 53645bce2b [MPP] Specify missing target for arm macOS
^KT-61439
2023-08-25 18:21:27 +00:00
Ilya Goncharov 355ad3e641 [Gradle, JS] Distinguish creating prepared resolution and writing package.json
^KT-61326 fixed
2023-08-25 17:23:10 +00:00
Bogdan Mukvich 7b00323b89 [Build] Update guava
Fix some reports from "Show Vulnerable Dependencies"

^KTI-1342
2023-08-25 14:10:37 +00:00
Bogdan Mukvich dbb5072a26 [Build] Update dependencies
Fix some reports from "Show Vulnerable Dependencies"

^KTI-1342
2023-08-25 14:10:37 +00:00
Sebastian Sellmair bfe54942d3 [Gradle] IdeProjectToProjectCInteropDependencyResolver: Resolve dependencies leniently
^KT-61466 Verification Pending
2023-08-25 13:58:52 +00:00
Sebastian Sellmair 8bb64040c0 [Gradle] Implement test native project dependencies resolve leniently to cover KT-61466 2023-08-25 13:58:52 +00:00
Ilya Gorbunov 6c4f6907ea Update ant version in legacy dokka docs build 2023-08-25 11:28:46 +00:00
Yahor Berdnikau 0c0507c25f [Gradle] Fallback to the highest supported Kotlin JVM target
If used toolchain JavaVersion is not yet supported by the current Kotlin
compiler, we are now fallback to the highest supported JVM target
version instead of failing the build.

^KT-58987 Fixed
2023-08-25 10:38:56 +00:00
Ilya Chernikov 063f81ed36 MPP, Maven: remove mpp test from maven plugin
The MPP should be removed from the maven plugin soon, and since
this test fails on K2 anyway, it was decided to remove it.
related to #KT-61285
2023-08-25 08:57:53 +00:00
Ilya Chernikov afd7186680 Fix scripting test with cycle detection 2023-08-25 08:57:53 +00:00
Alexander.Likhachev a3e8767fb1 [Gradle] Fix classpath cache key in ClassLoadersCachingBuildService
Lists have defined contracts for equals and hashCode and thus might be used as map keys for the sake of caching. Gradle's file collections do not follow those contracts, leading to cache misses and creating too many classloaders.
#KT-61426 Fixed
2023-08-24 11:59:07 +00:00
Alexander.Likhachev 693b4cf308 [Gradle] Fix creating empty directory marker for backups
The problem was occurring in the case the first directory for backup does not exist
#KT-61273 Fixed
2023-08-24 11:47:17 +00:00
Alexander.Likhachev 9b9039d512 [Gradle] Add a test for KT-61273 2023-08-24 11:47:17 +00:00
Jingbo Yang 7a13173e6a Support fileAccessHistoryReportFile in KAPT
This change expanded KAPT to support a new param
'fileAccessHistoryReportFile', which reports all the classes used during
 annotation processing into a file, in the form of a list of URIs.

This is useful for build speed improvements described in https://engineering.fb.com/2017/11/09/android/rethinking-android-app-compilation-with-buck/.
Essentially, using the list of used classes, we can compile only
the dependencies that are really affected by the developer's
code changes and improve Kotlin build speed.

^KT-52853
2023-08-23 14:59:59 +00:00
Nataliya.Valtman dce1c1c70a Fix flaky tests with ConcurrentModificationException 2023-08-23 13:01:47 +00:00
Yahor Berdnikau 7d48a7934f [Gradle] Fix tryK2 was not applied to Kotlin/JS gradle plugin
^KT-61193 Fixed
2023-08-23 12:36:46 +00:00
vmishenev 5c0c8ed2d5 Update Dokka to 1.9.10-dev
- Use analysis plugin configuration instead of `StdLibAnalysisConfigurationPlugin`
- Change SamplesTransformer plugin after Dokka refactoring
2023-08-23 12:33:40 +00:00
Sebastian Sellmair a832510487 [Gradle] Use new Usage 'kotlin-commonized-cinterop' to differentiate cinterop commonizer configurations
^KT-61376 Verification Pending
2023-08-22 14:50:03 +00:00
Sebastian Sellmair fc2b700784 [Gradle] Implement KT61376CInteropCommonizerConfigurationsTest
to check Commonized CInterop configurations not are not
resolving variants from sqldelight, coroutines-extensions

KT-61376
2023-08-22 14:50:03 +00:00
Dmitrii Krasnov ade88e2b0f Fixed konan.data.dir with caches
Removed TODOs after updating to kotlin bootstrap version with konan.data.dir gradle property changes

Fixed warning of incorrect passing -Xkonan-data-dir arg in konanc from KGP and fixed setting konan-data-dir in SetupConfiguration#setupCommonOptionsForCaches

#KT-60660 Fixed

Merge-request: KT-MR-11299
Merged-by: Dmitrii Krasnov <Dmitrii.Krasnov@jetbrains.com>
2023-08-22 07:56:26 +00:00
Yahor Berdnikau e8905ea849 [Gradle] Fix loosing compiler plugin options with the same plugin ID
The most common use case is to add one CompilerPluginOptions to another
while both may have options with the same plugin ID.

^KT-54160 Fixed
2023-08-22 07:53:18 +00:00
Nikita Bobko 25c082f02b K1: Implement a checker that disallows to have different member scopes for expect open and its actual
^KT-22841 Fixed
Review: https://jetbrains.team/p/kt/reviews/11603/timeline

The commit also introduces `@AllowDifferentMembersInActual` annotation in
stdlib which allows to suppress the diagnostic
2023-08-21 19:51:08 +00:00
Kirill Rakhman d0cc86f52c [Tests] Update test data after changes to FIR diagnostic messages 2023-08-21 16:28:48 +00:00
Dmitrii Krasnov 304cbf1aea Fixed configuration cache misses for the second build, when K/N compiler has been downloaded with the first build
KT-61154 Fixed
2023-08-19 05:45:12 +00:00
Ilya Gorbunov c49934160a Remove wasm platform handling from stdlib dependency autoconfiguration
Wasm variants of common kotlin-stdlib now provide the required artifacts.
No support of previous versions is required due to experimental status.

KT-60909, KT-59000
2023-08-18 15:36:15 +00:00
Alexander.Likhachev 4d1ea3c441 [Gradle] Avoid early reading of Project.buildDir in compilation tasks
#KT-61292 Fixed
2023-08-18 14:20:57 +00:00
Alexander.Likhachev 7c5a826fd8 [Gradle] Add a test for KT-61292 2023-08-18 14:20:57 +00:00
Ilya Chernikov a53933d8ce Scripting: do not pack generic dependencies jar into maven-all
The -all jar is compacted with proguard, and the proguard removes
synthetic methods methods with $default suffix from classes regardless
of the -keep flag.
Therefore the calls to the $default metods lead to the NoSuchMethodError
exception on runtime.
Removing the main interface module from the proguarded jar solves the
problem for now (but not generally, the use of "proguarded" jars as
libraries should be discouraged.)
#KT-60862 fixed
2023-08-18 12:35:25 +00:00
strangepleasures 2423b7b62f [KAPT4] KT-51982 Implement generation of @Metadata annotations in Java stubs
Also adds rendering of @Metadata annotations in Kapt3 and Kapt4 tests
(currently disabled for a few tests).

Co-authored-by: Alexander Udalov <alexander.udalov@jetbrains.com>
2023-08-17 21:43:54 +00:00
Ilya Gorbunov 69cb722ff4 Add js compiler disambiguation attribute to fix docs build 2023-08-17 17:21:23 +00:00
Sebastian Sellmair 337d87ad54 [Gradle] CInterop IDE dependency resolution: Fix build dependencies
^KT-59596 Verification Pending
2023-08-17 15:47:56 +00:00
Sebastian Sellmair fac5083dbf [Gradle] Ensure 'commonized cinterop configurations' are present and expose api dependencies
^KT-59596 Verification Pending
2023-08-17 15:47:55 +00:00
Anton Lakotka 9866336a40 [Gradle] Use 'commonized cinterop configurations' as single way of sharing cinterop commonizer output
^KT-59596 Verification Pending
2023-08-17 15:47:55 +00:00
Anton Lakotka b2bef4ad41 [Gradle] Extract allInteropGroups from CInteropCommonizerTask
This information is needed to create consumable configurations for
Commonized Cinterop outputs. This way CInteropCommonizerTask is not
required to be created eagerly.

^KT-59596 Verification Pending
2023-08-17 15:47:55 +00:00
Anton Lakotka cbe11e8c9a [Gradle] Keep materializing commonizeCInteropTask...
...as it contains important information needed to create
 consumable commonized cinterop configurations

^KT-59596 Verification Pending
2023-08-17 15:47:55 +00:00
Anton Lakotka 14f216764d [Gradle] Use CommonizerTargetAttribute to disambiguate...
...commonized cinterop configurations.

^KT-59596 Verification Pending
2023-08-17 15:47:55 +00:00
Anton Lakotka 373c838ebb [Gradle] Enable applyDefaultHierarchyTemplate back for...
...testCInteropsDoesNotDependOnAnySourceCompilation test

^KT-59596 Verification Pending
2023-08-17 15:47:55 +00:00
Anton Lakotka b37ebb47d9 [Gradle] Draft implementation of Configurations for Commonized CInterops
Introduce *CommonizedCInterop & *CommonizedCInteropElements configurations
and fix CInteropCommonizerTask to consume dependencies / expose artifacts
via these configurations.
2023-08-17 15:47:55 +00:00
Hung Nguyen 894ba9ab80 [IC] Relocatable IC caches for projects with custom buildDir
IC caches often contain file paths. To make them relocatable, we need
to convert these file paths into relative paths, relative to a base
directory.
  - If the file paths are source files, we can use the root project
    directory as base.
  - If the file paths are class files, we should use the classes
    directory as base (before this commit, we used the root project
    directory in both cases, that's why we hit KT-58547).

The key changes in this commit include:
  - RelocatableFileToPathConverter: converts paths to relative paths
  - IncrementalCompilationContext: contains 2 different path converters,
    one for source files and one for class files
  - SourceToOutputFilesMap: maps source files to class files using the
    above path converters
  - IncrementalCompilerRunner: creates the path converters based on file
    locations

Test: RelocatableFileToPathConverterTest unit test
      SourceToOutputFilesMapTest unit test
      BuildCacheRelocationIT.testCustomBuildDirectory integration test
^KT-58547 Fixed
2023-08-16 13:40:19 +00:00
Bogdan Mukvich e89334e5ba [Build] Update gradle enterprise 2023-08-16 12:36:28 +00:00
Alexander.Likhachev 765a8bdd7c [Gradle] Fix JsIrConfigurationCacheIT was disabled by a mistake
It was marked as an abstract class and thus wasn't executed
2023-08-16 09:48:48 +00:00
Dmitrii Krasnov 8a576438ce Turned off KotlinNativeLinkIT.defaultValueForPartialLinkage on Windows, caches are not supported there yet
KT-60839
2023-08-15 16:10:22 +00:00
Dmitry Savvinov c359f684cd [Gradle] Don't print stacktraces in IDEA sync
IDEA sync is always launched with equivalent of `--stacktrace`, so
checking startParameter.showStacktrace is unreliable.

This commit instead mutes printing of stacktraces in sync unless the
internal property is specified. If users want stacktraces, they're
expected to launch Gradle task with `--stacktrace`.

In the extremely rare cases where the stacktrace is needed
*specifically* during IDE sync,
`kotlin.internal.diagnostics.showStacktrace=true` can be used

^KT-61172
2023-08-15 10:11:45 +00:00
Ilya Goncharov a5893d4bee [Gradle, JS] Build service npm resolution manager does not contain packageJsonHandlers
^KT-60469 fixed
2023-08-15 09:10:10 +00:00
Leonid Startsev 8b821e1feb Deprecate KmProperty.hasGetter(hasSetter) in favor of KmProperty.getter(setter)
as a follow-up of flag deprecation.

#KT-59440
2023-08-14 12:36:34 +00:00
Sebastian Sellmair 1c2eab39d2 [Gradle][Minor]: Update comment on 'shouldUseOldKtorAndCoroutinesExternalDependencies'
KT-60901
2023-08-14 11:28:21 +00:00
Timofey Solonin d25d0e4f94 [MPP] Validate which configurations resolve for explicit stdlib-js dependency
^KT-60901
^KT-61126
2023-08-11 14:52:03 +00:00
Timofey Solonin 78e09816e5 [MPP] Use assemble instead of resolving all configurations
We expect that some configurations might fail to resolve in the case of
stdlib-js dependency if they are resolved explicitly. These configurations
should not actually resolve for the KGP user.

^KT-60901
^KT-61126
2023-08-11 14:52:03 +00:00