Commit Graph

9454 Commits

Author SHA1 Message Date
Sergey Bogolepov db12a96e54 Fix test that was broken by e159392d by disabling native caches. 2021-08-12 18:02:23 +03:00
Yahor Berdnikau 3acb96e474 Allow running KotlinJavaToolchainTest on any user JDK. 2021-08-12 10:00:23 +02:00
Bingran c57302abba Only check ExternalDependency when customizing kotlin dependencies
This commit fixes the issue where kgp checks group/version of project
dependencies which is uncompatible with project isolation. With this
change, kgp will only check ExternalDependency which should be enough
for setting up kotlin dependencies.

This change also changes the way we apply cache redirector gradle
files to all projects when setting up test projects. To make it
compatible with project isolation, we should move away from using
project.getAllProjects() function.

^KT-47792 Fixed
Test: existing + SimpleKotlinGradleIT.testProjectIsolation
2021-08-12 09:51:20 +02:00
Sergey Bogolepov e159392d22 [K/N] Enable caches for iosArm64 and linuxX64 by default 2021-08-11 06:38:59 +00:00
Ilya Goncharov 40d19b50c5 [Gradle, JS] Use Gradle's hashers 2021-08-10 18:45:09 +00:00
Ilya Goncharov bfcd954dd3 [Gradle, JS] Add test on not updating Node.JS if it was downloaded
^KT-47845 fixed
2021-08-10 18:45:09 +00:00
Ilya Goncharov b8330deefa [Gradle, JS] Consider potential hash of nodejs and yarn
^KT-47845 fixed
2021-08-10 18:45:08 +00:00
Ilya Goncharov 5ec19c2417 [Gradle, JS] Up-to-date checks for Node js and yarn
^KT-47845 fixed
2021-08-10 18:45:08 +00:00
Alexander Udalov 3bc0eaff59 Fix warnings in stdlib samples and test modules 2021-08-10 17:57:50 +02:00
Alexander Udalov 0d1380c232 Fix warnings in generator modules 2021-08-10 17:57:50 +02:00
Dmitriy Dolovov cfc4e715e4 [IR] Tests for IR linking error reporting
^KT-44626
2021-08-10 14:02:45 +03:00
Dmitriy Dolovov ac387b1f26 [Gradle, Native] Pass external dependencies to Kotlin/Native link tasks
^KT-44626
2021-08-10 14:02:27 +03:00
Hung Nguyen 206457d9ff KT-45777: Take snapshots and compute changes for Kotlin classes
Reuse the existing IncrementalJvmCache to take snapshots and compute
changes for Kotlin classes.

Java classes will be handled next.

Bug: KT-45777
Test: New ClasspathSnapshotterTest, ClasspathChangesComputerTest
2021-08-10 12:22:58 +03:00
Ilya Goncharov 766857881a [JS IR] Review remarks
- Use intrinsic on this
- Enqueue invoke for DCE
- Change transform
- Ignore instead of target backend

^KT-46204 fixed
2021-08-10 07:24:51 +00:00
Ilya Goncharov a28138eb72 [JS IR] Change js function on Kotlin code
^KT-46204 fixed
2021-08-10 07:24:49 +00:00
Ilya Goncharov 627af332b1 [JS IR] Use PublishedApi for intrinsic
^KT-46204 fixed
2021-08-10 07:24:48 +00:00
Ilya Goncharov e6af3ff6a8 [JS IR] Rename and doc new intrinsics, add new intrinsic to call suspend fun as supertype
^KT-46204 fixed
2021-08-10 07:24:48 +00:00
Ilya Goncharov a70fc99130 [JS IR] Add intrinsic to call suspend functions as super type
^KT-46204 fixed
2021-08-10 07:24:47 +00:00
Ilya Goncharov 755f847ab9 [JS IR] Use invoke for coroutines in runtime
^KT-46204 fixed
2021-08-10 07:24:46 +00:00
Ilya Goncharov 3c9dcdbbee [JS IR] Generate suspend function as invoke
[JS IR] Fix type check utils to work with array of arities

[JS IR] Store multiple arities for suspend functional interface implementers

^KT-46204 fixed
2021-08-10 07:24:46 +00:00
Viacheslav Kormushkin d670743a2f Cocoapods plugin: error reporting in case CocoaPods is not installed on users machine
#KT-47362
2021-08-09 12:54:29 +00:00
sebastian.sellmair eec5f99e35 [Gradle] Support 'KONAN_DATA_DIR' in Commonizer tests 2021-08-09 09:48:44 +00:00
sebastian.sellmair 552a012e65 [Gradle] Add missing mavenCentral repository to test projects 2021-08-09 09:48:44 +00:00
sebastian.sellmair 3625c953ae [Gradle] CInteropCommonizerDependent: Implement 'fromAssociateCompilations'
This additional API and changes in CInteropCommonizerDependencies.kt
will make sure, that test source sets will still receive commonization
results, even when the exact targets are not requested by
any of the main source sets.

^KT-48138 Verification Pending
2021-08-09 09:48:43 +00:00
sebastian.sellmair 9a39b1f4d1 [Gradle] Implement integration test to cover ^KT-48138 2021-08-09 09:48:43 +00:00
sebastian.sellmair c07dcb27df [Gradle] CommonizerIT: Add assertion on commonMain when jvm target is present 2021-08-09 09:48:42 +00:00
sebastian.sellmair 5485a6d6cd [Gradle] CInteropCommonizerDependent: Drop bad condition on compilations
The dropped condition is bad, since source sets like 'commonMain'
might still participate in a 'compileKotlinMetadata' task,
which is not a shared native compilation.

It is absolutely okay to just rely on the return of
'getCommonizerTarget': If a shared commonizer target is returned,
then the source set is guaranteed to be a shared native source set.

^KT-48118 Verification Pending
2021-08-09 09:48:42 +00:00
sebastian.sellmair b1c5c10233 [Gradle] Implement test KT-48118 c-interops available in commonMain
Integration Test project was taken from:
https://github.com/4qa/kotlin-multiplatform-issues/tree/cinterop-common

The issue seems to be twofold:
1) The old `compileKotlinMetadata` task is still found, even
when compatibilityMetadataVariant is disabled

2) The shared native compilation for commonMain can't be found, because
it is not listing its default source set:
(see: https://youtrack.jetbrains.com/issue/KT-45412)

Covers ^KT-48118
2021-08-09 09:48:42 +00:00
Alexander Udalov 209c0fe819 Revert "[Test] Temporary mute some tests because of problems with RepeatedAnnotationLowering"
This reverts commit 3a210f6c81.
2021-08-06 22:47:44 +02:00
Alexander Udalov ca7334acb9 Fix some warnings in Gradle plugin and related modules 2021-08-06 22:36:58 +02:00
Alexander Udalov e0643a4185 Build: use -Xskip-runtime-version-check globally in project 2021-08-06 22:36:22 +02:00
Alexander Udalov 1599a049aa Fix warnings in scripting modules 2021-08-06 22:36:22 +02:00
Yahor Berdnikau b5ea811b9f Migrated BuildCacheIT tests to new DSL.
^KT-45745 In Progress
2021-08-06 20:09:05 +02:00
Yahor Berdnikau 20afb268d1 Allow providing specific kapt options.
^KT-45745 In Progress
2021-08-06 20:09:04 +02:00
Yahor Berdnikau 3d4186bdb1 Allow enabling build cache debug information.
^KT-45745 In Progress
2021-08-06 20:09:04 +02:00
Yahor Berdnikau e949a0d38d Add assertion checking if task was put into build cache.
^KT-45745 In Progress
2021-08-06 20:09:00 +02:00
Yahor Berdnikau d375c52830 Remove deprecated 'kotlin.useFallbackCompilerSearch' property.
^KT-46719 Fixed
2021-08-06 15:36:46 +00:00
Igor Laevsky 5db8ec6551 WASM: Don't use intrinsics to specify NaN's 2021-08-06 17:34:21 +03:00
Dmitriy Novozhilov 3a210f6c81 [Test] Temporary mute some tests because of problems with RepeatedAnnotationLowering
^KT-48131
2021-08-06 16:40:16 +03:00
sebastian.sellmair dbdc6176f0 [Gradle] GradleIT: kotlinToolingMetadataAndroid: Add java 8 support
^KT-48019
2021-08-06 09:25:01 +00:00
Yahor Berdnikau 7b6dddf012 Replace usages of IncrementalTaskInputs with InputChanges.
Gradle IncrementalTaskInputs was long time ago deprecated and not
so flexible as a new proposed way - InputChanges.

^KT-47867 Fixed
2021-08-06 08:44:56 +00:00
Sergey Igushkin 395b2119a1 Fixup for the fix of KT-47506 interfering with CInterop changes
As the `*Default` configurations are gone, each K/N target now has two
consumable configuration, the `*ApiElements` and the
`*CInteropApiElements`. They have diverging sets of attributes (both
more concrete than `*Default` had).

To make their attribute sets non-diverging, we set the
local-to-project=public on the `*CInteropApiElements` in order to match
the same attribute on the `*ApiElements` configuration

Related to the original fix of KT-47506
2021-08-05 17:53:37 +00:00
sebastian.sellmair ee0b64cb29 [Gradle] BuildKotlinToolingMetadataTask: Ensure clean output directory
This is done to prevent unwanted files from also being located
in the output directory. If the task is executed it is expected
that the output directory only contains this one file.

This is necessary, since *everything* located in the output directory
will potentially be bundled into release apks.

^KT-48019
2021-08-05 16:00:08 +00:00
sebastian.sellmair e897c60ef1 [Gradle] [Android] Only bundle kotlin tooling metadata for non debuggable variants
^KT-48019
2021-08-05 16:00:08 +00:00
sebastian.sellmair 79565da904 [Gradle] [Android] Implement 'test KotlinToolingMetadataArtifact is bundled into apk'
Covers ^KT-48019
2021-08-05 16:00:08 +00:00
sebastian.sellmair 82a70a205b [Gradle] [Android] Include kotlin-tooling-metadata.json in apk artifact
^KT-48019 Verification Pending
2021-08-05 16:00:07 +00:00
Alexander Udalov 0925e1b497 Enable JVM IR for stdlib/reflect/test libraries
Changes in Gradle integration tests are needed because:
- in new-mpp-android, kotlin-stdlib-jdk8 is used, and JVM IR generates
  JDK 8-specific bytecode (invokedynamic). D8 needs to be configured to
  desugar it with source/target versions set to 1.8, otherwise it
  reports an error.
- in AndroidExtensionsManyVariants and AndroidIcepickProject, D8 fails
  with assertions enabled if AGP < 4.0.0 is used because of
  https://issuetracker.google.com/issues/148661132. The tests which use
  old AGP versions are probably not relevant anymore anyway.

Changes in kotlin-stdlib-runtime-merged.txt are caused by a slightly
different generation scheme of collection subclasses in JVM IR, and are
harmless.

(Previous attempt was at 15e978dbd311c2ba78ec32b394c21acde9811ccb.)
2021-08-05 12:36:35 +02:00
Abduqodiri Qurbonzoda 29ac9b33ca Add Duration.parse/parseIsoString samples 2021-08-05 10:32:33 +00:00
Abduqodiri Qurbonzoda 5004735366 Add Regex matchAt samples 2021-08-05 10:32:32 +00:00
Abduqodiri Qurbonzoda d7b10f31b4 Add Regex splitToSequence samples 2021-08-05 10:32:32 +00:00