Commit Graph
100 Commits
Author SHA1 Message Date
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
Alexander.Likhachev 2304b0f12d [Build] Change how buildSrc buildscript detects versions 2023-08-29 13:00:15 +00:00
Alexander.Likhachev 2570be129f [Gradle, BT] Move script definitions scanning into the build tools API
#KT-61449 In Progress
2023-08-29 13:00:15 +00:00
Alexander.Likhachev 6cfa165ddb [Gradle, Build] Publish an artifact with unpublished compiler modules for KGP
#KT-61449 In Progress
2023-08-29 13:00:15 +00:00
Alexander.Likhachev c3f8706fe2 Use kotlin-stdlib to fully read a reader in CompilerOutputParser
The `FileUtil` requires additional dependency on intellij util artifacts
#KT-61449 In Progress
2023-08-29 13:00:15 +00:00
Alexander.Likhachev b4e8e27a6f Apply reformatting to CompilerOutputParser.kt 2023-08-29 13:00:15 +00:00
Alexander.Likhachev b14406b7b7 [Gradle] Inline daemon exception report call
It allows getting rid of the dependency on `:compiler:incremental-compilation-impl`
#KT-61449 In Progress
2023-08-29 13:00:15 +00:00
Alexander.Likhachev d9a6bed012 [Gradle, JS] Hardcode legacy DCE tool main class
It allows getting rid of the dependency on `:compiler:cli-js`
#KT-61449 In Progress
2023-08-29 13:00:15 +00:00
Alexander.Likhachev 52ac237015 [Gradle] Copy destinationAsFile and classpathAsList extensions
It allows getting rid of the dependency on `:compiler:incremental-compilation-impl`
#KT-61449 In Progress
2023-08-29 13:00:15 +00:00
Alexander.Likhachev 5c852347a1 [Gradle] Copy ABI_SNAPSHOT_FILE_NAME constant
It allows getting rid of the dependency on `:compiler:incremental-compilation-impl`
#KT-61449 In Progress
2023-08-29 13:00:15 +00:00
Alexander.Likhachev 3fb1f7bf42 [Gradle] Migrate from ChangesFiles to SourcesChanges
It allows getting rid of the dependency on `:compiler:incremental-compilation-impl`
#KT-61449 In Progress
2023-08-29 13:00:15 +00:00
Alexander.Likhachev 4eb468443a [Gradle] Remove old classpath snapshot transformation
Leave only the implementation via the build tools API in order to reduce compiler dependencies.
THe old implementation expects to have many of compiler modules (through `kotlin-compiler-embeddable`) in the plugin runtime classpath
#KT-61449 In Progress
2023-08-29 13:00:15 +00:00
Alexander.Likhachev a8269ff8e2 [Gradle] Opt in for the experimental build tools API module-wide
#KT-61449 In Progress
2023-08-29 13:00:14 +00:00
Alexander.Likhachev e68661fc0d [Build, Gradle] Remove totally unused KGP dependencies
#KT-61449 In Progress
2023-08-29 13:00:14 +00:00
Alexander.Likhachev 57294f91fe [Gradle] Get rid of StartParameterInternal.isConfigurationCache calls
#KT-61457 Fixed
2023-08-28 14:21:55 +00:00
Alexander.Likhachev 51fe1fd3cc [Gradle] Introduce ConfigurationCacheStartParameterAccessor
#KT-61457 In Progress
2023-08-28 14:21:55 +00:00
Alexander.Likhachev a3e8767fb1 [Gradle] Fix classpath cache key in ClassLoadersCachingBuildService
Lists have defined contracts for equals and hashCode and thus might be used as map keys for the sake of caching. Gradle's file collections do not follow those contracts, leading to cache misses and creating too many classloaders.
#KT-61426 Fixed
2023-08-24 11:59:07 +00:00
Alexander.Likhachev 693b4cf308 [Gradle] Fix creating empty directory marker for backups
The problem was occurring in the case the first directory for backup does not exist
#KT-61273 Fixed
2023-08-24 11:47:17 +00:00
Alexander.Likhachev 9b9039d512 [Gradle] Add a test for KT-61273 2023-08-24 11:47:17 +00:00
Alexander.Likhachev 797ca34a34 [BT] Use bootstrap classloader as a fallback instead of system classloader
Using system classloader may lead to unwanted leakage of classes from the application classpath (like Gradle's ones).
#KT-61206 Fixed
2023-08-21 18:09:49 +00:00
Alexander.Likhachev 4705f13b39 [BT] Add a test for KT-61206 2023-08-21 18:09:49 +00:00
Alexander.Likhachev 51a43a02f7 [IC] Restore old IncrementalCompilationContext constructor for KSP compatibility 2023-08-18 14:20:57 +00:00
Alexander.Likhachev 4d1ea3c441 [Gradle] Avoid early reading of Project.buildDir in compilation tasks
#KT-61292 Fixed
2023-08-18 14:20:57 +00:00
Alexander.Likhachev 7c5a826fd8 [Gradle] Add a test for KT-61292 2023-08-18 14:20:57 +00:00
Alexander.Likhachev 765a8bdd7c [Gradle] Fix JsIrConfigurationCacheIT was disabled by a mistake
It was marked as an abstract class and thus wasn't executed
2023-08-16 09:48:48 +00:00
Alexander.Likhachev 2675531624 [Build] allow empty build cache url to disable it
4af1970b28 allows it only for the included build
2023-08-09 22:10:43 +00:00
Alexander.Likhachev 83c53b7ce3 [BT] Implement classpath snapshotting in the Build Tools API
#KT-57565 In Progress
2023-08-03 08:55:32 +00:00
Alexander.Likhachev 329fd6be45 [BT] Move ClassSnapshotGranularity to the Build Tools API module
#KT-57565 In Progress
2023-08-03 08:55:32 +00:00
Alexander.Likhachev 442d1cf711 [BT] Move ClassSnapshotGranularity to the Build Tools API package 2023-08-03 08:55:32 +00:00
Alexander.Likhachev 61f404e493 [BT] Implement incremental compilation within the daemon
#KT-57398 In Progress
2023-08-01 16:24:37 +00:00
Alexander.Likhachev 91dc33f398 [IC] Allow to not specify the root project dir
When it's specified, it's used to calculate relative paths
2023-08-01 16:24:37 +00:00
Alexander.Likhachev b3677fa0ca [IC] Allow to not specify the modules info 2023-08-01 16:24:37 +00:00
Alexander.Likhachev e33611a88a [IC] Allow to not specify the build history file 2023-08-01 16:24:37 +00:00
Alexander.Likhachev 18aa7f4d4b [BT] Implement non-incremental compilation within the daemon
#KT-57398 In Progress
2023-07-31 10:38:35 +00:00
Alexander.Likhachev 175c00e5c7 [BT] Introduce the project build uuid
This allows to perform some cleanups after the entire project build finished.
#KT-57398 In Progress
2023-07-28 15:48:28 +00:00
Alexander.Likhachev 28c059f25b [BT] Implement basic non-incremental in-process JVM compilation 2023-07-28 15:48:28 +00:00
Alexander.Likhachev 6356a40fe8 [BT] Introduce KotlinBuildToolsException
#KT-57398 In Progress
2023-07-28 15:48:28 +00:00
Alexander.Likhachev b3fbe4c484 [BT] Introduce CompilationResult
#KT-57398 In Progress
2023-07-28 15:48:28 +00:00
Alexander.Likhachev 754f4830b9 [Gradle] Add integration tests for JVM compilation via the Build Tools API 2023-07-28 15:48:28 +00:00
Alexander.Likhachev 009cda5062 [Gradle] Adjust the MPP test project for KT-34901
Following the resolution of KT-59595, the java plugin is no longer applied in MPP projects. However, the `java-test-fixtures` plugin is currently non-functional due to its reliance on the `java` plugin (https://github.com/gradle/gradle/blob/e95eafb8c43c5cd404bd235fa0a69c58cab6f5d6/subprojects/plugins/src/main/java/org/gradle/api/plugins/JavaTestFixturesPlugin.java#L60).
2023-07-12 10:20:15 +00:00
Alexander.Likhachev 8ae0f61028 [Gradle] Associate the textFixtures source set with main and test ones
#KT-34901 Fixed
2023-07-10 18:23:20 +00:00
Alexander.Likhachev fcb7010726 [Gradle] Add integration tests for KT-34901 2023-07-10 18:23:20 +00:00
Alexander.Likhachev cb087b7def [Build] Bump gradle-node-plugin version to 5.0.0
This change is required to fix a configuration cache problem revealed after migration to Gradle 8.1
2023-06-26 10:36:25 +00:00
Alexander.Likhachev 1c00b7062e [Build] Upgrade gradle wrapper files
This change was missed during the Gradle version bump
2023-06-26 10:36:25 +00:00
Alexander.Likhachev bfb314adcb [BT] Mark the Build Tools API as experimental 2023-06-23 12:34:23 +00:00
Alexander.Likhachev 5993e4bce4 [BT] Introduce JVM compilation API 2023-06-23 12:34:23 +00:00
Alexander.Likhachev 2412693ef0 [BT] Move KotlinLogger to the bt-api module
#KT-57398 In Progress
2023-06-23 12:34:23 +00:00
Alexander.Likhachev 1005d0244a [BT] Move KotlinLogger to the bt-api package
#KT-57398 In Progress
2023-06-23 12:34:23 +00:00
Alexander.Likhachev 6e07d432b3 Embed kotlin-build-tools-api into kotlin-compiler
#KT-57398 In Progress
2023-06-23 12:34:23 +00:00
Alexander.Likhachev 9d128c8d0d [Build] DeclarewriteStdlibVersion as an explicit dependency of K/N stdlib
#KTI-1221 In Progress
2023-06-22 15:16:08 +00:00
Alexander.Likhachev a93c49baf1 [Build] Fix a bunch of buildscript compilation warnings
#KTI-1221 Fixed
2023-06-22 15:16:08 +00:00
Alexander.Likhachev 46e83ef7da [Gradle] Specify children projects names in functional tests to avoid ambiguity
#KTI-1221 In Progress
2023-06-22 15:16:08 +00:00
Alexander.Likhachev e9fa576297 [Gradle] Fix expected JVM target version in compiler arguments test
Since Gradle 8.0, the JDK used to run Gradle is exposed to plugins as a JVM toolchain, thus it configures the jvm target as it was a regular used-configured JVM toolchain
https://docs.gradle.org/8.1/userguide/upgrading_version_7.html#toolchain_based_tasks_for_jvm_projects
#KTI-1221 In Progress
2023-06-22 15:16:08 +00:00
Alexander.Likhachev 76ba0c60b2 [Gradle] Update Gradle integration tests code as the new stdlib is now available
#KTI-1221 In Progress
2023-06-22 15:16:08 +00:00
Alexander.Likhachev 7690904bc4 [Gradle] Update AGP for KGP functional tests to support Gradle 8
#KTI-1221 In Progress
2023-06-22 15:16:08 +00:00
Alexander.Likhachev 862f8f235c [Build] Bump Gradle version to 8.1.1
#KTI-1221 In Progress
2023-06-22 15:16:08 +00:00
Alexander.Likhachev 786653baf2 [Build] Use separate sbom directories per publication
Currently, `SpdxSbomTask` declares output file not as `@OutputFile`, but `@OutputDirectory` leading to overlapping outputs problem. This way the problem is worked around.
#KTI-1221 In Progress
2023-06-22 15:16:08 +00:00
Alexander.Likhachev 407a2d4203 [Build] Remove usages of Provider.forUseAtConfigurationTime()
It's not required anymore and was deprecated since Gradle 7.4
#KTI-1221 In Progress
2023-06-22 15:16:08 +00:00
Alexander.Likhachev 58490ea184 [Build] Configure sourcesJar task dependencies explicitly
The `sourcesJar` task uses outputs of code generation tasks, thus it should be declared, so Gradle would know that's not a misconfiguration.
https://docs.gradle.org/8.1/userguide/validation_problems.html#implicit_dependency
#KTI-1221 In Progress
2023-06-22 15:16:08 +00:00
Alexander.Likhachev 3affe78ae5 [Build] Make K/N backend sources publishing for IDE in a less hacky way
The previous way was too hacky relying on internal API
#KTI-1221 In Progress
2023-06-22 15:16:08 +00:00
Alexander.Likhachev 8dd957d371 [Build] Mark kotlin.test publication variant not consumable
Their attribute sets are the same as for platform-specific publications, thus Gradle raises a legit deprecation warning here. These configurations are not being consumed directly, so it's fine to make them not consumable
#KTI-1221 In Progress
2023-06-22 15:16:08 +00:00
Alexander.Likhachev 01276bbe49 [Build] Fix buildscripts deprecation warnings
#KTI-1221 In Progress
2023-06-22 15:16:08 +00:00
Alexander.Likhachev ac79633590 [Gradle] Register default kapt classes dir as an output
#KT-59256 Fixed
2023-06-16 15:42:59 +00:00
Alexander.Likhachev b23b9ab287 [Gradle] Add an integration test for KT-59256 2023-06-16 15:42:59 +00:00
Alexander.Likhachev 10285b32f1 [Gradle] Restore special handling for OOM as a cause of RemoteException
Fixup to KT-59191
2023-06-09 17:44:41 +02:00
Alexander.Likhachev 14460db8e5 [Gradle] Provide relevant error message on daemon crash
#KT-59191 Fixed
Related to KT-55385
2023-06-08 15:34:34 +00:00
Alexander.Likhachev 19073b96a7 [Build] Add a property to disable usernames obfuscation for build scans
The property is `kotlin.build.scan.obfuscate.username`
2023-06-07 12:33:10 +00:00
Alexander.Likhachev ebef67ea6a [Build] Enable internal Gradle setup plugin by default
Related to KTI-1223
2023-06-07 12:33:10 +00:00
Alexander.Likhachev 04fcffa664 [Build, IGS] Add a consent details document link
Related to KTI-1223
2023-06-07 12:33:10 +00:00
Alexander.Likhachev 3273ee4519 [Build, IGS] Add a plugin-switch property
The plugin is not being actually applied until the `kotlin.build.internal.gradle.setup` property is explicitly set to enable the plugin logic.
#KTI-1223 Fixed
2023-05-17 19:36:15 +00:00
Alexander.Likhachev b304f54d80 [Build] Apply InternalGradleSetupSettingsPlugin at first
#KTI-1223 In Progress
2023-05-17 19:36:15 +00:00
Alexander.Likhachev ecbf5abb81 [Build, IGS] Don't run a separate thread as it leads to problems with user input
#KTI-1223 In Progress
2023-05-17 19:36:15 +00:00
Alexander.Likhachev 1e583d2946 [Build, IGS] Add logging to InternalGradleSetupSettingsPlugin
#KTI-1223 In Progress
2023-05-17 19:36:15 +00:00