Commit Graph

12921 Commits

Author SHA1 Message Date
Anton Lakotka 6e6659fc2a [Gradle] Remove workarounds for KT-57483 from tests
^KT-57483
^KT-58316 Verification Pending
2023-05-04 15:35:34 +00:00
Anton Lakotka a1eff2cd85 [Gradle] Test kotlinNativeFrameworkNameAttribute on fat frameworks
^KT-58316 Verification Pending
2023-05-04 15:35:34 +00:00
Anton Lakotka 7c5d1b4030 [Gradle] Add kotlinNativeFrameworkNameAttribute to fat frameworks as well
^KT-58316 Verification Pending
2023-05-04 15:35:34 +00:00
Sebastian Sellmair ca8af7786e [Gradle] Kotlin2JsCompile: convert enhancedFreeCompilerArgs to ArrayList
... using .toList():
Using ListProperty.get() can return List implementations
that do not play well with CompilerArguments.
In this particular case RegularImmutableList from guava was returned
which later failed in the copyBeanTo function

^KT-58427 Verification Pending
2023-05-04 14:06:15 +00:00
Sebastian Sellmair 736cbfc38e [Gradle] Implement KT58427ResolveJSCompilerArguments regression test
KT-58427
2023-05-04 14:06:15 +00:00
Sebastian Sellmair 4fe60a4149 [Gradle] Add test - setting languagesVersion and apiVersion in languageSettings
KT-58427
2023-05-04 14:06:15 +00:00
Ilya Chernikov 8c8ca7bb70 Remove examples/tests based on obsolete script-util
also mark the rest of the API as Obsolete
related to #KT-58367
2023-05-04 11:35:08 +00:00
Ilya Chernikov 2e393e8fb7 Stop publishing obsolete kotlin-script-util
#KT-58366 fixed
2023-05-04 11:35:08 +00:00
Yahor Berdnikau 17dded2f2a Update 'kotlin-dist-for-jps-meta' to use unbundled compiler plugins.
^KTIJ-25384
2023-05-04 10:52:12 +00:00
Bogdan Mukvich 0188e79df7 Run maven tests on JDK 8 by default 2023-05-04 10:51:52 +00:00
Bogdan Mukvich 1fcc843056 Create Nashorn in maven integration tests JS compatible with JDK 11 2023-05-04 10:51:52 +00:00
Bogdan Mukvich d95e3dbf17 Run maven plugin tests using kapt with dagger with JDK 8 2023-05-04 10:51:52 +00:00
Bogdan Mukvich 74cb25c3eb Create configuration for maven integration tests with JDK 8 2023-05-04 10:51:52 +00:00
Bogdan Mukvich c4f4249e83 Update maven invoker plugin 2023-05-04 10:51:52 +00:00
Ilya Goncharov 957d8ee3d2 [Gradle, JS] Print visited-gradle content in composite build test 2023-05-03 15:03:27 +00:00
Anton Lakotka 462a39d591 [Gradle] Fix testCustomAttributesInAndroidTargets for AGP 7.0.4
^KT-58305 Verification Pending
2023-05-03 12:18:34 +00:00
Anton Lakotka 39fc1ba81d [Gradle] Fix testMppAndroidLibFlavorsPublication for AGP 7.0.4
^KT-58305 Verification Pending
2023-05-03 12:18:34 +00:00
Nikolay Lunyak ef28e031dc [FIR] KT-58145: Ensure the compiler fails
It fails with: "Module data is not
registered in Libraries session"
during `FirFakeOverrideGenerator.createCopyForFirProperty()`
for `callerFrame`.
2023-05-03 10:04:25 +00:00
Alexander Udalov f3231b2aa9 KGP IT: do not run recently added tests with class loader cache
Also add a comment mentioning the error so that it could be searchable
in the future.
2023-05-03 09:47:58 +00:00
Dmitrii Krasnov 617dddba70 migrated FatFrameworkIT to junit 5 and gradle TestKit 2023-05-03 09:29:31 +00:00
Nataliya.Valtman 1591869991 Add FUS statistics for dokka usage
#KT-57330 Fixed
2023-05-03 07:22:38 +00:00
Dmitry Savvinov 8561bbf603 [Gradle] Minor: move diagnostic tests under unitTest package 2023-05-02 14:32:14 +00:00
Dmitry Savvinov c5bda2f63c [Gradle] Support suppressing KGP diagnostics 2023-05-02 14:32:14 +00:00
Dmitry Savvinov f5c4dffc3e [mpp] Hack: Inherit KotlinProjectExtension in KotlinPm20ProjectExtension
Addition of checkers in previous commits lead to CCE when they call
'project.kotlinProjectExtension'. Change in this commit isn't
semantically sound, but allows to repair those tests cheaply
2023-05-02 14:32:13 +00:00
Dmitry Savvinov 97f77c2ecf [Gradle] Add functional tests on the new diagnostics/features infra 2023-05-02 14:32:13 +00:00
Dmitry Savvinov 6452c22430 [mpp] Migrate AGP Compatbility checks to the new infra 2023-05-02 14:32:13 +00:00
Dmitry Savvinov bb3dc145e5 [mpp] Migrate AndroidSourceSetLayout checks to the new infra 2023-05-02 14:32:13 +00:00
Dmitry Savvinov 4e479cb54b [mpp] Migrate UnusedSourceSetsChecker to the new infra 2023-05-02 14:32:13 +00:00
Dmitry Savvinov ee9a952da2 [mpp] Migrate jvmWithJava preset deprecation to the new infra 2023-05-02 14:32:13 +00:00
Dmitry Savvinov 05662eae7a [mpp] Migrate MissingNativeStdlibWarning to the new infra 2023-05-02 14:32:13 +00:00
Dmitry Savvinov 07142a4083 [mpp] Migrate checks of commonMain.dependsOn to the new infra 2023-05-02 14:32:13 +00:00
Dmitry Savvinov 7a5f1d694f [mpp] Migrate checks of deprecated K/N targets to new infra 2023-05-02 14:32:13 +00:00
Dmitry Savvinov a539db932c [mpp] Migrate HMPP-flags deprecations to the new infra 2023-05-02 14:32:13 +00:00
Dmitry Savvinov 29223dbd4a [Gradle] Add integration tests on new diagnostics infrastructure 2023-05-02 14:32:13 +00:00
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