Commit Graph

14430 Commits

Author SHA1 Message Date
Anton Lakotka f4681fb93a [Gradle] Add SetupKotlinNativePlatformDependenciesForLegacyImport
The code is extracted from SetupKotlinNativePlatformDependenciesAndStdlib
as the latter is applied only to native compilations and
shared native metadata compilations.
For test shared native source sets, such as `nativeTest
no native metadata compilation is created, but for legacy import
intransitive metadata dependencies should contain native platform
dependencies listed. And
SetupKotlinNativePlatformDependenciesForLegacyImport fixes that.

^KT-61559 Verification Pending
2024-01-23 22:14:32 +00:00
Anton Lakotka 721aafc94c [Gradle] Disable stdlib for Kotlin Native Compile and Link tasks
^KT-61559 Verification Pending
2024-01-23 22:14:32 +00:00
Anton Lakotka 4a0bfcd842 [Gradle] Add AddKotlinPlatformIntegersSupportLibrary
Move code from KotlinNativePlatformDependencies.kt

^KT-61559
2024-01-23 22:14:32 +00:00
Anton Lakotka 1604ab1e0b [Gradle] Add SetupKotlinNativePlatformDependenciesAndStdlib
This extension point adds NativePlatformDependencies And Stdlib to
compileFiles of Native Compilations.

^KT-61559 Verification Pending
2024-01-23 22:14:32 +00:00
Anton Lakotka 32de4a6b2c [Gradle] test that native compilation has platform dependencies
^KT-61559 Verification Pending
2024-01-23 22:14:32 +00:00
Anton Lakotka 599a6c7d6d [Gradle] Fix Native Linker integration test after adding platform libs
in compiler classpath. Now K/Native compiler doesn't "compress" platform
libraries when printing linker error.

^KT-61559 Verification Pending
2024-01-23 22:14:32 +00:00
Anton Lakotka 639e048438 [Gradle] Include native platform dependencies explicitly
They are now also exposed via KotlinCompilation.compileDependencyFiles
Which is useful for tools like dokka that relies on exhaustive
list of dependencies for given source set/compilation.

^KT-61559 Verification Pending
2024-01-23 22:14:32 +00:00
strangepleasures 85c9c57da4 [KAPT] KT-65006 fix issues when using Kapt+Serialization
This MR fixes two independent issues causing build failures when using Kapt in combination with the Kotlin serialization plugin (and, very likely, with other plugins as well):
Kapt applied compiler plugins twice, causing errors similar to the one described in KT-65006
Kapt failed to generate @Metadata annotations for plugin-generated companion objects because the corresponding SLC missed containingFile needed for generation of method and class signatures

Merge-request: KT-MR-13970
Merged-by: Pavel Mikhailovskii <Pavel.Mikhailovskii@jetbrains.com>
2024-01-23 20:35:32 +00:00
Ilya Gorbunov 72528056fb [kotlin-test] Migrate integration tests project from deprecated K/JS plugin 2024-01-23 17:57:48 +00:00
Ilya Gorbunov 000db0bb44 [kotlin-test] Move kotlin-test integration tests project 2024-01-23 17:57:48 +00:00
Andrey Yastrebov 6db22b4975 KT-62493 Add cocoapods custom executable path test 2024-01-23 17:40:33 +00:00
Andrey Yastrebov 7958f77d09 KT-62493 explicit pod executable path in local.properties 2024-01-23 17:40:33 +00:00
Dmitrii Krasnov 6aab336979 [Gradle] Added fix for :kotlin-gradle-plugin:compileFunctionalTestKotlin
^KT-58303
2024-01-23 08:59:16 +00:00
Yahor Berdnikau 207750f6ae [Gradle] Fix warnings in SingleTargetSourceDirConfigurator
^KT-56904 In Progress
2024-01-22 20:50:08 +00:00
Yahor Berdnikau 0a95407209 [Gradle] Fix warnings in MultiplatformLayoutV2SourceDirConfigurator
^KT-56904 In Progress
2024-01-22 20:50:07 +00:00
Yahor Berdnikau 7e7156b49a [Gradle] Fix warnings in MultiplatformLayoutV2DependsOnConfigurator
^KT-56904 In Progress
2024-01-22 20:50:07 +00:00
Yahor Berdnikau 3036b408ff [Gradle] Fix warnings in MultiplatformLayoutV2DefaultManifestLocationConfigurator
^KT-56904 In Progress
2024-01-22 20:50:07 +00:00
Yahor Berdnikau cfc48c6e94 [Gradle] Fix warnings in MultiplatformLayoutV1SourceDirConfigurator
^KT-56904 In Progress
2024-01-22 20:50:07 +00:00
Yahor Berdnikau 8ee9753045 [Gradle] Fix warnings in MultiplatformLayoutV1DependsOnConfigurator
^KT-56904 In Progress
2024-01-22 20:50:07 +00:00
Yahor Berdnikau 17b0ffb208 [Gradle] Fix warnings in MultiplatformAndroidResourceDirConfigurator
^KT-56904 In Progress
2024-01-22 20:50:07 +00:00
Yahor Berdnikau 0e78e98ca0 [Gradle] Fix warnings in KotlinAndroidSourceSetInfoConfigurator
^KT-56904 In Progress
2024-01-22 20:50:07 +00:00
Yahor Berdnikau cbfc2eb9c0 [Gradle] Fix warnings in KotlinAndroidSourceSetConfigurator
^KT-56904 In Progress
2024-01-22 20:50:07 +00:00
Yahor Berdnikau be848cc432 [Gradle] Fix warnings in GradleConventionAddKotlinSourcesToAndroidSourceSetConfigurator
^KT-56904 In Progress
2024-01-22 20:50:07 +00:00
Yahor Berdnikau 8b0c975590 [Gradle] Fix warnings in AndroidKaptSourceSetConfigurator
^KT-56904 In Progress
2024-01-22 20:50:07 +00:00
Yahor Berdnikau 1c7f2b3066 [Gradle] Fix warnings in Agp7AddKotlinSourcesToAndroidSourceSetConfigurator
^KT-56904 In Progress
2024-01-22 20:50:07 +00:00
Dmitrii Krasnov 7165d15d59 [Gradle Native] Added Kotlin Native Provider to all native tasks
This provider is a first step of "Kotlin Native Toolchain".
This solves several problems:
1) Resolving K/N bundle during configuration phase ->
now it happens during execution phase
2) Downloading K/N bundle with internal mechanisms ->
now it uses Gradle dependency resolvers and Transform Artifact

^KT-58303
^KT-52567
^KT-49268
2024-01-22 20:26:24 +00:00
Yahor Berdnikau fcfc2446cf [Gradle] Use specialized 'dependencyScope' configuration container
Gradle 8.4 has introduced a new set of APIs:
https://docs.gradle.org/8.4/release-notes.html#easier-to-create-role-focused-configurations

We this change we started to create a 'DependencyScopeConfiguration'
for configurations used to declare dependencies.

^KT-65143 In Progress
2024-01-22 16:43:46 +00:00
Anton Lakotka be1819da58 [Gradle] Add log level control for K/Native compiler arguments
Just like it was done for other Compile tasks.

^KT-64848 Verification Pending
2024-01-22 15:24:45 +00:00
Andrey Yastrebov c483e54e2d KT-63212 Handle outdated Xcodeproj error message 2024-01-22 13:59:26 +00:00
Yahor Berdnikau ae09c0fb60 [Gradle] Run tests against Gradle 8.3
^KT-59024 Verification Pending
2024-01-22 12:23:57 +00:00
Yahor Berdnikau 53fa25cafd [Gradle] Add AGP 8.4 test version
And update AGP 8.3 version.

^KT-59024 In Progress
2024-01-22 12:23:57 +00:00
Yahor Berdnikau dbd77fc785 [Gradle] Fix eager task realization due to attributes querying
Gradle 8.3+ starts triggering JVM eager tasks creating via eagerly
configured attributes that we copy over from the Gradle JVM plugin for
Kotlin compilation. The fix is to migrate to '.attributeProvider()' API
to configure the attribute.

^KT-60664 In Progress
2024-01-19 14:58:23 +00:00
Yahor Berdnikau facc9cdb58 [Gradle] Add compiler options DSL for Kotlin targets
Restore compiler options DSL for all Kotlin targets. 'KotlinTarget'
interface does not provide any common way to configuring options - this
is the responsibility of related plugin extensions.

From the hierarchical standpoint of view target DSL overrides options
configured in the extension.

^KT-57292 In Progress
2024-01-19 14:16:11 +00:00
Yahor Berdnikau e527781772 [Gradle] Introduce HasConfigurableCompilerOptions DSL interface
This interface should be attached to the KGP DSL entities that want to
provide an ability to configure Kotlin compiler options.

^KT-60733 In Progress
2024-01-19 14:16:11 +00:00
Adam Semenenko a6524be97a !fixup [Gradle] refactor Gradle task assertion utils for clarity
- Rename/update to differentiate between 'executed' tasks vs tasks
  that are not in the task graph
- de-duplicate assertTasksNotExecuted() / assertTasksAreNotInTaskGraph()
  they both did the same thing
- re-use code for verifying all tasks have a specific outcome
- add a more helpful failed assertion message if the task isn't found
- rename 'tasks' to 'taskPaths' for clarity
2024-01-19 11:21:27 +00:00
Adam Semenenko 1661957166 !fixup [Gradle] refactor Gradle task assertion utils for clarity
- Rename/update to differentiate between 'executed' tasks vs tasks
  that are not in the task graph
- de-duplicate assertTasksNotExecuted() / assertTasksAreNotInTaskGraph()
  they both did the same thing
- re-use code for verifying all tasks have a specific outcome
- add a more helpful failed assertion message if the task isn't found
- rename 'tasks' to 'taskPaths' for clarity
2024-01-19 11:21:27 +00:00
Adam Semenenko ad8341df9b [Gradle] refactor Gradle task assertion utils for clarity
- Rename/update to differentiate between 'executed' tasks vs tasks
  that are not in the task graph
- de-duplicate assertTasksNotExecuted() / assertTasksAreNotInTaskGraph()
  they both did the same thing
- re-use code for verifying all tasks have a specific outcome
- add a more helpful failed assertion message if the task isn't found
- rename 'tasks' to 'taskPaths' for clarity
2024-01-19 11:21:26 +00:00
Adam Semenenko 4b48f15d0f [Gradle] skip CheckKotlinGradlePluginConfigurationErrors if no errors
- Add an `onlyIf {}` check so CheckKotlinGradlePluginConfigurationErrors
  won't run unless there are errors,
which helps writing integration tests and preventing IJ warnings.
- remove unnecessary sequence when fetching DiagnosticsForProject
- update test assertions relating to
  CheckKotlinGradlePluginConfigurationErrors

^KT-61943 Fixed
2024-01-19 11:21:26 +00:00
Yahor Berdnikau 6234b9960c [Gradle] Fix warnings in ExternalKotlinCompilationDescriptor
^KT-56904 In Progress
2024-01-18 22:45:58 +01:00
Yahor Berdnikau 3b837734d1 [Gradle] Fix warnings in MultiplatformLayoutV2MultiplatformLayoutV1StyleSourceDirUsageChecker
^KT-56904 In Progress
2024-01-18 21:12:28 +00:00
Yahor Berdnikau bc7c342003 [Gradle] Fix warnings in MultiplatformLayoutV2AndroidStyleSourceDirUsageChecker
^KT-56904 In Progress
2024-01-18 21:12:28 +00:00
Yahor Berdnikau 7de6fda9f2 [Gradle] Fix warnings in KotlinAndroidSourceSetLayoutChecker
^KT-56904 In Progress
2024-01-18 21:12:28 +00:00
Yahor Berdnikau 01824a336c [Gradle] Fix warnings in MultiplatformLayoutV2KotlinAndroidSourceSetNaming
^KT-56904 In Progress
2024-01-17 19:32:04 +00:00
Yahor Berdnikau 5ed28a6a79 [Gradle] Fix warnings in KotlinAndroidSourceSetNaming
^KT-56904 In Progress
2024-01-17 19:32:04 +00:00
Yahor Berdnikau ca996d0833 [Gradle] Fix warnings in KotlinAndroidSourceSetInfo
^KT-56904 In Progress
2024-01-17 19:32:04 +00:00
Yahor Berdnikau db62637318 [Gradle] Fix warnings in KotlinAndroidSourceSetFactory
^KT-56904 In Progress
2024-01-17 19:32:04 +00:00
Artem Kobzar dfe2d8651e [K/JS] Prepare JS Plain Objects plugin to publication 2024-01-17 10:52:58 +00:00
Yahor Berdnikau 104e6a9b7c [Gradle] Suppress documentation for warnNpmGenerateExternals
^KT-58858 In Progress
2024-01-16 12:36:29 +00:00
Dmitry Savvinov 8236fc245b [gradle, mpp] Clean-up dead code around metadata klib manifest handling
See the added source comment for details. This commit shouldn't change
any behavior of KGP

^KT-64525
2024-01-16 10:53:37 +00:00
Alexander Popoff ddd71851cf MPP / KJS: Fix incorrect source maps generating for ESM target
(cherry picked from commit 0553a2bf12b35f33f30c6400ab3af14341877946)
2024-01-15 16:03:26 +00:00