5639 Commits

Author SHA1 Message Date
Johan Bay 48ce542e95 [K/N] add header_cache output type
^KT-65443
2024-03-19 14:09:44 +00:00
Dmitrii Krasnov ffef1630dd [Gradle] Added provisioned.ok after k/n bundle installation
Added provisioned.ok file to ensure
that Kotlin Native bundle has been successfully installed.

^KT-66309 Fixed
2024-03-18 13:35:41 +00:00
Ilya Goncharov 8b258426ee [Wasm]Log webpack result only in there was infrastructure logging before 2024-03-16 09:44:51 +00:00
Dmitriy Dolovov a007551574 Revert "[K/N] add header_cache output type"
This reverts commit 84341a9e25.
2024-03-15 22:32:50 +01:00
Nataliya.Valtman 762927410a Use snapshot version for kotlin native when kotlin.native.enabled=true
#KT-64046: Fixed
2024-03-15 18:30:16 +00:00
Nataliya.Valtman 76d555e5d6 Add FUS metrics for power-assert compiler plugin usage
#KT-63619: Fixed
2024-03-15 13:53:50 +00:00
Ilya Goncharov 8a9fb7d954 [Wasm] Print result of webpack and webpack process not into error log level, print everything from webpack to info log
^KT-64601 fixed
2024-03-15 13:32:45 +00:00
Anton Lakotka 2880082c9a [Gradle] Test for KLIB manifest in CompositeMetadataArtifactImpl
This should protect from cases when CompositeMetadataArtifact got
polluted due to some bugs or user misconfiguration.

One of the cases is when resource file is added to common source set.
In this case due to KT-66563 bug, resources will be mixed in to the
KLIB content. But if for some source set there is no sources.
Then in composite metadata artifact will be only the resources.
And previous implementation of CompositeMetadataArtifactImpl treated
that content as Metadata KLIB, however the metadata compiler didn't.
And thus it was failing with. This change makes it stricter.

Now it checks for `default/manifest` entry. This entry is considered
a sane check for KLIB content.

^KT-65315 Verification Pending
2024-03-15 13:13:47 +00:00
Johan Bay 84341a9e25 [K/N] add header_cache output type
^KT-65443
2024-03-15 10:24:25 +00:00
Timofey Solonin 9295f44eda Quote module name in the generated modulemap
This fixes an issue where Kotlin projects named "umbrella" or
"framework" produce unimportable framework modules.

^KT-66565
2024-03-14 19:19:57 +00:00
Artem Daugel-Dauge 06960394b7 [Gradle] Fix issues with EmbedAndSignUsedWithPodDependencies diagnostic
Emit diagnostic right after task graph had been formed instead of waiting for embedAndSign execution

(^KT-66445,^KT-66446) Verification Pending
2024-03-14 18:40:16 +00:00
Andrey Yastrebov 6028595ce4 KT-66486 Do not use synthetic project for spm 2024-03-13 22:59:38 +00:00
Dmitry Savvinov b19ad2505c [native] Remove code support for experimental KonanTargets
ZEPHYR was the first and the last experimental KonanTarget.
As ZEPHYR is now entirely removed from the codebase, the respective code
can be dropped

^KT-64517
2024-03-12 16:22:27 +00:00
Dmitry Savvinov 8f3c0e71fa [native] Drop deprecated Kotlin/Native targets (5/8)
Adjust KGP: drop usages of deprecated KonanTargets, leave
@Deprecated-stubs in public APIs for readable errors

^KT-64517
2024-03-12 16:22:27 +00:00
Dmitry Savvinov 85bcc8443d [native] Drop deprecated Kotlin/Native targets (2/8)
Remove plain references to removed KonanTarget or Family entries. All
the changes in this commit are simple removal of some when-branches
on now dropped entries

^KT-64517
2024-03-12 16:22:26 +00:00
Dmitrii Krasnov f18d00e6f0 [Gradle] Changed the way of unpacking k/n dependencies
Creating `tar` process is not supported by configuration cache.
Inner Gradle copy and archive operations don't work well with symlinks.
That is why we are using utils from org.apache.commons:commons-compress.

^KT-66422 Fixed
2024-03-12 11:55:13 +00:00
Dmitrii Krasnov fb3c1f1a2f [Gradle] Disabled MissingNativeStdlibChecker when k/n toolchain enabled
This checker was added to check that k/n home was correctly overridden.
With k/n toolchain we always download k/n distribution.
That is why when k/n toolchain is enabled we don't need this check.

^KT-65624 Fixed
2024-03-12 11:55:13 +00:00
Anton Lakotka a56dc7d73a [Gradle] Don't resolve Apple-specific Cinterops on Linux & Windows
Resolving such dependencies was lenient, however it produced
a lot of annoying error messages in the IDE. Because "file not found".

KGP already warns user if they are declared Apple-specific targets
on non-macos machine.

^KT-66514 Verification Pending
2024-03-12 09:54:08 +00:00
Anton Lakotka e2336e1752 [Gradle] Fix friendArtifactResolver for External Targets API
It was failing with ClassCastException in an attempt of using it.

Also added a test case to cover the logic with friendArtifactResolver

^KT-66431 Verification Pending
2024-03-12 09:52:57 +00:00
Timofey Solonin 5873127342 Apply resolution strategy before applying KGP in resources tests
^KT-66133
2024-03-12 09:38:52 +00:00
Timofey Solonin 1849f17228 Make variant reselection the default resolution strategy
^KT-66133
2024-03-12 09:38:52 +00:00
Timofey Solonin c34bfcdb1d Emit a diagnostic if variant reselection is used pre Gradle 7.6
^KT-66133
2024-03-12 09:38:52 +00:00
Dmitrii Krasnov 8d7844316b [Gradle] Removed using rootProject from KonanPropertiesBuildService
^KT-64995 Fixed
2024-03-11 12:07:14 +00:00
Artem Daugel-Dauge bfbc33e3f6 [Gradle] Fix macOS functionalTests 2024-03-11 09:09:10 +00:00
Timofey Solonin 1a4eaf796d Make resources configuration lenient
This prevents resolution failures if resources configuration ends up
selecting java-api variants

^KT-66393
2024-03-11 09:05:35 +00:00
Timofey Solonin 947d4c57e7 Reproduce resources resolution failure with legacy stdlib in dependencies
Sometimes native variants might depend on java-api dependencies.
Resources configuration doesn't have compatibility rules for these and fails to resolve them.

^KT-66393
2024-03-11 09:05:35 +00:00
Timofey Solonin f813ca1975 Allow js target resources publication
^KT-65540
2024-03-11 09:04:25 +00:00
Timofey Solonin 76814a8bbe Test expected js target resources publication bahavior
^KT-65540
2024-03-11 09:04:25 +00:00
Anton Lakotka 5779465366 [Gradle] Don't resolve platform classpath configuration consistently ...
... with metadata dependencies. As it can cause unexpected version
downgrades.

This change restores behavior that existed previous versions. While
the separation between different source set trees remained.

The proper implementation should be done as part of KT-66375.

Related tests that were verifying the fact that platform dependencies
are also resolved consistently is ignored with reference to KT-66375

^KT-66372 Verification Pending
^KT-66154 Verification Pending
^KT-66375
2024-03-08 17:50:09 +00:00
Ilya Goncharov c3a0a41524 [Wasm] Use named imports in test-loader, runUnitTests generating into static dir
KT-65777
2024-03-08 16:30:24 +00:00
Anton Lakotka 753e365c9e [Gradle, WASM] Move stability warning to Diagnostics Infra
And report it only once per build, so it doesn't spam users with
multiple projects in the logs.

^KT-66429 Verification Pending
2024-03-08 10:58:12 +00:00
Andrey Yastrebov 08f6e21f5d KT-66225 Add NativeBinary baseName test 2024-03-08 10:46:40 +00:00
Andrey Yastrebov bec832d39f KT-66225 Do not rewrite baseNameProvider in NativeBinary 2024-03-08 10:46:40 +00:00
Ilya Goncharov 6fb6f04509 [Gradle, Wasm] Not add target listeners for wasi projects
^KT-66373 fixed
2024-03-06 18:23:41 +00:00
Artem Kobzar 77f0cba23f [K/JS] Introduce v2015 target 2024-03-06 12:21:38 +00:00
Nataliya.Valtman c2023142f5 Add validation for empty kotlin.build.report.json.directory property
#KT-66314: Fixed
2024-03-05 15:05:56 +00:00
Timofey Solonin 2a445a04b0 Specify androidTarget's source sets graph in tests
^KT-65540
2024-03-05 13:38:00 +00:00
Timofey Solonin a8266eb20e Simplify set up of the resources variant in js and native targets
^KT-65540
2024-03-05 13:38:00 +00:00
Timofey Solonin 1895e480c5 Mark resources APIs in ExternalKotlinTarget with ComposeKotlinGradlePluginApi
^KT-65540
2024-03-05 13:38:00 +00:00
Timofey Solonin 9f6fb715dd Improve the creation of resolvable resources configuration
* Remove type casting for KotlinJsIrTarget
* Only create a resolvable configuration when the appropriate strategy
  is used

^KT-65540
2024-03-05 13:38:00 +00:00
Alexander.Likhachev 9d88e90821 [BTA, Gradle] Share cached classloaders between builds
^KT-64353 Fixed
2024-03-05 10:51:10 +00:00
Ilya Goncharov 0ce7bdc837 [Gradle, Wasm] Fix compileSync input for production binary
^KT-66228 fixed
^KT-66159 fixed
2024-03-05 10:27:43 +00:00
Dmitrii Krasnov 808d4353e5 [Gradle] Fixed race condition during k/n bundle downloading
Extended lock bounds.
Moved removing an old bundle back to configuration phase.

^KT-65985 Fixed
2024-03-01 10:34:26 +00:00
Andrey Yastrebov 42f6eb4eb4 KT-66156 add KotlinRuntime to Swift Export Synthetic 2024-02-29 08:11:29 +00:00
Yahor Berdnikau 3511733aa7 [Gradle] Deprecate kotlinOptions in KotlinNativeLinkArtifactTask task
^KT-63419 Verification Pending
2024-02-28 21:20:18 +00:00
Yahor Berdnikau 48a84e5b79 [Gradle] Deprecate kotlinOptions in KotlinNativeLinkArtifactTask task
^KT-63419 In Progress
2024-02-28 21:20:18 +00:00
Yahor Berdnikau 6719a437f7 [Gradle] Deprecate kotlinOptions in KotlinNativeLink task
^KT-63419 In Progress
2024-02-28 21:20:18 +00:00
Yahor Berdnikau 6e874340e9 [Gradle] Deprecate Kotlin*Options types
^KT-63419 In Progress
2024-02-28 21:20:18 +00:00
Yahor Berdnikau 4921a29aa5 [Gradle] Deprecate dceOptions in KotlinJsDce task
^KT-63419 In Progress
2024-02-28 21:20:18 +00:00
Yahor Berdnikau 24acf800d6 [Gradle] Deprecate KotlinCompile DSL
^KT-63419 In Progress
2024-02-28 21:20:18 +00:00