Commit Graph

14223 Commits

Author SHA1 Message Date
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 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
Dmitrii Krasnov fc1ada4896 [Gradle] Changed compileKotlinTask to compileTaskProvider 2023-12-07 18:14:13 +00:00
Dmitrii Krasnov eb69229b8f [Gradle] Removed using deprecated buildDir in GradleKotlinCompilerRunner
^KT-62527
2023-12-07 17:33:44 +00:00
Yahor Berdnikau c26b5ca365 [Gradle] Slight improvement for generated compiler options KDoc
Separated possible and default value from the description.

^KT-58858 In Progress
2023-12-07 16:19:24 +00:00
Yahor Berdnikau aeaaf6dd8e [Gradle] Add a check that KGP API has consistent KDoc
^KT-58858 In Progress
2023-12-07 16:19:24 +00:00
Yahor Berdnikau 01e9ad1680 [Gradle] Update KDoc for KotlinTopLevelExtensionConfig
^KT-58858 In Progress
2023-12-07 16:19:24 +00:00
Yahor Berdnikau e7bd4e6dbd [Gradle] Update KDoc for KotlinHierarchyDsl
^KT-58858 In Progress
2023-12-07 16:19:24 +00:00
Yahor Berdnikau 1671c41652 [Gradle] Update KDoc for Kapt extension
^KT-58858 In Progress
2023-12-07 16:19:24 +00:00
Yahor Berdnikau 71a80b159b [Gradle] Add KDoc for KotlinCompile interface
^KT-58858 In Progress
2023-12-07 16:19:24 +00:00
Yahor Berdnikau 218d3b547b [Gradle] Add documentation for LanguageSettings
^KT-58858 In Progress
2023-12-07 16:19:24 +00:00
Yahor Berdnikau d12ba2976c [Gradle] Slightly update documentation in JvmTargetValidationMode
^KT-58858 In Progress
2023-12-07 16:19:24 +00:00
Yahor Berdnikau b22185f140 [Gradle] Add required suppressions for API .dsl package
Some classes or fields in this package should not be present in the
documentation.

^KT-58858 In Progress
2023-12-07 16:19:24 +00:00
Yahor Berdnikau f78cddcd3f [Gradle] Fix deprecated buildDir usage in DefaultKotlinCompilationOutputFactory
^KT-62527 In Progress
2023-12-07 15:30:22 +00:00
Nataliya.Valtman 03cf13705e Support "beta + number" library versions
#KT-64122 Fixed
2023-12-07 14:14:50 +00:00
Yan Zhulanow 1726a94c87 [Pill] Update module structure 2023-12-07 08:53:35 +00:00
Yan Zhulanow 1fb8fb2324 [Pill] Do not import modules with the 'FULL' variant
The 'FULL' variant proved to be hardly useful for everyday work.
This change is the first step of removing the variant support from Pill.
2023-12-07 08:53:35 +00:00
Anton Lakotka 73b290a948 [Gradle] suppress DependencySources configurations in tests
PreHmppDependenciesDeprecationIT test checks that all configurations are
resolved without any error. However, *DependencySources configurations
by nature can't be resolved all the time. As not all dependencies have
sources variants published.
2023-12-07 08:42:35 +00:00
Anton Lakotka daa97f7ec9 [Gradle] Fix testResolveAllConfigurations
It should exclude certain kotlin source set configurations, that
can't be resolved all the time for various reasons.

Particularly `dependencySources` since not all dependencies has
published source variants.
2023-12-07 08:42:35 +00:00
Anton Lakotka c979e4e7be [Gradle] Add dependencySourcesConfigurationName to DefaultKotlinSourceSet
Move logic that creates configuration to resolve Dependency Sources
to SourceSet factory from IDE resolver. Because when it is created
during IDE import it will be reported as a warning. Since all
configurations and tasks must be created before IDE import starts.

^KT-63226 Verification Pending
2023-12-07 08:42:35 +00:00
Anton Lakotka 1d4bca56b1 [Gradle] Set min version for source resolver test to Gradle 7.2
Earlier versions of gradle doesn't return capabilities in resolved
artifact view. Therefore, it is not possible to match artifact by
cooridnates + capabilities.

^KT-63226
2023-12-07 08:42:35 +00:00
Anton Lakotka e2dafa2580 [Gradle] Implement variant base source resolver for IDE
^KT-63226 In Progress
2023-12-07 08:42:35 +00:00
Anton Lakotka 7c9505d9b6 [Gradle] Sources resolver test for multiple capabilities
If dependency has more than one capability sources still can be
resolved.

^KT-63226 In Progress
2023-12-07 08:42:35 +00:00
Yahor Berdnikau ab1ce759a3 [Gradle] Fix deprecated buildDir usage in IdeBinaryDependencyResolver
^KT-62527 In Progress
2023-12-06 10:09:22 +00:00
Yahor Berdnikau 6df25ac1be [Gradle] Fix deprecated buildDir usage in IdeResolveDependenciesTask
^KT-62527 In Progress
2023-12-06 10:09:22 +00:00
Ilya Goncharov 8dbeb721a2 [JS] Use only rollup action, copy and delete through Gradle task 2023-12-05 18:00:27 +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 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
Yahor Berdnikau b7d6cdb6eb [Gradle] Fix warning in GradleCompilationResults
^KT-56904 In Progress
2023-12-05 09:26:45 +00:00
Nataliya.Valtman 4294c7bab7 Add limitation for changed files list for JPS build report
#KT-63549
2023-12-04 18:19:15 +00:00
Anton Lakotka 6eeb459076 [Gradle] Add defaultDestinationDir to FatFrameworkTask
To prevent cycle when updating destinationDirProperty
2023-12-04 18:08:09 +00:00
Anton Lakotka 8b335ea051 [Gradle] Add destinationDirProperty to FatFrameworkTask
And use gradle's projectLayout.buildDirectory instead deprecated
project.buildDir.

^KT-56904
2023-12-04 18:08:09 +00:00
Evgenii Mazhukin 834602b737 [Tests] Add javadoc for @TestMetadata
Merge-request: KT-MR-13338
Merged-by: Evgenii Mazhukin <evgenii.mazhukin@jetbrains.com>
2023-12-04 17:29:42 +00:00
Leonid Startsev a035533316 Rename JvmMetadataVersion.CURRENT to JvmMetadataVersion.LATEST_STABLE_SUPPORTED. 2023-12-01 17:43:12 +00:00
Leonid Startsev 048802e143 Rework KotlinModuleMetadata to align it with KotlinClassMetadata:
- Public constructor with KmModule and JvmMetadataVersion
- make write() member function
2023-12-01 17:43:12 +00:00
Leonid Startsev 6e9a62c317 Update ReadMe.md in kotlinx-metadata with instructions for new
functions:

How to use readStrict(), transform(), write() and
JvmMetadataVersion.CURRENT
2023-12-01 17:43:12 +00:00
Leonid Startsev 721af75f40 Provide a separate class for representing metadata version in kotlinx-metadata
Separate class allows encapsulating comparison, equality, and structure of version parts.
It also makes more sense from API standpoint than plain `IntArray`.
2023-12-01 17:43:11 +00:00
Leonid Startsev f101e5a336 Unify write() method and make it a member of KotlinClassMetadata
To make sure that the correct version and flags are preserved during metadata transformation,
they are now stored inside KotlinClassMetadata.
Such change also makes it possible to make write() a member function of KotlinClassMetadata, further simplifying API.
Also, it allows tracking whether readStrict or readLenient was used to read metadata and prohibit writing accordingly.

Also provide transform() method as a shortcut for readStrict+write.

Related to: #KT-59441
2023-12-01 17:43:11 +00:00
Leonid Startsev 36703ff9ae Implement strict and lenient modes for Kotlin metadata reading
In strict mode, an exception will be thrown when inconsistent metadata is encountered. In lenient mode, the reader will attempt to handle the inconsistent metadata by ignoring certain inconsistencies. This is a solution to a problem of reading metadata 'from the future' that is not allowed by default, but desired in certain cases. See updated ReadMe for details.

Also fix problem with Strict Semantics flag.

#KT-57922 Fixed
#KT-59441 Fixed
2023-12-01 17:43:11 +00:00
Yahor Berdnikau 57bc120daf [Gradle] Add AGP 8.3 into test versions
^KT-58064 Verification Pending
2023-12-01 17:19:20 +00:00
Yahor Berdnikau fc6ef76afe [Gradle] Bump max Gradle version in tests to 8.2.1
^KT-58064 In Progress
2023-12-01 17:19:20 +00:00
Yahor Berdnikau b666e66e19 [Gradle] Fix 3-rd party lombok plugin is non-compatible with Gradle 8.2
^KT-58064 In Progress
2023-12-01 17:19:20 +00:00
Yahor Berdnikau cb64234192 [Gradle] Fix test data using deprecated conventions
^KT-63369 Fixed
2023-12-01 17:19:20 +00:00
Yahor Berdnikau c847d427d8 [Gradle] Fix test data not including test framework dependency
^KT-63368 Fixed
2023-12-01 17:19:20 +00:00
Evgenii Mazhukin befa921fd9 [IC] Multi-module incremental compilation smoke tests for KMP
Part 2. Main multi-module KMP smoke tests for incremental compilation

^KT-56963 Fixed
^KT-63876 Fixed

Merge-request: KT-MR-13193
Merged-by: Evgenii Mazhukin <evgenii.mazhukin@jetbrains.com>
2023-12-01 15:46:51 +00:00
Evgenii Mazhukin 3f8505a090 [IC] Smoke tests for KMP IC, part 1.5
Refactorings: rework testData to better reflect usages of declarations,
clean up internal test methods.

Merge-request: KT-MR-13232
Merged-by: Evgenii Mazhukin <evgenii.mazhukin@jetbrains.com>
2023-11-29 13:28:26 +00:00
Ilya Goncharov 08e3cb300a [JS] Migrate tests onto IR compiler with outputDir API instead of outputFile
^KT-61117 fixed
2023-11-29 11:21:56 +00:00
Yahor Berdnikau e50f6e6bca [Gradle] Add '@JvmStatic' annotation to companion methods in Kotlin types
This should improve usability in groovy scripts.

^KT-63601 Fixed
2023-11-29 10:24:23 +00:00