10537 Commits

Author SHA1 Message Date
Dmitry Savvinov 5cd94d1db2 [Gradle] Support testing new diagnostics infrastructure in functionalTests 2023-05-02 14:32:13 +00:00
Dmitry Savvinov 4a88e01a8e [Gradle] Add new infrastructure for diagnostics in KGP 2023-05-02 14:32:13 +00:00
Dmitry Savvinov 5dd52f7d40 [tests] Apply modern plugins instead of legacy ones
KotlinPlatform*Plugins are plugins from pre 1.3 MPP and shouldn't
be used. The intention was to apply usual 'kotlin("jvm")' and
'kotlin("android")'-plugins, for which KotlinPluginWrapper and
KotlinAndroidPlugin stand respectively
2023-05-02 14:32:13 +00:00
Dmitry Savvinov 0a33eef518 [build] Fix weird dependencies management
kotlin-gradle-plugin-integration-tests on runtime uses relocated
compiler jars. A special handling is required to support this.

Looks like 'kotlin-gradle-plugin-test-utils' was meant to help
here somehow, but was accidentally broken at some point. It went
unnoticed because not much classes from transitive dependencies
of 'kotlin-gradle-plugin-test-utils' were used.

The change in this commit still leaves a few questions about this
configuration, but at leats it makes it possible to use compiler
classes (e.g. KotlinTestUtils)
2023-05-02 14:32:12 +00:00
Dmitry Savvinov e22a9b7108 [mpp] Minor: drop obsolete reporting of HMPP flags
Now any usages of HMPP-flags are deprecated and reported in
deprecationDiagnostics.kt, which can sometimes lead to duplicated
reports
2023-05-02 14:32:12 +00:00
Dmitry Savvinov 31eb012b6b [tests] Minor: add support of DevKit in Gradle IT
This should provide some nicities in IDEA like folders for navigating
to testData
2023-05-02 14:32:12 +00:00
Kirill Rakhman bdc5a37552 [Gradle IT] Enable integration test after Native version bump
#KT-58219
2023-05-02 13:25:30 +02:00
Alexander Udalov 926aa07ca1 Gradle: do not set fragments/fragmentRefines for non-MPP
Otherwise kapt-generated Kotlin sources do not end up in any module,
which causes an error in KT-58301. The error is only happening with K2
because fragments/fragmentRefines arguments are checked more strictly
than commonSources used in K1.

 #KT-58301 Fixed
2023-05-02 10:52:23 +00:00
Ilya Goncharov f8c51dcfee [Gradle, JS] Fix configuration cache for NodeJsExec and D8Exec
^KT-58250 fixed
^KT-58256 fixed
2023-05-01 20:15:37 +00:00
Ilya Goncharov 83db4a06d9 [Gradle, JS] Make esModules property finalized on read 2023-05-01 19:35:31 +00:00
Ilya Goncharov b824c091da [Gradle, JS] Add additional diagnostic for composite build test 2023-05-01 19:12:54 +02:00
Sebastian Sellmair e547ea29b3 [Gradle] Raise min required AGP version for Multiplatform to 7.0
^KT-58281 Verification Pending
2023-05-01 13:07:37 +00:00
Sebastian Sellmair f2270ccdc7 [Gradle] Enable Multiplatform/Android SourceSetLayout v2 by default
^KT-58281 Verification Pending
2023-05-01 13:07:37 +00:00
Sebastian Sellmair 56ba5a284d [Gradle] Add unit test, checking which metadata compilations are created
This will quickly notify any developer if some code
has unexpected effects on the creation of metadata compilations

^KT-58319 Verification Pending
2023-05-01 13:05:47 +00:00
Sebastian Sellmair 8273328726 [Gradle] ProjectMetadataProvider: Allow nullable compiled metadata for SourceSet
The commit leading to the issue described in KT-58319 was:
510eca9da1
[Gradle] Implement source set inspection methods as 'suspend'

In this commit one method called
'getCommonSourceSetsForMetadataCompilation' was implemented
in a suspend style.

This re-implementation however introduced a semantic change to the function:
Previously this method (counterintuitively) returned commonMain
even if the SourceSet only participated in a single platform compilation.
This is because the KotlinMetadataTarget still cas a 'main' compilation
that includes 'commonMain'. The previous implementation did not filter
this compilation therefore found two platform types for the SourceSet,
assuming that it can be compiled to metadata.

This lead to a 'commonMain' compilation created which then gets
correctly disabled by 'isMetadataCompilationSupported'.

After the commit, a single target project did not create a 'commonMain'
compilation anymore. This leads to no metadata being provided
by the metadata provider. This seems OK, but the 'ProjectMetadataProviderImpl'
threw an error in cases the IDE requested this metadata.

^KT-58319 Verification Pending
2023-05-01 13:05:47 +00:00
Sebastian Sellmair 900f26f3c5 [Gradle] Implement KT58319ProjectMetadataProviderTest to cover KT-58319 2023-05-01 13:05:47 +00:00
Ilya Goncharov a3d45964f3 [Gradle, JS] Add test with webpack + es modules 2023-05-01 10:45:02 +00:00
Ilya Goncharov 5b47b1ac24 [Gradle, JS] esmodules for webpack 2023-05-01 10:45:01 +00:00
Vyacheslav Karpukhin ec3e13a091 Drop AndroidDependencyResolver, since it's not used anymore 2023-04-29 01:42:15 +02:00
Dmitrii Krasnov 36fc398358 migrated XCFrameworkIT and AppleSiliconIT to junit5 and gradle TestKit 2023-04-28 18:24:29 +00:00
Ilya Gorbunov b35b727d73 KT-53778 Remove experimental annotations from open ranges 2023-04-28 17:12:15 +00:00
Ilya Goncharov dee3bbb4bf [Gradle, JS] Fix testing of composite build without respect of work of NPM, just look on generated package.json 2023-04-28 16:40:11 +00:00
Yahor Berdnikau 982a4fbda0 Print in the console report showing amount of tasks used K2
^KT-57736 Fixed
2023-04-27 14:32:47 +00:00
Dmitrii Krasnov 847544d99c Removed jfrog repository from kapt integration tests
#KT-58022
2023-04-27 14:19:22 +00:00
Bogdan Mukvich a7396d8c10 Make gradle integration proguard test JDK 11 compatible 2023-04-27 12:25:21 +00:00
Bogdan Mukvich e7989eecf5 Add function to get toolchain JDK home location 2023-04-27 12:25:20 +00:00
Kirill Rakhman 6d3b911dfc [K2/Native] Configure metadata compilation mode
This fixes access to internal declarations in common source sets from
intermediate source sets that are compiled to metadata.

#KT-58219 Fixed
2023-04-27 10:49:53 +00:00
Dmitrii Krasnov aea8670c12 migrated NativeLibraryDslIT and NativeLibraryDslWithCocoapodsIT to junit 5 and gradle TestKit
#KT-51553
2023-04-27 10:40:32 +00:00
Sebastian Sellmair 9f17f6621b [Gradle] Adjust Kotlin2JsCompileArgumentsTest and KotlinCompileArgumentsTest
... after ensuring DependencyClasspath is not resolved
by CompilerArgumentAware

^KTIJ-24724 Verification Pending
2023-04-27 09:17:05 +00:00
akerimsenol 502c3c29cc Omit dependency classpath from compiler args
This is in the context of the following issue:
https://youtrack.jetbrains.com/issue/KTIJ-24724
2023-04-27 09:17:05 +00:00
Ilya Gorbunov 937a14146a Hide experimental Duration functions that are not intended to be stabilized 2023-04-26 10:44:52 +00:00
Ilya Gorbunov 448e9fc5e7 Drop functions hidden since 1.4 (inline-only or experimental in JVM)
Since it's no longer possible to use API version less than 1.4,
these functions can be no longer called at all.
2023-04-26 10:31:03 +00:00
Abduqodiri Qurbonzoda 63a5a74613 Introduce HexFormat for formatting and parsing hexadecimals #KT-57762
Merge-request: KT-MR-9460
Merged-by: Abduqodiri Qurbonzoda <abduqodiri.qurbonzoda@jetbrains.com>
2023-04-26 09:54:25 +00:00
Ilya Chernikov 5ef0b52ac5 Add test to the fix of maven script executor
related to the fix of #KT-58101
2023-04-26 09:52:58 +00:00
Yahor Berdnikau 66648b36df Introduce 'kotlin.experimental.tryK2' gradle property
Once configured this property changed default language version
convention for all compiler options to '2.0'.

On usage, it produces a warning that it should not be used in
production.

^KT-57736 In Progress
2023-04-26 09:51:36 +00:00
Ilya Goncharov 133992d0bc [Gradle, JS] Use live collections for webpack configurations
^KT-57116 fixed
2023-04-26 09:09:01 +00:00
Yahor Berdnikau c52ad22795 Remove 'KotlinCompile.classpath' input
^KT-53748 Fixed
2023-04-26 08:22:39 +00:00
Anton Lakotka 2abe9ac1ef [Gradle] Fix configuration cache issues for LinkFramework tasks
^KT-58261 Verification Pending
2023-04-25 20:51:16 +00:00
Stanislav Erokhin 96f8bcdf43 [Gradle/MPP] Added IT for android -> androidTarget rename
#KT-57903 In Progress
2023-04-25 19:40:53 +00:00
Stanislav Erokhin 65ffdb418a [Gradle/MPP] Update message about missing android target
#KT-57903 In Progress
2023-04-25 19:40:53 +00:00
Stanislav Erokhin 5eaa6696f4 [Gradle/MPP] Replace android -> androidTarget in functionalTests 2023-04-25 19:40:53 +00:00
Stanislav Erokhin 70c9d6dc44 [Gradle/MPP] Deprecated android in favour androidTarget in MPP DSL
ReplaceWith was added only to `android()` and `android(name)`
because it isn't working for other functions: KTIJ-25383.

#KT-57903 In Progress
2023-04-25 19:40:53 +00:00
Stanislav Erokhin becf50ee0f [Gradle/MPP] Refactored KotlinTargetContainerWithPresetFunctions
Android preset functions were moved to a separate interface
because we need to write custom deprecation with ReplaceWith
due KT-57903.
After that we had generated:
 - all the K/N preset functions
 - jvm functions.
I decided to move jvm function to separate file too,
so the whole division to several files would be somewhat sane.

I kept the KotlinTargetContainerWithPresetFunctions interface to
keep source/binary compatibility for the `android`/ `jvm` preset
functions users

#KT-57903 In Progress
2023-04-25 19:40:53 +00:00
Ilya Goncharov 725cfb4ea5 [Gradle, JS] Fix package in js composite build test 2023-04-25 17:52:26 +00:00
Sebastian Sellmair 7486a11bd1 [Gradle] Remove deprecated dependsOnClosure and withDependsOnClosure extensions
^KT-58220 Verification Pending
2023-04-25 17:09:00 +00:00
Sebastian Sellmair 00138f8ea4 [Gradle] Update deprecation message for non-hmpp mode
^KT-58220 Verification Pending
See: KT-58243
2023-04-25 17:09:00 +00:00
Sebastian Sellmair 0889b3eb2e [Gradle] Schedule KotlinCompilation.source for removal in 2.0
Having only one SourceSet being associated with a KotlinCompilation
will simplify multiple code paths and prevents misconfiguration
from users.

^KT-58220 Verification Pending
See: KT-58234
See: KT-58235
2023-04-25 17:09:00 +00:00
Sebastian Sellmair 1313cffe01 [Gradle] Schedule 'overrideDisambiguationClassifierOnIdeImport' and 'useDisambiguationClassifierAsSourceSetNamePrefix' for removal in 2.0
^KT-58220 Verification Pending
See: KT-58231
2023-04-25 17:08:59 +00:00
Sebastian Sellmair e72f236bd4 [Gradle] Schedule 'KotlinSourceSet.requiresVisibilityOf' for removal in 2.0
^KT-58220 Verification Pending
See: KT-58228
2023-04-25 17:08:59 +00:00
Sebastian Sellmair fa40c1115a [Gradle] Schedule 'relatedConfigurationNames' for removal in 2.0
^KT-58220 Verification Pending
See: KT-58225
2023-04-25 17:08:59 +00:00