Alexander.Likhachev
aa20bcd522
[Gradle] Fix unused parameter warnings related to the legacy JS target
...
KT-64275
2023-12-16 15:08:38 +00:00
Alexander.Likhachev
1772620d16
[Gradle] Remove redundant suppression in KotlinJsProjectExtension
2023-12-16 15:08:37 +00:00
Alexander.Likhachev
96717c644d
[Gradle] Suppress deprecation warning for KotlinCompilationToRunnableFiles usage
...
The actual usage was already under suppression; however, we don't have support for suppressing import statements (KT-30155)
We need to handle these suppressions within KT-58227 and KT-64273
2023-12-16 15:08:37 +00:00
Alexander.Likhachev
0d4dfbcf0c
[IC] Revert the paths hashing introduced in 5562c95155
...
`File.hashCode()` behavior is OS-dependent. This can lead to the loss of mapping between a path and its related data in PersistentHashMap — for instance, when a map generated on Microsoft Windows is used on macOS. Notably, this can occur even though both systems use case-insensitive filesystems by default. This commit returns the hashing based on OS-independent path strings
^KT-64016 Verification Pending
2023-12-12 17:34:11 +00:00
Alexander.Likhachev
73af0fffa9
[Build] Update Gradle Enterprise plugin to 3.14.1
...
^KTI-1473 Fixed
2023-12-07 18:31:07 +00:00
Alexander.Likhachev
28dad289b3
[Build] Remove attributes setup for the dependency scope configurations
...
This behaviour makes no sense and is deprecated: https://docs.gradle.org/8.4/userguide/upgrading_version_8.html#deprecated_configuration_usage
^KTI-1473 In Progress
2023-12-07 18:31:07 +00:00
Alexander.Likhachev
5e51826050
[Build, K/N] Remove registration and usages of convention.plugins.platformInfo
...
The entire concept of conventions is deprecated in Gradle. Here it was making the build logic implicit and hard for understanding
^KTI-1473 In Progress
2023-12-07 18:31:07 +00:00
Alexander.Likhachev
f5bcdb85a5
[Build] Migrate kotlin-stdlib-gen to Gradle Kotlin DSL
2023-12-07 18:31:07 +00:00
Alexander.Likhachev
9a0cf9c9f9
[Build] Rename kotlin-stdlib-gen/build.gradle -> build.gradle.kts
2023-12-07 18:31:06 +00:00
Alexander.Likhachev
0926ebac23
[Build] Remove BasePluginConvention usages
...
The entire concept of conventions is deprecated in Gradle. The proposed alternative for `BasePluginConvention` is `BasePluginExtension`
^KTI-1473 In Progress
2023-12-07 18:31:06 +00:00
Alexander.Likhachev
0fbd2e960d
[Build] Remove redundant .forUseAtConfigurationTime() calls
...
Starting from Gradle 7.4, these calls are no longer required.
^KTI-1473 In Progress
2023-12-07 18:31:06 +00:00
Alexander.Likhachev
1dc76f0b94
[Build] Fix configuration cache issue with :repo:artifacts-tests:test
...
^KTI-1473 In Progress
2023-12-07 18:31:06 +00:00
Alexander.Likhachev
f915efab18
[Build] Update artifacts tests test data after the Gradle 8.4 upgrade
...
^KTI-1473 In Progress
2023-12-07 18:31:06 +00:00
Alexander.Likhachev
eab2c6b9b9
[Build] Bump gradle-node-plugin version to 7.0.1
...
This change is required to fix a configuration cache problem revealed after migration to Gradle 8.4
^KTI-1473 In Progress
2023-12-07 18:31:06 +00:00
Alexander.Likhachev
35960f65fb
[Build] Upgrade Gradle to 8.4
...
^KTI-1473 In Progress
2023-12-07 18:31:06 +00:00
Alexander.Likhachev
ad677cb573
[Build] Use dependencies.create instead of dependencies.module
...
It seems there was no actual need for a call to `dependencies.module`.Also, it's going to be deprecated in Gradle 8.3
^KTI-1473 In Progress
2023-12-07 18:31:06 +00:00
Alexander.Likhachev
a19bd2ed2e
[Build] Migrate most of the build logic from Project.buildDir usage
...
It's going to be deprecated in Gradle 8.3
There's currently no way to pass a `org.gradle.api.provider.Provider` to the JavaExec.systemProperty or Test.systemProperty. There's a workaround using `org.gradle.process.CommandLineArgumentProvider`, but I intentionally don't rework these calls as Gradle is going to allow passing providers to configure system properties: https://github.com/gradle/gradle/issues/12247#issuecomment-1568427242
^KTI-1473 In Progress
2023-12-07 18:31:06 +00:00
Alexander.Likhachev
b784544f8d
[Gradle] Migrate functional tests from Project.buildDir usage
...
It's going to be deprecated in Gradle 8.3
^KTI-1473 In Progress
2023-12-07 18:31:06 +00:00
Alexander.Likhachev
209dbae893
[Daemon] Make daemon port validator more precise
...
Previously, the validation was that the port is within the [1, 65535) range. Considering the defined range [17001, 18000) for the random port selector, it makes more sense to check that range instead.
2023-12-05 13:51:14 +00:00
Alexander.Likhachev
2c8501eb10
[Daemon] Add unit tests for LastDaemonCliOutputsTest
2023-12-05 13:51:14 +00:00
Alexander.Likhachev
3ca1249926
[Daemon] Add unit tests for LimitedLinkedList
2023-12-05 13:51:14 +00:00
Alexander.Likhachev
f7b139466d
[Build] Move the daemon client sources into the default directory
2023-12-05 13:51:14 +00:00
Alexander.Likhachev
d8c416f818
[Gradle] Replace the deprecated K/JS plugin in ExecutionStrategyIT.kt
2023-12-05 13:51:14 +00:00
Alexander.Likhachev
b000b66ef7
[Daemon] Improve some daemon log messages
...
A few messages were improved:
* If the daemon process died at the startup, add its last 10 lines of the output to the log and report to the EXCEPTION (ERROR in the case of Gradle) level
* If some exception occurs during connection attempt, add its stacktrace and report to the EXCEPTION (ERROR in the case of Gradle) level
* Added more DEBUG level messages
* Some important messages are moved to the INFO level
* Added a suggestion to report issue to kotl.in/issue
^KT-55322 Fixed
2023-12-05 13:51:14 +00:00
Alexander.Likhachev
95bc49054f
[BT] Release daemon compile session right after compilation is finished
...
^KT-55322 In Progress
2023-12-05 13:51:14 +00:00
Alexander.Likhachev
3ccca58bb0
[Gradle] Release daemon compile session at a compilation task's finish
...
Before this change, some long-running tasks like `run` might cause the Kotlin daemon to go into the LastSession state and stay in that state until the long-running tasks and therefore the Gradle build are finished.
The reason for that behaviour is that if we don't release sessions explicitly, the created "session is alive" marker files are cleaned up by `KotlinGradleFinishBuildHandler.buildFinished` at the end of the build.
^KT-55322 In Progress
2023-12-05 13:51:14 +00:00
Alexander.Likhachev
8ceee3e8b9
[Daemon] Improve daemon connection algorithm
...
Before this change, the logic was to find the most suitable daemon and try connecting to it in a loop, ignoring the fact that it could be dying. Now, instead of trying to connect to the daemon dying daemon in a loop, we will make only 1 attemp and then skip if it's already dying.
^KT-55322 In Progress
2023-12-05 13:51:14 +00:00
Alexander.Likhachev
44d6807aba
[Daemon] Fix deprecation warning in KotlinCompilerClient.kt
2023-12-05 13:51:14 +00:00
Alexander.Likhachev
3172e74a90
[Daemon] Apply autoformatting to ClientUtils.kt
2023-12-05 13:51:14 +00:00
Alexander.Likhachev
02b1f9854f
[Daemon] Apply autoformatting to KotlinCompilerClient.kt
2023-12-05 13:51:14 +00:00
Alexander.Likhachev
628f6e981d
[Daemon] Add test for KT-55322
2023-12-05 13:51:14 +00:00
Alexander.Likhachev
b8d1398bdb
[Daemon] Use JUnit Vintage engine to run JUnit4 tests
2023-12-05 13:51:14 +00:00
Alexander.Likhachev
2bd77d5cdc
[IGS] Add a non-interactive way to make a consent decision for IDEA builds
...
When running builds from IDEA, especially tests, the interactive consent request is barely noticeable. Also, some of the tools windows are non-interactive terminals. Thus, we detect the IDEA builds and fail fast to make it noticeable.
^KTI-1443 Fixed
2023-11-28 15:32:23 +00:00
Alexander.Likhachev
ab5699f106
[IGS] Ask for consent only 5 times
...
^KTI-1443 In Progress
2023-11-28 15:32:23 +00:00
Alexander.Likhachev
b0254add6d
[Gradle] Add a check for the SNAPSHOT_SIZE metric
2023-11-28 15:22:43 +00:00
Alexander.Likhachev
a7e3f7b3a6
[Gradle] Apply IDEA suggestions to BuildReportsIT.kt
2023-11-28 15:22:43 +00:00
Alexander.Likhachev
71320d2439
[IC] Add a check for the CACHE_DIRECTORY_SIZE metric
...
^KT-63010 Fixed
2023-11-28 15:22:43 +00:00
Alexander.Likhachev
06c1bcdc5d
[IC] Add filter on files for the CACHE_DIRECTORY_SIZE metric
...
Without the filter, we were walking both through subdirectories and their files, so some files might be counted twice. Moreover, the behaviour of `File.length` is unspecified for directories.
^KT-63010 In Progress
2023-11-28 15:22:43 +00:00
Alexander.Likhachev
4eccbd75c3
[IC] Measure IC size metrics after the caches are closed
...
Before this fix, the size metrics were measured after the compilation is finished, but before the caches are closed. In many cases it might lead to incorrect measurements. After flipping the default value of the `keepIncrementalCompilationCachesInMemory` flag for Gradle builds, it started to cause always incorrect results.
^KT-63010 In Progress
2023-11-28 15:22:43 +00:00
Alexander.Likhachev
9f89e7f94f
[Gradle] Flip the IC backup optimizations flags in the tests
...
^KT-62758 Fixed
2023-11-28 15:22:43 +00:00
Alexander.Likhachev
0f245ef3c6
[Gradle] Enable the IC backup optimizations by default
...
^KT-62758 In Progress
2023-11-28 15:22:43 +00:00
Alexander.Likhachev
f0c643a887
[Gradle] Remove warning about experimental IC backup optimizations
...
This commit is part of the optimizations stabilization
^KT-62758 In Progress
2023-11-28 15:22:43 +00:00
Alexander.Likhachev
6fbd26905a
[Gradle] Add Gradle 8.2+ plugin variant
...
Fixups KT-52976 as the intention was to remove conventions registration. However until this commit, `gradle81` variant was used for all the 8.1+ versions providing an implementation that registers conventions.
^KT-63499 Fixed
2023-11-16 16:59:02 +00:00
Alexander.Likhachev
965b6b544d
[Gradle] Add integration test for KT-63499
2023-11-16 16:59:02 +00:00
Alexander.Likhachev
11e0edc124
[Gradle, K/N] Remove the enableEndorsedLibs flag
...
This is the last stage of the flag's deprecation cycle.
^KT-56455 Fixed
2023-11-15 17:01:40 +00:00
Alexander.Likhachev
0333985445
[Build] Remove kotlin-gradle-plugin-compiler-dependencies
...
We should consider the information from the removed buildscript to resolve KT-61706
^KT-62650 Fixed
2023-11-09 12:19:23 +00:00
Alexander.Likhachev
defa0b955b
[Gradle] Use kotlin-compiler-embeddable instead of kotlin-gradle-plugin-compiler-dependencies
...
^KT-62650 In Progress
2023-11-09 12:19:23 +00:00
Alexander.Likhachev
1556925358
[Gradle] Unify a bit logic of retrieving task loggers
2023-10-23 13:04:17 +00:00
Alexander.Likhachev
b1ec2eb18a
[Gradle] Unify a bit logic of compiler execution exceptions wrapping
2023-10-23 13:04:17 +00:00
Alexander.Likhachev
65f6f6a07f
[Gradle] Extract task outputs backup restore conditions
2023-10-23 13:04:17 +00:00
Alexander.Likhachev
664b54de5f
[Gradle, BT] Add IC integration tests for the build tools API mode
...
#KT-61865 Fixed
2023-10-23 13:04:17 +00:00
Alexander.Likhachev
3eaaed8e7f
[BT] Add debug logging for compilation iterations
2023-10-23 13:04:17 +00:00
Alexander.Likhachev
ad4f4cbd28
[BT] Clear jar caches after project compilation
2023-10-23 13:04:17 +00:00
Alexander.Likhachev
3adb202eb6
[Gradle, BT] Add support for outputs backup within build tools API compilation
...
#KT-61896 Fixed
2023-10-23 13:04:17 +00:00
Alexander.Likhachev
b460c06907
[BT] Add support for in-process incremental compilation
...
#KT-61865 Fixed
2023-10-23 13:04:17 +00:00
Alexander.Likhachev
f630a27f14
[Build] Fix configuration cache issue in KGP IT
...
`project` cannot be used at execution time.
^KTI-1433 Fixed
2023-10-20 15:42:57 +00:00
Alexander.Likhachev
274198d8f3
[Build] Return the logic to force LV=1.9 for KGP and its dependencies
...
KT-61951
KT-61449
2023-10-18 07:59:27 +00:00
Alexander.Likhachev
afdd8466cc
[Gradle] Introduce KotlinBuildStatsServicesRegistry to manage FUS services
...
KT-57371 introduced a legacy JMX service without proper management.
#KT-62318 Fixed
2023-10-09 13:44:29 +00:00
Alexander.Likhachev
bb23602cb3
[Gradle] Do not hold a reference to Gradle objects in FUS services
...
Despite the FUS services are intended to be scoped to a build, the legacy compatibility service wasn't properly managed and that caused a significant memory leak together with changes in KT-59826.
#KT-62318 In Progress
2023-10-09 13:44:29 +00:00
Alexander.Likhachev
a2b688eb31
[Build] Preserve original jar with unshaded postfix in subplugin example
...
Otherwise we have two tasks writing output to the same file. That behavior confuses Gradle.
2023-10-02 18:02:47 +00:00
Alexander.Likhachev
f6eae38d6c
[Build] Update com.gradle.plugin-publish to 1.2.1
...
The old one appeared to be non-compatible with Gradle 8
2023-10-02 18:02:47 +00:00
Alexander.Likhachev
7ab8239c6e
[Gradle] Add :compiler:ir.serialization.common to KGPs compiler dependencies
...
This module isn't used by KGP itself, but we will bundle it for some time until kotlinx-benchmark is reworked
#KT-62016 Fixed
2023-09-21 15:23:01 +00:00
Alexander.Likhachev
33df94d96e
[Gradle] Fix mpp+kapt tests on Windows
...
Previously expected paths were defined with forward slash, however, on Windows the paths are transformed to use backslash.
2023-09-21 08:05:10 +00:00
Alexander.Likhachev
431f4a8bd3
[Build] Remove junit from versions.properties
...
Now all the JUnit dependencies except the ones provided by `kotlin-test` are moved to the version catalog
#KTI-1349 Fixed
2023-09-13 15:32:15 +00:00
Alexander.Likhachev
fbeed67931
[Gradle] Mark KotlinTopLevelExtension.useCompilerVersion as experimental
...
#KT-61895 Fixed
2023-09-13 13:32:33 +00:00
Alexander.Likhachev
64fb36deef
[Gradle] Move konan.data.dir for tests into <repo>/build and normalize the path
...
This should solve the problem on Windows CI with too long paths in Kotlin/Native integration tests
2023-09-08 13:04:29 +00:00
Alexander.Likhachev
c33f7a4161
[Build] Disable ScriptingIT on Windows CI using @OsCondition
...
`@DisabledOnOs` doesn't propagate its effect to the inheritors
2023-09-08 13:04:29 +00:00
Alexander.Likhachev
9dd4241a70
[Build, IGS] Make the consent checker tests parameterized tests
2023-09-07 17:32:37 +00:00
Alexander.Likhachev
c7b2240c8e
[Build, IGS] Add support for checking global consent
2023-09-07 17:32:37 +00:00
Alexander.Likhachev
6eaccc997f
[Build] Fix the typo junit jupyter -> jupiter
2023-09-06 22:47:34 +00:00
Alexander.Likhachev
a6f3dbb5f4
[Build] Remove unused AggregateTest
2023-09-06 22:47:34 +00:00
Alexander.Likhachev
37c8d789e6
[Build] Remove unused Project.preloadedDeps extension method
2023-09-06 22:47:34 +00:00
Alexander.Likhachev
7f8d9df76d
[Build] Use the latest JUnit engine for kotlin-test-junit5 tests
...
This change aligns with the intention in 634279621d , however the "latest" version wasn't synced with other "latest" versions within the repo
#KTI-1349 In Progress
2023-09-06 22:47:34 +00:00
Alexander.Likhachev
4eb8a80b0c
[Build] Update JUnit 5 to 5.10.0
...
#KTI-1349 In Progress
2023-09-06 22:47:34 +00:00
Alexander.Likhachev
6f96be0b76
[Build] Get rid of the testApiJUnit5 method
...
#KTI-1349 In Progress
2023-09-06 22:47:34 +00:00
Alexander.Likhachev
53fde520d5
[Build] Add jUnit dependencies in testApiJUnit5 to the implementation configuration
...
Adding these dependencies to the `api` configuration pollutes classpath for each dependant modules even if it doesn't need them. Instead, the dependencies should be declared more granularly if they're required
#KTI-1349 In Progress
2023-09-06 22:47:34 +00:00
Alexander.Likhachev
0ecbb64c64
[Build] Remove testApiJUnit5 parameters
...
Instead of declaring additional dependencies inside the method, declare them directly
#KTI-1349 In Progress
2023-09-06 22:47:34 +00:00
Alexander.Likhachev
7a1dc1f89b
[Build] Do not add ij dependencies in testApiJUnit5
...
This is not needed since the dependencies are already declared as API dependencies in the relevant projects.
#KTI-1349 In Progress
2023-09-06 22:47:33 +00:00
Alexander.Likhachev
ef0fb557a5
[Build] Split junit-jupiter into api and engine
...
#KTI-1349 In Progress
2023-09-06 22:47:33 +00:00
Alexander.Likhachev
357d12fc8e
[Build] Move JUnit dependencies into the version catalog
...
The `kotlin-test` dependencies are left untouched as changing them affects publications, thus these versions are independent from the used inside our build
#KTI-1349 In Progress
2023-09-06 22:47:33 +00:00
Alexander.Likhachev
652ff54835
[Gradle] Print kapt worker classpath properly
2023-08-31 13:14:49 +00:00
Alexander.Likhachev
77b9860021
[Gradle] Make KaptTask.kaptPluginOptions an input of the task
...
#KT-58326 Fixed
2023-08-31 13:14:49 +00:00
Alexander.Likhachev
3a246d3a1d
[Gradle] Add an integration test for KT-58326
2023-08-31 13:14:49 +00:00
Alexander.Likhachev
dafec3c0e5
Always use latest kotlin-build-env image for Space dev environments
...
#KTI-1362 Fixed
2023-08-30 15:24:12 +00:00
Alexander.Likhachev
9ec0ab2f5c
[Gradle] Disable failed K2 JS IC test
...
Enable it back when KT-61153 is resolved
#KT-60588 In Progress
2023-08-29 13:37:26 +00:00
Alexander.Likhachev
9e31904f0f
[Gradle] Run CompilerPluginsIncrementalIT only with K1
...
Should be reconsidered in KT-61171
#KT-60588 In Progress
2023-08-29 13:37:26 +00:00
Alexander.Likhachev
52303a1b23
[Gradle] Fix test plugins application
2023-08-29 13:37:25 +00:00
Alexander.Likhachev
4f820230fd
[Gradle] Disable K2 precise java tracking IC tests
...
Enable them back when KT-57147 is resolved
#KT-60588 In Progress
2023-08-29 13:37:25 +00:00
Alexander.Likhachev
a89aa1fb8d
[Gradle] Disable failed daemon test with K2
...
Enable it back when KT-58894 is resolved
#KT-60588 In Progress
2023-08-29 13:37:25 +00:00
Alexander.Likhachev
82df028bc5
[Gradle] Disable failed K2 scripting tests
...
Enable them back when KT-61137 is resolved
#KT-60588 In Progress
2023-08-29 13:37:25 +00:00
Alexander.Likhachev
bdf87c2713
[Gradle] Limit language version for tests providing Gradle plugins
...
#KT-60588 In Progress
2023-08-29 13:37:25 +00:00
Alexander.Likhachev
c6b1d37476
[Gradle] Add expected K2 Kapt fallback warning
...
#KT-60588 In Progress
2023-08-29 13:37:25 +00:00
Alexander.Likhachev
3177df9ad8
[Gradle] Disable LightTree for K2 scripting tests
...
#KT-60588 In Progress
2023-08-29 13:37:25 +00:00
Alexander.Likhachev
196fb3e5f1
[Gradle] Split K1/K2 integration tests
...
#KT-60588 In Progress
2023-08-29 13:37:25 +00:00
Alexander.Likhachev
829e0675f4
[Build] Suppress BuildToolsApiVersionInconsistency for the kotlin repo
2023-08-29 13:00:16 +00:00
Alexander.Likhachev
501c111e36
[Gradle] Implement BuildToolsApiVersionInconsistency diagnostic
...
This diagnostic checks if the Build Tools API implementation version is consistent with KGP in the case compilation goes using the old way
#KT-61449 Fixed
2023-08-29 13:00:16 +00:00
Alexander.Likhachev
271d767138
[Gradle] Allow using KotlinToolingDiagnosticsCollector in transform actions
...
Related to KT-56832
2023-08-29 13:00:16 +00:00
Alexander.Likhachev
e6ae3f1d85
[Gradle] Replace intellijCore() dependency by intellijPlatformUtil()
...
#KT-61449 In Progress
2023-08-29 13:00:16 +00:00
Alexander.Likhachev
59997fb76a
[Build] Update the list of modules with disabled K2 bootstrap
...
#KT-61449 In Progress
Relates to KT-59171
2023-08-29 13:00:15 +00:00
Alexander.Likhachev
db43d8cc8d
[Build] Apply workaround for bt-api resolution as in b97e82f604
2023-08-29 13:00:15 +00:00