10537 Commits

Author SHA1 Message Date
Sebastian Sellmair 9dcd40d7b7 [CLI] K2JVMCompilerArguments: Model classpath as Array<String>
to allow interning individual file-path arguments on the IDE

KTIJ-24976
2023-04-06 16:03:03 +00:00
Sebastian Sellmair 2b893365aa [Gradle] Replace FakeK2NativeCompilerArguments with K2NativeCompilerArguments
KTIJ-24976
2023-04-06 16:03:02 +00:00
Sebastian Sellmair c5e154a325 [Gradle] KotlinJvmCompilerOptions: Use JvmTarget.DEFAULT as default value for jvmTarget
KTIJ-24976
2023-04-06 16:03:01 +00:00
Sebastian Sellmair 2b086946ef [Gradle] Fix NewMultiplatformIT.testLanguageSettingsApplied
KTIJ-24976
2023-04-06 16:03:01 +00:00
Sebastian Sellmair cc47fb3d31 [Gradle] IdeCompilerArgumentsResolverImpl: use short names
KTIJ-24976
2023-04-06 16:03:00 +00:00
Sebastian Sellmair a681f6a1ce [Gradle] KotlinNativeLink: Use singleLinkerArguments instead of linkerArguments
KTIJ-24976
2023-04-06 16:03:00 +00:00
Sebastian Sellmair 9f2ee09ddb [Gradle] Fix CompilerOptionsIT.combinesOptInFromLanguageSettingsNative
KTIJ-24976
2023-04-06 16:02:59 +00:00
Sebastian Sellmair 2c8491cf27 [Gradle] Fix CompilerOptionsIT.passesOptInAnnotationNative
KTIJ-24976
2023-04-06 16:02:59 +00:00
Sebastian Sellmair e76f3fb925 [Gradle] KaptGenerateStubsTask: Implement KotlinCompilerArgumentsProducer
KTIJ-24976
2023-04-06 16:02:59 +00:00
Sebastian Sellmair 6455f602a0 [Gradle] AbstractKotlinCompile: Remove kotlinSources from callCompilerAsync
(as sources are expected to be part of the compiler arguments directly)

KTIJ-24976
2023-04-06 16:02:58 +00:00
Sebastian Sellmair df2a64b183 [Gradle] KotlinNativeLink: Implement KotlinCompilerArgumentsProducer
KTIJ-24976
2023-04-06 16:02:58 +00:00
Sebastian Sellmair e8d217a8d9 [Gradle] KotlinJsDce: Implement KotlinCompilerArgumentsProducer
KTIJ-24976
2023-04-06 16:02:57 +00:00
Sebastian Sellmair d6e3b63069 [Gradle] Implement CompilerArgumentAware (for compatibility) using the new KotlinCompilerArgumentsProducer
KTIJ-24976
2023-04-06 16:02:57 +00:00
Sebastian Sellmair 30a4911a51 [Gradle] KotlinNativeCompile: Implement KotlinCompilerArgumentsProducer
KTIJ-24976
2023-04-06 16:02:57 +00:00
Sebastian Sellmair 16cce7516e [Gradle] KotlinCompileCommon: Implement KotlinCompilerArgumentsProducer
KTIJ-24976
2023-04-06 16:02:56 +00:00
Sebastian Sellmair ff0b070398 [Gradle] Kotlin2JsCompile: Implement KotlinCompilerArgumentsProducer
KTIJ-24976
2023-04-06 16:02:56 +00:00
Sebastian Sellmair d4cc842200 [Gradle] KotlinCompile: Implement KotlinCompilerArgumentsProducer
KTIJ-24976
2023-04-06 16:02:55 +00:00
Sebastian Sellmair 0a3eb68934 [Gradle] Implement IdeCompilerArgumentsResolver service
KTIJ-24976
2023-04-06 16:02:55 +00:00
Sebastian Sellmair 36ff6531ea [Gradle] Deprecate CompilerArgumentAware in favor of KotlinCompilerArgumentsProducer
KTIJ-24976
2023-04-06 16:02:55 +00:00
Sebastian Sellmair f5fadc1f68 [kotlin-tooling-core] Add Interner.clear API 2023-04-06 16:02:54 +00:00
Anton Lakotka 88488f4dc9 [Gradle, Test] Fix disable default publications test
Windows has different line endings, so it is not possible to
to seek multiline substrings.
2023-04-06 12:34:12 +00:00
Sebastian Sellmair 4bc1271f55 [Gradle] AbstractCInteropCommonizerTask: Do not use ';' character in fileName
The ';' will later be used as path separator. Therefore,
using the ';' as joiner for multiple cinterop commonizer groups
will confuse the CLI argument parser inside the Commonizer

^KT-57796 Verification Pending
2023-04-06 11:34:07 +00:00
Sebastian Sellmair 59d78b4d96 [Gradle] Create commonize-kt-57796-twoCInteropCommonizerGroups to cover KT-57796 2023-04-06 11:34:07 +00:00
Anton Lakotka 11b7fe2c4a [Gradle] Add possibility to disable default multiplatform publications
Additionally, skip pom rewriting mechanism in case
if default publications were disabled to prevent unexpected poms.
2023-04-05 17:58:02 +00:00
Dmitriy Novozhilov 92a59279d5 [FIR] Properly implement serializer extension for klib compilation
^KT-57654 Fixed
2023-04-05 07:31:33 +00:00
Anton Lakotka fac90070bc [Gradle] Add smoke test for appleGradlePlugin
^KT-57668 Verification Pending
2023-04-04 18:37:30 +00:00
Anton Lakotka fd63aee3e5 [Gradle] Test that binary frameworks can be consumed
^KT-57668 Verification Pending
2023-04-04 18:37:30 +00:00
Anton Lakotka ad9b34653a [Gradle] Add kotlinNativeFrameworkNameAttribute for binary frameworks
^KT-57668 Verification Pending
2023-04-04 18:37:29 +00:00
Pavel Kargashinsky ae228ece8a [Gradle][Tests][MPP] Fix test-data for MPP tests 2023-04-04 18:33:33 +00:00
Pavel Kargashinsky 5c56145a19 [Gradle][Tests][MPP] Use MAX_SUPPORTED AGP/Gradle versions for MPP tests 2023-04-04 18:33:33 +00:00
Artem Daugel-Dauge 4b66160afb [Gradle] Support dependencies between pods in CocoaPods plugin
^KT-38749 Verification Pending
2023-04-04 14:13:44 +00:00
Leonid Shalupov 7480befe32 Replace reflection-based compiler arguments copying with generated code
Using of Kotlin reflection for simple operations like bean management is very slow

First time initialization time: 261 ms for `copyBean(K2JVMCompilerArguments())`
Subsequent calls of `copyBean(K2JVMCompilerArguments())` take 1.7 ms per call

Unfortunately compiler argument handling is also used in Kotlin IntelliJ plugin
to parse facet settings. Big projects may have thousands of Kotlin facets

The same `ArgumentUtilsKt.copyProperties` frame is seen across various freezes:
IDEA-252440 2-3 minutes freeze on Kotlin project reimporting in last 203 eap
IDEA-253107 A lot of short freezes (1-3 sec) during Kotlin project development
KTIJ-23501 Make main run configuration detection lighter
KTIJ-22435 Unresponsive UI with 100% cpu

Reflection issue:
KT-56358 KClasses.getMemberProperties takes too much time

This commit replaces all reflection stuff with a simple code generation
Now `K2JVMCompilerArguments().clone()` goes to hard-to-measure time
2023-04-03 15:47:35 +02:00
Sebastian Sellmair e3c7241abd [Gradle] ModuleName.orNull: Use predefined 'instrumentedTest'
^KT-56654 Verification Pending
2023-04-03 11:24:21 +00:00
Sebastian Sellmair cdca6da679 [Gradle] KotlinSourceSet.commonizerTarget: Use awaitPlatformCompilations instead of Stage
^KT-56654 Verification Pending
2023-04-03 11:24:21 +00:00
Sebastian Sellmair 8fe444f15e [Gradle] Migrate LenientFuture<T>: Future<T?> to LenientFuture: Future<T>
^KT-56654 Verification Pending
2023-04-03 11:24:21 +00:00
Sebastian Sellmair 262b45405d [Gradle] Change signature of top-level await(Stage) to Stage.await()
^KT-56654 Verification Pending
2023-04-03 11:24:20 +00:00
Sebastian Sellmair 775e08e41d [Gradle] Property.awaitFinalValue: Support generic properties
... even when not declared as lifecycle aware

^KT-56654 Verification Pending
2023-04-03 11:24:20 +00:00
Sebastian Sellmair 2043c9db8e [Gradle] Rename Kotlin~Multiplatfom~PluginLifecycleCoroutineContextElement
^KT-56654 Verification Pending
2023-04-03 11:24:19 +00:00
Sebastian Sellmair a7a689841f [Gradle] Convert KotlinTargetHierarchy.ModuleName to regular class (instead of data)
^KT-56654 Verification Pending
2023-04-03 11:24:19 +00:00
Sebastian Sellmair b5d188d44e [Gradle] Remove suspend functions from KotlinTargetHierarchyBuilder API
^KT-56654 Verification Pending
2023-04-03 11:24:18 +00:00
Sebastian Sellmair 9b8611ea9b [Gradle] RestrictedLifecycleStages: Reuse ContinuationInterceptor as Key
^KT-34662 Verification Pending
2023-04-03 11:24:18 +00:00
Sebastian Sellmair e76119b5eb [Gradle] KotlinPluginLifecycle: Remove unnecessary before stages
^KT-34662 Verification Pending
2023-04-03 11:24:18 +00:00
Sebastian Sellmair 4a896a2579 [Gradle] invokeWhenCreated: Lenient until last stage of lifecycle
^KT-34662 Verification Pending
2023-04-03 11:24:17 +00:00
Sebastian Sellmair 28fa5423a1 [Gradle] warnAboutIncorrectDependencies: Use launch instead of whenEvaluated
^KT-34662 Verification Pending
2023-04-03 11:24:17 +00:00
Sebastian Sellmair c94c4df046 [Gradle] KotlinMetadataTargetConfigurator: Support metadataCompilationsCreated for !isKotlinGranularMetadataEnabled
^KT-34662 Verification Pending
2023-04-03 11:24:17 +00:00
Sebastian Sellmair ab81e92932 [Gradle] KotlinSoftwareComponent: Use future instead of lazy
^KT-34662 Verification Pending
2023-04-03 11:24:16 +00:00
Sebastian Sellmair 50f4531c77 [Gradle] UnusedSourceSetsChecker: Use lifecycle instead of whenEvaluated
^KT-34662 Verification Pending
2023-04-03 11:24:16 +00:00
Sebastian Sellmair 15ca5412d2 [Gradle] sourcesJarTask: Wait for compilations to finalise
^KT-34662 Verification Pending
2023-04-03 11:24:15 +00:00
Sebastian Sellmair aa969fe764 [Gradle] Implement lazyFuture as Future<T> instead of Lazy<Future<T>>
^KT-34662 Verification Pending
2023-04-03 11:24:15 +00:00
Sebastian Sellmair 510eca9da1 [Gradle] Implement source set inspection methods as 'suspend'
this includes:
- isNativeSourceSet
- getCommonSourceSetsForMetadataCompilation
- getPublishedPlatformCompilations
- getHostSpecificSourceSets
- getHostSpecificMainSharedSourceSets
- allPublishableCommonSourceSets

As all of those methods are heavily lifecycle aware and might
return bad values when called to early

^KT-34662 Verification Pending
2023-04-03 11:24:15 +00:00