Commit Graph

2666 Commits

Author SHA1 Message Date
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
Alexander.Likhachev c2e0c8b2e9 [Gradle] Introduce KotlinToolingDiagnostics.DependencyDoesNotPhysicallyExist
Instead of silently ignoring the non-existing classpath entries, emit a warning to indicate possible project misconfiguration.
^KT-62101 Fixed
2024-02-09 18:33:30 +00:00
Alexander.Likhachev de04c62df5 [Gradle] Do not try snapshotting non-existent classpath entries
The fix changes only Gradle's side of the transformation to be consistent with general Gradle behaviour for non-existent dependencies in classpath
^KT-62101 In Progress
2024-02-09 18:33:30 +00:00
Alexander.Likhachev 75df4869cc [Gradle] Add test for KT-62101 2024-02-09 18:33:30 +00:00
strangepleasures 9688c3e761 [KAPT] Improve stub formatting; check raw stubs in tests
Merge-request: KT-MR-14244
Merged-by: Pavel Mikhailovskii <Pavel.Mikhailovskii@jetbrains.com>
2024-02-09 15:41:37 +00:00
Pavel Mikhailovskii 7ab9e03347 KT-65684: KAPT: (Re)enable fallback to K1 KAPT and make it default
[KAPT] KT-65684 Set languageVersion=1.9 in KaptToolIntegrationTestGenerated

[KAPT] KT-65684 Re-enable a few now-passing tests in Kapt4IT

[KAPT] KT-65684 Fix the logic setting -Xuse-kapt4 flag in Kapt4IT.forceKapt4()

The change is needed to make sure that all the tests have the flag set,
 otherwise some of them would silently switch to the fallback node.
Also disables a few now failing tests.

[KAPT] KT-65684 Revert "KT-64385 Enable K2 KAPT by default"

This reverts commit 7e9d6e60


Merge-request: KT-MR-14291
Merged-by: Pavel Mikhailovskii <Pavel.Mikhailovskii@jetbrains.com>
2024-02-09 12:54:28 +00:00
Ilya Goncharov b4e1fa8569 [Gradle, Wasm] Standartize binaryen and d8 download instead of download task
^KT-65686 fixed
2024-02-09 11:18:37 +00:00
Andrey Yastrebov 7c103e257d KT-62380 Copy dummy dSYM directory for cocoapods integration 2024-02-09 09:22:32 +00:00
Yahor Berdnikau 1bae743524 [Gradle] Remove old platform plugins ids
We want to remove Gradle ids for old deprecated multiplatform platform
plugins and eventually clean up the code.

Exception for now is common platform plugin as it is still used
in compiler tests. Will be removed separately.

^KT-65187 Verification Pending
2024-02-09 09:05:25 +00:00
Alexander.Likhachev 238d5504d2 [Gradle] Add tests for KT-62921 2024-02-08 19:11:26 +00:00
Alexander.Likhachev f507b19bd3 [Gradle] Move compiler version choosing logic into testHelpers.kt
Also, migrate from custom Kotlin versions to TestVersions.Kotlin.STABLE_RELEASE to avoid adding custom repositories
2024-02-08 19:11:26 +00:00
Alexander.Likhachev a904ded5f2 [Gradle] Replace useCompilerVersion by a Provider API property
Now this property acts as the single source of truth of BTA implementation version used in KGP. It allows both read and write.
^KT-62921 Fixed
2024-02-08 19:11:26 +00:00
Dmitrii Krasnov 18c08eb9ff [Gradle] Added test for addKotlinNativeBundleConfiguration 2024-02-08 17:20:37 +00:00
Yahor Berdnikau 55bbaec3f9 [Gradle] Migrate KlibBasedMppIT to new test DSL
^KT-65528 In Progress
2024-02-08 14:04:52 +00:00
Brian Norman aa34282efb [PowerAssert] Integrate with build
^KT-63617 Fixed
2024-02-07 21:51:17 +00:00
Dmitrii Krasnov be6ab943f4 [Gradle] Fixed Mac and Windows integration tests
These tests were failed because of `dependencyManagement` in testDsl.

^KT-64903


Merge-request: KT-MR-14201
Merged-by: Dmitrii Krasnov <Dmitrii.Krasnov@jetbrains.com>
2024-02-06 09:09:34 +00:00
Dmitrii Krasnov 06a3e9135c [Gradle Native] Made a k/n bundle as input for commonizeNativeDist task
Also, extracted moving konan bundle to konanHome into BuildService and wrapped moving k/n bundle to konan home with file lock.
And added an integration test for checking ^KT-65222 and ^KT-65347.

^KT-65450
^KT-65347 Fixed


Merge-request: KT-MR-14099
Merged-by: Dmitrii Krasnov <Dmitrii.Krasnov@jetbrains.com>
2024-02-05 16:37:49 +00:00
Yahor Berdnikau ad5ee28d58 [Gradle] Use proper approach to local repository
^KT-65528 In Progress
2024-02-05 16:14:41 +00:00
Yahor Berdnikau eac48d065b [Gradle] Migrate HierarchicalStructureOptInMigrationArtifactContentMppIT to new test DSL
^KT-65528 In Progress
2024-02-05 16:14:41 +00:00
Yahor Berdnikau 81fded3c8b [Gradle] Migrate KotlinToolingMetadataIT to new test DSL
^KT-65528 In Progress
2024-02-05 16:14:40 +00:00
Dmitrii Krasnov 2873b11589 [Gradle] Muted k/n IT tests on Windows
connected with this problem ^KT-62761
2024-02-02 11:44:03 +00:00
Dmitrii Krasnov d4a4696baf [Gradle] Added dependencyManagement as to Integration Tests
Also fixed found problems with k/n toolchain feature

^KT-64903 Fixed
2024-02-02 11:44:03 +00:00
Ilya Goncharov 6b6ed12df1 [Gradle, JS] Add test on source map config
^KT-59523 fixed
2024-01-29 20:43:01 +00:00
Alexander.Likhachev e8be5b4b0b [Gradle] Fix "lib with tests" tests
The tests `NewMultiplatformIT.testLibWithTests` and `NewMultiplatformIT.testLibWithTestsKotlinDsl` were broken for a while, but this was unnoticed because of the TC bug. Java targets were removed from the test project in 34f4e3cbf6. The fix just removes the Java target tests from the expected test report.
2024-01-29 18:39:41 +00:00
Alexander.Likhachev a065b7adf8 [Gradle] Escape TC service messages in debug logs unconditionally
Those messages are not required for the real TC reporting. They are printed just for debugging purposes of integration with K/N and K/JS test runners.
^KT-65295 Fixed
2024-01-29 18:39:41 +00:00
Nataliya.Valtman fc8c6dadc9 Don't run testProjectWithBuildSrcForGradleVersion7 on windows
#KT-65227
2024-01-29 14:04:51 +00:00
Ilya Goncharov d18660c8f1 [Gradle, JS] Add npm support but default Yarn package manager left
Co-authored-by: Alexander Likhachev <Alexander.Likhachev@jetbrains.com>


^KT-64119 fixed
2024-01-26 13:38:23 +00:00
Dmitrii Krasnov 692cc64d2a [Gradle IT] Fixed shouldDownloadKotlinNativeWithExistingKlibDir test
^KT-65248
2024-01-25 12:03:04 +00:00
Dmitrii Krasnov 6e763f5c41 [Gradle] Fixed downloading konan when .konan/klib exists
^KT-65222 Fixed
^KT-65248 Verification Pending

Merge-request: KT-MR-14048
Merged-by: Dmitrii Krasnov <Dmitrii.Krasnov@jetbrains.com>
2024-01-24 14:19:57 +00:00
Yahor Berdnikau 0258e71bd5 [Gradle] Set max Gradle version in tests to 8.4
^KT-62639 Verification Pending
2024-01-24 13:36:39 +00:00
Yahor Berdnikau 27dc0a55fd [Gradle] Add Gradle 8.6-rc-2 version
^KT-62639 In Progress
2024-01-24 13:36:39 +00:00
Yahor Berdnikau a6b5fd1e54 [Gradle] Update AGP test versions
^KT-62639 In Progress
2024-01-24 13:36:39 +00:00
Ilya Goncharov 9a74a5fcdd [Gradle, Wasm] Compatible wasm distribution task with configuration cache
^KT-64851 fixed
2024-01-24 11:55:33 +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
Andrey Yastrebov 6db22b4975 KT-62493 Add cocoapods custom executable path test 2024-01-23 17:40:33 +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
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
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
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
strangepleasures 7e9d6e601d KT-64385 Enable K2 KAPT by default
Also adds support for front-end compiler plugins in Kapt
2024-01-15 10:22:32 +00:00
Artem Daugel-Dauge b70c50cd1f [Gradle] Add integration tests for building through xcode with embedAndSign task
Including checks:
* running embedAndSign through a build phase
* running embedAndSign through a scheme pre-action script
* running embedAndSign through a scheme pre-action script and using Kotlin framework in local SPM package
* absense of explicit '-framework' linker flag

^KT-62376
^KT-63819
2024-01-11 08:23:50 +00:00
Artem Daugel-Dauge af4d5605ca [Gradle] Copy framework to BUILT_PRODUCTS_DIR in the embedAndSign task
^KT-63821 Verification Pending
2024-01-11 08:23:50 +00:00