Commit Graph

9903 Commits

Author SHA1 Message Date
Ilya Goncharov 5df8ac4d1a [Gradle, JS] Ignore stdout for mocha dry run
^KT-61992 fixed
2023-10-19 09:46:01 +00:00
Igor Chevdar 40e8552a8d [gradle] Added a bunch of Gradle IT on K/N incremental compilation 2023-10-19 07:57:36 +00:00
Ilya Gorbunov 3622ea2e33 [stdlib-gen] Minor refactoring: use enum entries instead of values 2023-10-19 03:11:54 +00:00
Ilya Gorbunov ff2254db69 [stdlib] Remove generator templates for js legacy 2023-10-19 03:11:53 +00:00
Ilya Gorbunov 1d232c69d6 [stdlib] Move location of generated sources for js-IR compilation 2023-10-19 03:11:53 +00:00
strangepleasures a33da2a1c6 Temporarily disable Kapt4IT and KaptIncrementalIT and the descendants.
Those tests are currently producing OOMs on Windows
2023-10-18 17:40:29 +00:00
Hung Nguyen 5ceebec331 Cache Gradle properties with a BuildService to improve performance
Currently, the performance overhead when loading a Gradle property
consists of:
  1. Creating a Provider
  2. Resolving the Provider

Both steps are performed even when the same property was loaded before.
That means this overhead will multiply when there are a large number of
property read requests (e.g., in KT-62496, the tested project 400,000
read requests for only 17 properties).

To improve performance, we will now cache both steps with a
BuildService.

With this commit, configuration time for the tested project returns to
the same level before commit d6becee where the performance regression
happened (that commit can't be reverted because it introduced
`Provider`s which are required for proper Gradle usage).

Test: Manually verified on the large project in KT-62496

^KT-62496 Fixed
2023-10-18 17:27:32 +00:00
Dmitriy Novozhilov 9366847e96 [FIR2IR] Properly approximate intersection types during fir2ir conversion
^KT-62544 Fixed
2023-10-18 13:02:11 +00:00
Sebastian Sellmair 6afe716238 [Gradle] Implement CustomizeKotlinDependenciesSetupAction
KT-61634
2023-10-18 12:22:09 +00:00
Sebastian Sellmair eba13b5b91 [Gradle] KotlinSingleTargetExtension: Implement lateinit target as Future
It is not obvious from 'KotlinSingleTargetExtension' that calling
into 'target' is unsafe and it might throw.

Ordering code (especially with Android) is hard:
It is not clear when the target will become available.

The Future (and forAllTargets implementation) is intended
to make working with targets generically more safe.

KT-61634
2023-10-18 12:22:08 +00:00
Sebastian Sellmair 77376f0d28 [Gradle] Implement KotlinMultiplatformSourceSetSetupAction
KT-61634
2023-10-18 12:22:08 +00:00
Sebastian Sellmair 382482a26c [Gradle] Implement MultiplatformBuildStatsReportSetupAction
KT-61634
2023-10-18 12:22:08 +00:00
Sebastian Sellmair 070b80a05f [Gradle] Implement KotlinMetadataTargetSetupAction
KT-61634
2023-10-18 12:22:08 +00:00
Sebastian Sellmair 0ccb98f579 [Gradle] Implement KotlinArtifactsExtensionSetupAction
KT-61634
2023-10-18 12:22:08 +00:00
Sebastian Sellmair cc0a9e1cc1 [Gradle] Implement MultiplatformPublishingSetupAction
KT-61634
2023-10-18 12:22:08 +00:00
Sebastian Sellmair 822cb7f545 [Gradle] Implement UserDefinedAttributesSetupAction
KT-61634
2023-10-18 12:22:08 +00:00
Sebastian Sellmair c22a7bf802 [Gradle] Implement LanguageSettingsSetupAction
KT-61634
2023-10-18 12:22:08 +00:00
Sebastian Sellmair 8ca1c06cf2 [Gradle] Implement SyncLanguageSettingsWithKotlinExtensionSetupAction
KT-61634
2023-10-18 12:22:08 +00:00
Sebastian Sellmair 58385ef64f [Gradle] Implement ScriptingGradleSubpluginSetupAction
KT-61634
2023-10-18 12:22:08 +00:00
Sebastian Sellmair 9ca22fa999 [Gradle] Implement GlobalProjectStructureMetadataStorageSetupAction
KT-61634
2023-10-18 12:22:08 +00:00
Sebastian Sellmair 2b823cba1e [Gradle] Implement IdeMultiplatformImportSetupAction
KT-61634
2023-10-18 12:22:08 +00:00
Sebastian Sellmair 246deafd6d [Gradle] Implement IdeResolveDependenciesTaskSetupAction
KT-61634
2023-10-18 12:22:08 +00:00
Sebastian Sellmair 9d01ad7c3b [Gradle] Implement CInteropCommonizedCInteropApiElementsConfigurationsSetupAction
KT-61634
2023-10-18 12:22:08 +00:00
Sebastian Sellmair b9db036053 [Gradle] Implement AddBuildListenerForXCodeSetupAction
KT-61634
2023-10-18 12:22:07 +00:00
Sebastian Sellmair 3be2eb9b31 [Gradle] Implement CreateFatFrameworksSetupAction
KT-61634
2023-10-18 12:22:07 +00:00
Sebastian Sellmair c7b4057dab [Gradle] Implement KotlinProjectSetupCoroutine
as util to easily launch configure action as suspending code

KT-61634
2023-10-18 12:22:07 +00:00
Sebastian Sellmair 628bd7a6be [Gradle] Implement KotlinMultiplatformAndroidGradlePluginCompatibilityChecker
KT-61634
2023-10-18 12:22:07 +00:00
Sebastian Sellmair 234e5735e3 [Gradle] Implement KotlinToolingDiagnosticsSetupAction
KT-61634
2023-10-18 12:22:07 +00:00
Sebastian Sellmair 1c568c2a10 [Gradle] Implement RegisterBuildKotlinToolingMetadataTask
KT-61634
2023-10-18 12:22:07 +00:00
Sebastian Sellmair 13492d3316 [Gradle] Implement AddNpmDependencyExtensionProjectSetupAction
KT-61634
2023-10-18 12:22:07 +00:00
Sebastian Sellmair ff6b883cb4 [Gradle] Implement KotlinProjectSetupAction extensionPoint
KT-61634
2023-10-18 12:22:07 +00:00
Nataliya.Valtman 9de791b9ac Create FUS Gradle plugin
fus-statistics-gradle-plugin can be used by any other Gradle plugins to
collect additional metrics for FUS.

KT-59627
2023-10-18 10:32:11 +00:00
Dmitriy Novozhilov a35f2eb90e Build: switch language level for compilation to 2.0
KT-61951
2023-10-18 07:59:26 +00:00
Sebastian Sellmair 5642f2a8c4 [build] acceptAndroidSdkLicenses, functionalTest: Support Gradle configuration cache 2023-10-18 07:51:17 +00:00
Anton Lakotka d090791e40 [Gradle] Change rootOutputDirectoryProperty to be DirectoryProperty
^KT-61359 Verification Pending
2023-10-18 04:50:47 +00:00
Anton Lakotka d74a1133e9 [Gradle] Merge testCommonizer and testCleanCommonizationWithConfigurationCache
They are essentially testing the same thing. So it is logical
to merge them into single test run.

^KT-61359 Verification Pending
2023-10-18 04:50:47 +00:00
Anton Lakotka 251f52586e [Gradle] Add fileProperty(initialValue: File) utility function
^KT-61359 Verification Pending
2023-10-18 04:50:47 +00:00
Anton Lakotka 6ee4cbb6ec [Gradle, Test] Let resolveAllConfiguration depend on commonizeNativeDistribution
after introducing changes as part of KT-61359

^KT-61359 Verification Pending
2023-10-18 04:50:47 +00:00
Anton Lakotka c08fb1cae6 [Gradle] add rootOutputDirectoryProperty to NativeDistributionCommonizerTask
And read commonized klibs in execution time only.
it is possible only when rootOutputDirectoryProperty is marked as
OutputDirectory.

```kotlin
class Producer {
  @get:OutputDirectory
  val foo: RegularFileProperty

  @get:Internal
  val bar: RegularFileProperty
}

val foo = producer.flatMap { it.foo.map { it.listFiles() } }
val bar = producer.flatMap { it.bar.map { it.listFiles() } }
```

`foo` file collection will be evaluated at execution time.
Because `Producer.foo` is an OutputDirectory and its content unknown
during configuration time.
But `bar` file collection will be evaluated at configuration time.
Because according to gradle model it is not Output and therefore
its content can be evaluated before task execution.

^KT-61359 Verification Pending
2023-10-18 04:50:47 +00:00
Anton Lakotka 2111bfae40 [Gradle] Test commonizeNativeDistribution task is not initialized
^KT-61359 In Progress
2023-10-18 04:50:47 +00:00
Anton Lakotka e16f03fc49 [Gradle] Test commonize native distribution and compile task with GCC
It should be possible to commonize native distribution from clean state
and compile shared native code in the same gradle build with enabled
configuration cache.

^KT-61359 In Progress
2023-10-18 04:50:47 +00:00
Anton Lakotka 657dd31493 [Gradle] Remove up-to-date checks in CleanNativeDistributionCommonizer
Gradle doesn't track removed files in OutputDirectory after task
execution. So if task removed some files and if these files
are added back the task would be still UP-TO-DATE. Which is incorrect.

Executing clean task on empty directory is the same as check that
directory is empty. Therefore, this up-to-date check can be removed.

^KT-62611 Verification Pending
2023-10-18 04:50:47 +00:00
Anton Lakotka 16c17d3c22 [Gradle] Check that commonized native distribution can be cleaned
^KT-62611 In-Progress
2023-10-18 04:50:47 +00:00
Ilya Gorbunov db6dfe99a0 Update Dokka to 1.9.10 2023-10-17 15:43:59 +00:00
Sebastian Sellmair ca79860a71 [Gradle] Move 'whenEvaluated' util function into 'utils' package 2023-10-17 13:58:02 +00:00
Sebastian Sellmair 6240e2eddb [Gradle] Rename KotlinMultiplatformPlugin.kt to KotlinLegacyMultiplatformPlugin.kt 2023-10-17 13:58:01 +00:00
Sebastian Sellmair a8e637205c [Gradle] Migrate extraProperties.getOrPut usages to *StoredProperty
KT-61634
2023-10-17 12:10:15 +00:00
Sebastian Sellmair ecbd741e40 [Gradle] Rename stored{Classifier}Property to {classifier}StoredProperty
This change is intended to improve the intuition of developers.
After adding the two functions, many times developers (me) have
tried to use the 'wrong' (which is now the new name) function name.

KT-61634
2023-10-17 12:10:15 +00:00
Sebastian Sellmair 08241acb6f [Gradle] Demote ExtrasProperty APIs with little usage
Those APIs can either be replaced with StoredProperty
Some APIs also have shown to be 'hard to understand'

KT-61634
2023-10-17 12:10:15 +00:00
Ilya Goncharov 22a01432df [Gradle,JS] Remove legacy target in Gradle plugin
This reverts commit 4c82206d

^KT-60694 fixed
2023-10-17 09:42:38 +00:00