Commit Graph

10052 Commits

Author SHA1 Message Date
Dario Seidl 8d8bf6473b Fix typo in description of Float.ulp
Replace `Float.NIN_VALUE` with `Float.MIN_VALUE`.
2022-01-13 17:21:47 +03:00
Yahor Berdnikau 68f4580492 Fix kaptGenerateStubs doesn't ignore empty Android source directories
^KT-48617 Fixed
2022-01-13 13:11:20 +00:00
Yahor Berdnikau a378e1e128 Bump Kotlin stable release to version 1.5.32
^KT-45745 In Progress
2022-01-13 10:30:54 +01:00
Yahor Berdnikau 0f3d7d5ad8 Fix typo in parameter name
^KT-45745 In Progress
2022-01-13 10:30:53 +01:00
Yahor Berdnikau 1c1e8f3c85 Migrate SubpluginsIT to new test DSL
^KT-45745 In Progress
2022-01-13 10:30:50 +01:00
Sergey Igushkin eddf8c9e72 KT-50736: Fix the implementation of whenEvaluated
Re-implement `whenEvaluated` using a constant number of calls to
`withPlugin` per project.

The approach with `plugins.all { ... }` introduced by the fix
of KT-50509 had an issue with Android plugins applied last in the build:
in those cases that implementation didn't dispatch the actions after
Android and instead fired them earlier in `afterEvaluate`, because
`hasPlugin` doesn't return true in the callback when that exact plugin
is applied.

This change preserves the performance similar to that of the previous
implementation.

Issue #KT-50736

Merge-request: KT-MR-5418
2022-01-12 13:13:56 +00:00
Sergey Igushkin 3ac472ceb3 Fix Android unit test tasks not running in allTests
The Android unit test tasks were not created by the Kotlin Gradle
plugin, so the plugin didn't add the
tadk dependencies to its aggregating
`allTests` task.

Issue #KT-38456
Issue #KT-44227
2022-01-11 22:15:14 +00:00
Hung Nguyen 8d298bd25c Fixed possible hanging of metrics collection in KGP
#KT-50719 Fixed
2022-01-11 19:15:42 +03:00
sebastian.sellmair 6c55e8cc58 [Gradle] GradleKotlinCompilerRunner: Be lenient to isolated classpaths
^KT-50592
2022-01-11 08:34:04 +00:00
sebastian.sellmair 56fa2655b7 [Gradle] Fixup testDetectingDifferentClassLoaders in respect of ^KT-50592 and KT-50598 2022-01-11 08:34:03 +00:00
sebastian.sellmair b1bb68c10f [Gradle] testProject/AndroidProject: Ensure non-isolated classpaths
^KT-50592
2022-01-11 08:34:03 +00:00
sebastian.sellmair 0b981a54bc [Gradle] NativeDistributionCommonizerTask: Use safe project extension
... to access `KotlinMultiplatformExtension` on subprojects.
This will prevent strange ClassCastExceptions and show users
a proper error message when the operation fails because of isolated
classpaths.

This will also be lenient if the isoalted Kotlin plugin is not
a multiplatform plugin.

^KT-50592 Verification Pending
2022-01-11 08:34:02 +00:00
sebastian.sellmair a355fefd05 [Gradle] KotlinProjectExtension: use castIsolatedKotlinPluginClassLoaderAware
Using this special cast function for accessing any Kotlin extension
will ensure that an isolated classpath will be reported to the user
when the casting fails because of it.

^KT-50592 WIP
2022-01-11 08:34:02 +00:00
sebastian.sellmair 32177b2cd2 [Gradle] Implement commonizer test with isolated jvm subproject
^KT-50592
2022-01-11 08:34:02 +00:00
Igor Yakovlev 82455c849d [WASM] Lazy properties initialization 2022-01-05 13:12:32 +01:00
Igor Yakovlev e58d4163ad [WASM] Add std methods for collections 2022-01-05 13:12:32 +01:00
Igor Yakovlev c9a92d71ae [WASM] Add kotlin.math tests 2022-01-05 13:12:32 +01:00
Igor Yakovlev adee0f1cb0 [WASM] Add kotlin.math implementation 2022-01-05 13:12:32 +01:00
Igor Laevsky a5ebd3c716 Re-generate built-ins 2022-01-01 21:46:55 +02:00
Igor Laevsky cfcbe9e1e2 [Wasm] Better preserve IR types after inlining 2022-01-01 20:04:44 +02:00
Ilya Gorbunov 2954769296 KT-50059 Stop publishing artifacts with 'modular' classifier 2021-12-29 17:43:56 +00:00
sebastian.sellmair 353593fa77 [MPP] Add documentation to .configureTaskOrder() 2021-12-28 21:15:20 +00:00
sebastian.sellmair f9c70758a2 [MPP] Add CInteropMetadataDependencyTransformationTaskTest 2021-12-28 21:15:19 +00:00
sebastian.sellmair 2e1fc15a9a [MPP] Only enable cinterop metadata transformation when cinterop commonization is enabled
Both library author and consumer need to enable cinterop commonization
in order to support libraries with commonized cinterops
in their API surface.
2021-12-28 21:15:19 +00:00
sebastian.sellmair 4d5446a174 [MPP] CInteropMetadataDependencyTransformationTask: Replace mutex
Replace previous 'mutex' output file in favour of proper
task ordering and task enabling.
2021-12-28 21:15:19 +00:00
sebastian.sellmair 146099e92e [MPP] Don't check commonizer classpath for UP-TO-DATE mechanism
Using a different commonizer classpath is a very uncommon practice.
Checking the classpath for Gradle's UP-TO-DATE mechanism is
already misleading, because we are relying on a custom UP-TO-DATE
implementation that will not include this classpath anyway.

Removing this input is intended to improve commonizer startup time.
2021-12-28 21:15:18 +00:00
Alexander Udalov 9a9a8f1999 Restore support of language version 1.3
#KT-50251 Fixed

(cherry picked from commit a0004ed03adc9f50f26c8b11d178afcc2abf2a9c)
2021-12-28 13:21:18 +01:00
Alexander Likhachev 5097d426c1 [Gradle] Mark MetricsWriter with Serializable interface
#KT-50549 Fixed
2021-12-28 12:05:09 +00:00
Alexander Likhachev 426faf4ca6 [Gradle] Add test for KT-50549 2021-12-28 12:05:08 +00:00
Sergey Igushkin cb9dfc8e01 KT-50509: Optimize the performance of whenEvaluated { ... } wrapper
The Gradle API `pluginManager.withPlugin(id) { ... }` turned out to have
a significant performance footprint due to operations on underlying
immutable collections.

We can replace calls to `withPlugin` with checks of `hasPlugin` running
on each applied plugin.

Issue #KT-50509 Verification pending
2021-12-28 10:09:42 +00:00
Yahor Berdnikau f895e92b11 Bump Gradle 7.3 version to 7.3.3
^KT-45745 In Progress
2021-12-27 15:19:19 +01:00
Yahor Berdnikau 3fca808b63 Revert "Revert "Set minimal supported Gradle version to 6.7.1.""
This reverts commit 2aa1c187d9.

^KT-49733 Fixed
2021-12-27 15:19:15 +01:00
Hung Nguyen a900f2b66d KT-45777: Reorganize unit test data for classpath snapshot feature
to make it easier to add more tests in the next commits.

- Add unit tests for constants and inline functions

Also add tests for different kinds of Kotlin classes: CLASS,
FILE_FACADE, MULTIFILE_CLASS.

-Add unit test for nested classes

Also remove the existing integration test for nested classes to keep the
integration tests focused on the key scenarios while unit tests will
cover the corner cases.

Ignore inline functions that are private
2021-12-24 18:31:49 +03:00
Iaroslav Postovalov 534cf0c6c8 stdlib: Simplify JS charArrayOf implementation (#4354)
#KT-16974 Fixed
2021-12-24 17:20:06 +03:00
Yahor Berdnikau 8bdb19a11e Deprecate 'kotlin.coroutines' property and extension
Deprecation 'kotlin.coroutines' property and related
'kotlin.experimental.coroutines' extension DSL. These properties
are not doing anything since 1.5.0 release and has to be removed long
time ago.

^KT-50369 Fixed
2021-12-24 11:55:56 +00:00
Yahor Berdnikau 6c02ef0a44 Provide Android SDK with accepted licenses
For benchmarks using Android provide Android SDK via environment.

^KT-49921 In Progress
2021-12-23 11:03:13 +01:00
Yahor Berdnikau 10a1d2ca1d Pass current Kotlin version to benchmark script
Allows using different current Kotlin versions in benchmark.
For example, SNAPSHOT version when current branch is master and
dev version on CI build.

^KT-49921 In Progress
2021-12-23 10:00:23 +01:00
Mikhael Bogdanov f5da166d7c Switch -jvm-target default to null 2021-12-23 07:25:59 +00:00
konstantin.tskhovrebov e955fa429b Add groovy friendly DSL for kotlin artifacts. 2021-12-23 01:04:37 +03:00
Alexander Udalov 7771e5914d Revert "Do not write version requirements for suspend functions"
This reverts commit 6807ed6642.

The reason is that Kotlin compilers until and including version 1.6.10
have code that detects obsolete coroutines via these version
requirements (see `versionAndReleaseCoroutinesMismatch`). Since Kotlin
1.6.10 can read metadata of version 1.7, the earliest we can drop these
version requirements is Kotlin 1.8.0.
2021-12-21 20:06:07 +01:00
konstantin.tskhovrebov 2d0fea4dcb Set right FatFramework name inside XCFramework. 2021-12-21 18:04:49 +03:00
Yahor Berdnikau 8d195e079e Add basic benchmarks for Duckduckgo Android application
^KT-49921 In Progress
2021-12-21 14:00:57 +00:00
Yahor Berdnikau d1f6faf236 Add Gradle project to run regression benchmarks
This project will contain all required Gradle infrastructure to run
regression benchmark scripts.

^KT-49921 In Progress
2021-12-21 14:00:57 +00:00
Yahor Berdnikau 7418d3c898 Add build regression benchmark script template
This template provides all infrastructure to write Kotlin scripts for
build regression benchmarks. These benchmarks will use gradle-profiler
to run provided scenarios on user projects. All benchmark results
in the script then will be aggregated into single one showing
difference between them.

Generally such kind of benchmarks should be used to track early Gradle
 build regressions between releases.

^KT-49921 In Progress
2021-12-21 14:00:56 +00:00
Roman Artemev e17f121b23 [JS REPL] Extract JS script/repl parts into separate module
- don't load js evaluation plugin in CLI compiler
2021-12-21 04:15:11 +03:00
Nikolay Krasko 5b073c2565 Drop ComponentsXmlResourceTransformerPatched
After shadow is updated to 7.1.1, library ComponentsXmlResourceTransformer
should work fine.

The only reason for this patched version was the bug that was fixed in 7.1.0:
https://github.com/johnrengelman/shadow/releases/tag/7.1.0

^KTI-733 Fixed
2021-12-20 21:39:04 +03:00
Nikolay Krasko 85521f01f8 Update shadow plugin 6.1.0 -> 7.1.1
Version 7.1.1 is absent in jcenter, so additional repository was added
in some modules.

Leave old version in NewMultiplatformIT.kt because of
`This version of Shadow supports Gradle 7.0+ only. Please upgrade.` error.

^KTI-733 Fixed
2021-12-20 21:39:00 +03:00
Joseph Walton f38e1b218d Scripting, maven: use getArtifacts to get the plugin's runtime classpath
..to correctly pass the dependencies in the ExecuteKotlinScriptMojo.
#KT-50306 fixed

Also add a test that a script has access to plugin-configured
dependencies.
If plugin/dependencies is populated, the extra artifacts should be
made available when the script is run. This test uses 'junit' simply
because it's commonly-used, but not already present, or shaded as part
of another artifact.
2021-12-20 18:02:16 +03:00
nataliya.valtman 9c0ea11c1b Try to figure out which metric collection cause timeout exception 2021-12-17 21:39:23 +03:00
nataliya.valtman 999d2051ac Add listener's metrics 2021-12-17 17:38:55 +00:00