Commit Graph

8525 Commits

Author SHA1 Message Date
Roman Artemev 75016bf54d [Gradle, JS] Fix bridge between Gradle and Js IR CLI 2021-01-26 19:23:25 +03:00
Hung Nguyen e2521718dd Kapt: Add flag to keep KDoc comments in stubs
Currently, KaptGenerateStubsTask may not generate KDoc comments
correctly. See KT-43593 for more details.

This commit provides a Kapt flag called
`kapt.keep.kdoc.comments.in.stubs`
to control whether KDoc comments will be included in the generated
stubs.

This flag is currently enabled by default to keep the existing behavior
and avoid breaking existing users.

Users who don't need KDoc comments in stubs but are hitting KT-43593 can
disable the flag.

Whether this flag will be disabled by default later is to be determined.

Bug: https://youtrack.jetbrains.com/issue/KT-43593
     (Note that this commit only provides a workaround, it doesn't
     actually fix the bug.)
Test: (Ir)ClassFileToSourceStubConverterTestGenerated#testCommentsRemoved
2021-01-26 15:28:52 +03:00
Sergey Igushkin 3704b2a5af Fix testJvmKtAppDependsOnMppTestRuntime after 3b0f4f31 2021-01-25 23:59:28 +03:00
Bingran d4965b1e6e Avoid resolving deprecated configurations in tests (#3970)
* Avoid resolving deprecated configurations in tests

This PR enables more integration tests run with warning-mode=fail by
updating "resolveAllConfigurations" task in a way where we don't resolve
deprecated configurations and instead check dependencies on alternative
configurations.

* Add custom resolvable configuration for testing
2021-01-25 23:00:12 +03:00
Sergey Igushkin 3b0f4f3164 Set canBeConsumed = false on the deprecated configurations like compile
This leads to clearer error messages in Gradle variant-aware dependency
resolution failures. Gradle has deprecated those configurations since
long ago, and we didn't see much use of them as variant-aware dependency
resolution entities either.

So this commits sets `canBeConsumed` to false on these configuratons:
* compile (+ testCompile, fooCompile in MPP)
* runtime (+ testRuntime, fooRuntime, ...)
* compileOnly (+ testCompileOnly, fooCompileOnly, ...)

This change replaces the PR #3995
2021-01-25 22:51:42 +03:00
Svyatoslav Kuzmich cb3b1f8ae2 [JS IR] Fix referencing Kotin variables in inline JS code
Fixed by outlining JS code that uses Kotlin variables making usages of
these locals explicit and preventing bugs due to one-sided variable renaming.

This prevents using Kotlin variables as lvalue in JS code.
2021-01-25 19:18:44 +03:00
Sergey Igushkin 87c6b6bffc Revert "Set canBeConsumed = false on the deprecated configurations like compile"
This reverts commit dfacccf8
2021-01-21 16:39:00 +03:00
Sergey Igushkin dfacccf84f Set canBeConsumed = false on the deprecated configurations like compile
This leads to cleaner error messages in Gradle variant-aware dependency
resolution failures. Gradle has deprecated those configurations since
long ago, and we didn't see much use of them as variant-aware dependency
resolution entities either.

So this commits sets `canBeConsumed` to false on these configuratons:
* compile (+ testCompile, fooCompile in MPP)
* runtime (+ testRuntime, fooRuntime, ...)
* compileOnly (+ testCompileOnly, fooCompileOnly, ...)
* default (+ fooDefault in MPP)

This change replaces the PR #3995
2021-01-21 11:00:21 +00:00
Sergey Igushkin 6e913e16ad Add integration tests for Kapt + Android Gradle plugin 7.0 2021-01-21 11:00:21 +00:00
Sergey Igushkin 341b87fad0 Use implementation instead of compile in GradleIT, fix versions 2021-01-21 11:00:20 +00:00
Sergey Igushkin 17b71555e0 KT-43944: Don't access Android test source sets' API configurations
When dependencies are added to our corresponding configurations,
report errors, as there's no proper way to add those dependencies.

Issue #KT-43944 Fixed
2021-01-21 11:00:19 +00:00
Pavel Kirpichenkov b66f5c8180 Drop type aliases for JS and KLIB string tables
They used to use the same approximation logic anyway
^KT-20996
2021-01-20 11:05:53 +03:00
Sergey Bogolepov 284d42fd2b Use camelCase for cacheKind control property
Because it is more intuitive for end-users.
2021-01-19 17:31:45 +07:00
sebastian.sellmair acdc1f532b Rewrite CommonizerTask params to fix ^KT-42098 2021-01-18 14:57:18 +00:00
Sebastian Sellmair bf5feb1b4a Remove KotlinMetadataTarget's KotlinTargetComponent in favour of KotlinSoftwareComponent.kt
^KT-44322 fixed
2021-01-18 08:49:30 +00:00
Ilya Goncharov f3dfb38163 [Gradle, JS] Exclude transitive dependencies of semver4j
^KT-44204 fixed
2021-01-15 11:54:31 +03:00
Sergey Bogolepov ada51509c4 Test caches for linux_x64 on Linux host. 2021-01-15 13:41:15 +07:00
Sergey Bogolepov ed18fcdf28 Use target-specific cache control in tests 2021-01-15 13:41:15 +07:00
Sergey Bogolepov 092020577c More precise native cache control.
Introduce `kotlin.native.cacheKind.$targetName`
that allows to control cache kind on per target basis.
2021-01-15 13:41:14 +07:00
Nikolay Krasko 0a1e4fd7d7 Download ktor from maven central in wizard project 2021-01-14 21:24:47 +03:00
Vyacheslav Karpukhin 71c71d8619 AndroidDependencyResolver: compatibility with AGP 7 2021-01-14 14:02:28 +01:00
Alexander Udalov a6b51da308 Fix compilation in the case of JDK_16 pointing to JDK 1.8 2021-01-13 21:47:23 +01:00
Alexander Udalov 3be62dfc89 Build: enable -Werror in stdlib/core/compiler/plugins modules
Exclude modules where there are still warnings in an explicitly declared
variable `tasksWithWarnings`.

Also remove "-progressive" from compiler arguments in modules which are
built with non-latest language version, as the warning about that leads
to an error with -Werror.
2021-01-13 19:34:24 +01:00
Alexander Udalov 2a7a297399 Suppress "runtime JAR files version mismatch" warnings in some plugins 2021-01-13 19:34:24 +01:00
Alexander Udalov 221f44da5f Fix warnings in stdlib/compiler/plugins/test code 2021-01-13 19:18:20 +01:00
sebastian.sellmair bfbb6afee5 Add sourcesJar from metadata target to root multiplatform publication
^KT-44298 fixed
2021-01-13 15:07:35 +00:00
Ivan Gavrilovic dfdd107fc0 Update KAPT stubs for tests
Update expected outputs so they match
the new sorting rules.
2021-01-13 22:49:09 +09:00
Ivan Gavrilovic ad8517c19a Add tests from the reverted commit
To ensure deterministic build outputs.
2021-01-13 22:49:09 +09:00
Ivan Gavrilovic a320152a03 Revert "Sort class members to ensure deterministic builds"
This reverts commit 4bf63a9539.
2021-01-13 22:49:09 +09:00
Bingran 77f8c1e58f Improve cacheability test coverage on kotlin compile, kapt tasks
This PR makes sure we have following cases covered for :compileKotlin,
:kaptKotlin, :kaptGenerateStubsKotlin tasks.

1. incremental change + input relocated
2. incremental change + input not relocated
2021-01-13 12:17:14 +03:00
Ivan Gavrilovic 1c8a25c106 KT-44020: Rename KAPT configuration used as task property
This is so AGP does not try to apply AndroidX substitution
to dependencies found in the annotation processor classpath.
AGP does this by checking if the configuration name starts
with "kapt".

Test: Kapt3Android42IT
2021-01-13 16:25:57 +09:00
Dmitriy Novozhilov 9378d1ff31 [Test] Add nullability annotations on InTextDirectivesUtils methods 2021-01-12 18:35:15 +03:00
fjjohnchen 49f2ac3545 KT-43818:NPM Dependencies already resolved and installed in Android Studio resolve 2021-01-12 17:24:05 +03:00
Dmitriy Novozhilov e991c9d476 [CLI] Drop CommonCompilerArguments.coroutinesState 2021-01-12 16:47:54 +03:00
Dmitriy Novozhilov df3b12e13b [FE] Drop coroutinesState from build configurations plugins 2021-01-12 16:47:51 +03:00
Ilya Goncharov df75cddcb8 [Gradle, JS] Add possibility to set jvmArgs for dce process
^KT-44104 fixed
2021-01-12 15:54:28 +03:00
Kris Hall ee952db1a2 Added samples for String.replace() function 2021-01-12 14:59:43 +03:00
Alexander Udalov 22d0e5eb65 Rename -Xno-use-ir -> -Xuse-old-backend, add Gradle option
As soon as JVM IR is enabled by default (in language version 1.5), use
the CLI argument `-Xuse-old-backend` or Gradle option `useOldBackend` to
switch to the old JVM backend.
2021-01-11 12:47:54 +01:00
Ilya Chernikov 534342a566 [minor] use new kotlin.io.path API in tests 2021-01-07 10:37:21 +01:00
Ilya Chernikov 1bd6cc823c Fix provided properties access generation
The presense of accessors in the descriptor led to the wrong code
generation in some cases.
#KT-43176 fixed
2021-01-07 10:37:20 +01:00
Alexander Udalov 41c4693ebf Build: remove obsolete -Xir-binary-with-stable-abi
It's no longer needed after eef06cded3 and 3e3ffee2a0.
2021-01-04 18:10:43 +01:00
Alexander Udalov acd29481bd Regenerate sources of builtins and stdlib 2021-01-03 22:31:06 +01:00
Alexander Udalov ed9a0e514d Regenerate tests and fir-tree 2021-01-03 14:53:41 +01:00
Ilya Gorbunov 3c37bbaf64 Duration: normalize to avoid negative zeroes (KT-44168)
The current comparison method of inline classes makes
durations of positive and negative zeroes non-equal.
To avoid that, normalize the duration value upon construction
preventing negative zero being stored.
2020-12-31 19:44:39 +03:00
Ilya Gorbunov ae6f10df3b Duration: reject NaN duration values (KT-44168) 2020-12-31 19:44:10 +03:00
Ilya Gorbunov 1d40ed39d0 KotlinVersion: Advance snapshot version 1.4.255 -> 1.5.255
KTI-421
2020-12-31 19:20:29 +03:00
Nikolay Krasko 133e39b783 Advance snapshot version 1.4.255 -> 1.5.255 (KTI-421)
#KTI-421 Fixed
2020-12-31 15:49:06 +03:00
Abduqodiri Qurbonzoda 662787b12b Straighten Char-to-code and Char-to-digit conversions out #KT-23451 2020-12-31 12:07:41 +03:00
Ilya Gorbunov 79e426270c Rename Random.Default serialization surrogate object (KT-25571) 2020-12-31 06:57:17 +03:00
Iaroslav Postovalov 00506a75d3 Make Random implementations serializable (KT-25571)
Make Random.Default, XorWowRandom, and wrapper classes for JDK Random implement Serializable interface.

Co-authored-by: Ilya Gorbunov <ilya.gorbunov@jetbrains.com>
2020-12-31 04:10:28 +03:00