Commit Graph

6615 Commits

Author SHA1 Message Date
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
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
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
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
konstantin.tskhovrebov 8423374343 Fix gradle task name clash for Xcode framework tasks. 2021-12-17 15:07:07 +03:00
Rick Clephas 2c8086bbfe Preserve symlinks during framework copy 2021-12-17 15:07:06 +03:00
Dmitry Savvinov 46ab972cb1 Exclude common parts of kotlin-test from platform source sets
See details in linked issue. Tests are on the intellij-side

^KT-47570 Fixed
2021-12-17 15:04:51 +03:00
nataliya.valtman 9e4f3e3848 KT-41689: Support statistics for Configuration Cache
#KT-41689 Fixed
2021-12-16 19:20:04 +00:00
Vyacheslav Gerasimov f7a9065b75 Build: Use intellij maven repo instead of downloaded IDEA
#KTI-82
2021-12-16 21:48:23 +03:00
Vyacheslav Gerasimov bc2f0936bd Build: Rename commonDep -> commonDependency 2021-12-16 21:48:19 +03:00
Alexander Udalov 6807ed6642 Do not write version requirements for suspend functions
Coroutines are a stable feature since 1.3. Version requirement on
suspend functions, or functions mentioning suspend function types in the
signature, was needed to prevent older compilers from reading metadata
that they can't properly use. It's not needed anymore because a newer
metadata version prevents older compilers from reading any metadata
altogether.

Also, computing isSuspendOrHasSuspendTypesInSignature took ~0.5% of
backend time on compilation of intellij (related to KT-48233).
2021-12-15 22:27:51 +01:00
Nikolay Krasko a74c68c70a Regenerate gradle options 2021-12-15 19:18:53 +03:00
Ilya Goncharov db9640c3b3 [Gradle, JS] Add gradle property for per-module/whole-program
Merge-request: KT-MR-5200
2021-12-15 09:08:45 +00:00
konstantin.tskhovrebov 2bb155edc1 KT-50159 Check that all inner frameworks in XCFramework have same names
And warn if XCFramework has different name with inner frameworks.

#KT-50159 Fixed
2021-12-14 14:47:42 +03:00
Yahor Berdnikau 1c8a1e656e Add function to make a snapshot of current test project
This will allow checking current state of test project and try
to work with it directly.

^KT-45745 In Progress
2021-12-14 12:45:51 +01:00
Ilya Chernikov ec2d6ea5f1 Restore script testing on both backends, fix some tests 2021-12-14 13:39:19 +03:00
Hung Nguyen 586fa8af64 KT-45777: Shrink classpath snapshot incrementally
Currently, we shrink classpath snapshots at 2 steps:
  - Classpath diffing: Shrink the current classpath snapshot against
    the previous lookup symbols
  - Classpath snapshot saving: Shrink the current classpath snapshot
    against the current lookup symbols

With this commit, the shrinking at the second step is now incremental.
The shrinking at the first step is still non-incremental.
2021-12-14 13:10:08 +03:00
Yahor Berdnikau 701446ad25 Pin 'debug.keystore' in two additional android plugins
Also pin it for 'com.android.feature' and 'com.android.test' plugins.

^KT-45745 In Progress
2021-12-13 22:36:27 +03:00
Piotr Krzeminski ad85813136 Allow running Chrome headless with '--no-sandbox' flag
Without this, one has to define a file like `karma.config.d/karma.conf.js`
with contents:

```js
config.set({
    browsers: ['ChromeHeadlessNoSandbox'],

    customLaunchers: {
        ChromeHeadlessNoSandbox: {
            base: 'ChromeHeadless',
            // Needed to work on Jenkins. Otherwise, there's an error:
            // 'Running as root without --no-sandbox is not supported. See https://crbug.com/638180.'
            flags: ['--no-sandbox'],
        }
    }
});
```

This change allows staying 100% in Gradle config for such configuration.
With growing usage of Kubernetes, this flag becomes more and more
popular.

Ideally the Karma config API in Gradle could be more flexible, so that
e.g. someone that uses Chromium could also use `--no-sandbox` flag.
However, it's some bigger change that influnces the API, so I want this
change to be simple.

Related Slack thread: https://kotlinlang.slack.com/archives/C0B8L3U69/p1639133380172400
2021-12-13 11:45:51 +03:00
Yahor Berdnikau 8ed0c17ebd Fix warning message was not showing correct property name
Show this message only once per build.

^KT-48826 Fixed
2021-12-09 17:05:07 +00:00
Igor Chevdar 617b3bd59d [gradle][tests] Fixed flaky test for KT-49248 2021-12-09 13:55:29 +05:00
Viacheslav Kormushkin c2a4425784 [Gradle][Cocoapods] Fixed project sync issues when cocoapods are used along with manual framework creation
#KT-50105
2021-12-09 08:28:44 +00:00
konstantin.tskhovrebov 5b4af6f422 KT-50131 Open AbstractKotlinNativeCompile.compilerPluginClasspath for overriding 2021-12-08 21:02:23 +03:00
sebastian.sellmair 3002829acf [Gradle][KPM] Rename KotlinFragmentNameDisambiguation into KotlinNameDisambiguation 2021-12-07 21:38:59 +00:00
sebastian.sellmair 2a43199287 [Gradle][KPM] Split fragment specific configurations from KotlinDependencyConfigurations 2021-12-07 21:38:59 +00:00
sebastian.sellmair d7df56a390 [Gradle][KPM] Minor: Cleanup imports, remove unused code and add documentation 2021-12-07 21:38:59 +00:00