Commit Graph

9915 Commits

Author SHA1 Message Date
Ilya Goncharov 2e350a10bd [Gradle, JS] Windows environment for not ignoring scripts 2021-12-01 09:18:37 +00:00
Ilya Goncharov d4953cb51a [Gradle, JS] Separately add arguments for kotlin npm install
^KT-49902 fixed
2021-12-01 09:18:36 +00:00
Pavel Kunyavskiy 9b366af38b [K/N] Fix String.compareTo on unicode strings
^KT-49873
2021-12-01 07:51:27 +00:00
Alexander Udalov d3e9ea0aae Prepare kotlinx-metadata-jvm 0.4.1 for release 2021-12-01 01:05:22 +01:00
Morten Krogh-Jespersen 544689dc4f Add getter for syntheticMethodForDelegate in JvmExtensions 2021-12-01 01:05:22 +01:00
Alexander Udalov 8a7d86c4e5 Build: remove obsolete argument -Xskip-runtime-version-check
It was removed in KT-41664.
2021-11-30 17:13:10 +01:00
konstantin.tskhovrebov 3dd27b9b1f Add integration tests for new K/N library DSL. 2021-11-30 17:51:58 +03:00
konstantin.tskhovrebov 2e86fbd2b5 Add new DSL for configuring K/N xcframework artifact. 2021-11-30 17:51:57 +03:00
konstantin.tskhovrebov 43fe1e52c9 Add new DSL for configuring K/N fatframework artifact. 2021-11-30 17:51:57 +03:00
konstantin.tskhovrebov 3f40af10dc Add new DSL for configuring K/N framework artifact. 2021-11-30 17:51:56 +03:00
konstantin.tskhovrebov cfdd5673ee Add new DSL for configuring K/N library artifact. 2021-11-30 17:51:56 +03:00
konstantin.tskhovrebov 17fe4f67e5 Add new compilation independent KotlinNativeLinkArtifactTask. 2021-11-30 17:51:55 +03:00
konstantin.tskhovrebov bbc43cde74 Change FileCollection to List<File> for K/N argument builder. 2021-11-30 17:51:54 +03:00
Hung Nguyen 6ba1b2cc08 KT-45777: Don't include classpath snapshot dir in task output backup
for performance reasons: (1) the snapshots are too big, and (2) they are
usually updated only at the end of the task execution--in a failed task
run, they are usually unchanged and therefore don't need to be restored.
2021-11-30 13:59:19 +03:00
Hung Nguyen f52be5f471 KT-45777: Move classpath diffing to incremental Kotlin compiler (2/2)
as we need access to the lookup tracker to compute classpath changes
more efficiently and reduce the size of the saved classpath snapshot.

The previous commit only changed the files' paths, this
commit actually updates the files' contents.

Note that classpath snapshotting still happens in Gradle artifact
transforms. (However, the previous commit also moved the code for
classpath snapshotting together with the code for classpath diffing as
they are closely related.)
2021-11-30 13:59:13 +03:00
Hung Nguyen dfaf195e1d KT-45777: Move classpath diffing to incremental Kotlin compiler (1/2)
This commit only changes the files' paths, the next commit will update
the files' contents.

See the next commit for more context.
2021-11-30 13:59:12 +03:00
konstantin.tskhovrebov 14ee13c72e Register "embedAndSignAppleFrameworkForXcode" anytime but throw error without Xcode environment.
#KT-49971
2021-11-30 08:38:18 +00:00
Ilya Muradyan 6917ff7d2a [scripting] Move earlierScripts to the frontend descriptor
^KT-20488 fixed
2021-11-30 09:11:59 +03:00
Alexander Likhachev 4149b91c0d [Gradle, JS] Move KJS configuration cache tests into separate test suite
This way we make it utilize test execution workers more effectively
#KT-45745 In Progress
2021-11-30 07:24:34 +03:00
Alexander Likhachev 70c5fc703a [Gradle, JS] Add configuration cache test for Karma test task 2021-11-30 06:57:31 +03:00
Alexander Likhachev e8b9ff6c59 [Gradle, JS] Fix configuration cache problem in Mocha test task
#KT-49808 Fixed
2021-11-30 06:57:30 +03:00
Alexander Likhachev 439f69a20d [Gradle, JS] Add configuration cache test for nodejs project
#KT-49808 In Progress
2021-11-30 06:57:30 +03:00
Alexander Likhachev e6ae5db6ef [Gradle, JS] Fix configuration cache problem in KotlinJsIrLink task
#KT-49253 Fixed
2021-11-30 06:57:30 +03:00
Alexander Likhachev 32839c7ba2 [Gradle, JS] Move KJS configuration cache tests to other KJS tests
Previously some JS IR tasks weren't covered by tests
#KT-45745 In Progress
#KT-49253 In Progress
2021-11-30 06:57:29 +03:00
Alexander Likhachev f48e8dd35e [Gradle] Move basic configuration cache IT scenario to helpers file
#KT-45745 In Progress
2021-11-30 06:57:29 +03:00
Ilya Gorbunov 4386a800c8 KT-49721 Avoid matching from the same position after a zero-width match
In JS, RegExp can return a match before the specified start index,
if it has matched at that index, but it is in the middle of a surrogate
pair. Account for that when advancing to the next position after
a zero-width match so that it doesn't get to the middle of SP.
2021-11-29 17:02:06 +00:00
Anton Lakotka 8d54b8d79a Don't publish wasm targets with KotlinJsCompilerAttribute
Currently JS/IR and WASM targets share this attribute.
This causes issues for HMPP projects on
Variant-resolution stage when both JS/IR and WAS published.
Given the fact that WASM compilation uses IR only it is logical
to exclude such attribute which should fix variant resolution in HMPP
2021-11-29 10:44:06 +01:00
Yahor Berdnikau 8ea97758c0 Make tasks outputs snapshot into zip file.
Kotlin's compilation task outputs usually contains a lot of small files,
which is not so performant to copy as-is into new location. In this
change coping was replaced by using zip archive with no compression.

From my test I see around 2x performance improvement on doing task
 outputs snapshot.

Further optimizations will be done via separate issue as they are
non-trivial and requires some changes on the compiler side.

^KT-49782 Fixed
2021-11-26 16:29:36 +01:00
Ivan Gavrilovic f6263e64e0 KT-49910: Fix adding sources for Android projects
Avoid adding ConfigurableFileTrees to sources as that causes
individual *.java files to be evaluated as sources roots. To
pass the dependency info, manual dependsOn is used, but in the
future SourceRoots should be fixed to carry the dependency info.
2021-11-26 16:00:25 +01:00
Artem Kobzar 08b0e17d47 feat(polyfills): use stdlib for js polyfills. 2021-11-26 08:14:34 +00:00
Yahor Berdnikau 2766dc938b Disabled compiler plugin tests on Windows.
Kotlin compiler is leaking file descriptor to plugin jar file.

^KT-38570 Fixed
2021-11-25 15:10:23 +01:00
Sergey Igushkin 844876a974 KT-49835: Exclude org.gradle.jvm.environment attribute from publishing
Not publishing this attribute fixes the consumers that don't set it.
Those may encounter either a conflict of Kotlin <= 1.5.31 rule on
{JVM, Android} -> Android vs Gradle rule
{standard-jvm, android} -> standard-jvm (causing disambiguation
failures). Or they may run Gradle < 7.0 which doesn't have
disambiguation rules for `org.gradle.jvm.environment` and therefore
treats it as an ordinary extra attribute, thus eventually preferring
variants which don't have it if no other disambiguation rule worked
(again causing disambiguation failures since some rules may prefer the
variants where this attribute *is* set).

Also set a "non-jvm" value of this attribute for non-JVM variants for
project-to-project dependencies in order to "align" them so that Gradle
doesn't prefer variants not marked with this attribute.

Extend the set of dependency resolution tests which check
compatibility of different kinds of Android & JVM consumers against
project and published library: add Kotlin 1.5.31 consumers, also check
consumption with different Gradle version than the one which did the
publication.

Issue #KT-49835
2021-11-25 13:10:27 +00:00
Yahor Berdnikau d253f9ba0e Add test to validate incremental changes in compiler plugin.
If compiler plugin was recompiled incrementally, other projects in the
same build should pick it up and regenerate sources.

^KT-38570 Fixed
2021-11-25 12:45:29 +01:00
Yahor Berdnikau d205c376a7 Move JavaUpToDateIT tests into 'JvmGradlePluginTests'.
^KT-45745 In Progress
2021-11-25 11:03:14 +01:00
Yahor Berdnikau b6c11b544e Move kapt tests into 'OtherGradlePluginTests'.
^KT-45745 In Progress
2021-11-25 10:57:23 +01:00
Pavel Punegov 0249b7ed74 [K/N] Stdlib: warnings as errors
Fix or suppress warnings in Native stdlib.
2021-11-25 08:08:38 +00:00
Igor Chevdar d3d21f072a [K/N][gradle] Added a test for KT-49248 2021-11-25 12:37:01 +05:00
Nikolay Krasko 7457d54360 Drop junit 3.8.1 dependency
junit:junit:3.8.1
  org.codehaus.plexus:plexus-container-default:1.0-alpha-9-stable-1
    org.apache.maven:maven-artifact-manager:2.2.0
      org.apache.maven:maven-project:2.2.0
        org.apache.maven.shared:maven-dependency-tree:2.1
          org.jetbrains.kotlin:jcabi-aether:1.0-dev-3
            :kotlin-script-util compileClasspath
2021-11-24 19:35:34 +03:00
Nikolay Krasko 84a189b6cc Update transitive dependency for kotlin-test - junit 4.12 -> 4.13.2 2021-11-24 19:35:33 +03:00
Nikolay Krasko 317b0b4495 Update junit dependency 4.12 -> 4.13.2 in tests 2021-11-24 19:35:32 +03:00
Nikolay Krasko af8faadca5 Update internal project junit dependency 4.12 -> 4.13.2 2021-11-24 19:35:31 +03:00
Glen K. Peterson 25d962b591 Bumped Junit dependency to fix CVE-2020-15250
Junit >= 4.7 and < 4.13.1 is vulnerable to https://nvd.nist.gov/vuln/detail/CVE-2020-15250   Sorry, I didn't build or test this change.
2021-11-24 19:35:30 +03:00
Nikolay Krasko 58d7bd0baf Minor: clean up warnings in ScriptUtilIT 2021-11-24 19:35:24 +03:00
Nikolay Krasko af185ab870 Remove couple scripting tests commented for 2 years
There're similiar tests:
hello-resolve-junit-dynver.main.kts
hello-resolve-junit-dynver-error.main.kts
2021-11-24 19:35:23 +03:00
Yahor Berdnikau 9d686165fc Add test tag and task for KGP Android tests.
^KT-45747 In Progress
2021-11-24 17:20:24 +01:00
Yahor Berdnikau 2c7913627d Add test tag and task for KGP MPP tests.
^KT-45749 In Progress
2021-11-24 17:20:21 +01:00
Alexander Likhachev 4181429c7e [Gradle, JS] Add missing dependsOn on kotlinNpmCachesSetup task
It's already was not causing the build failure because of changes related to persisted yarn.lock but this fix is more reliable.
Also hidden `kotlinNpmCachesSetup` task by unsetting task group as it's not supposed to be executed directly and moreover direct execution makes no sense.
#KT-47215 Fixed
2021-11-24 14:49:28 +03:00
Igor Chevdar 8b859e6558 [gradle] Added option to customize class loaders map
This will be used in the K/N build for automatic cleaning of the daemon
2021-11-24 16:08:33 +05:00
Ilya Gorbunov d7c31fbe82 Disregard PlatformImplementation class loaded from parent classloader
Such type cannot be cast to a base type, if the former is loaded from
a different, parent classloader.

#KT-47857 Fixed

Co-authored-by: Aleksei.Cherepanov <aleksei.cherepanov@jetbrains.com>
2021-11-24 01:59:48 +03:00
Ilya Goncharov ffbf2ea1a5 [Gradle, JS] Remove redundant build.gradle modification in test 2021-11-23 18:48:33 +03:00