Commit Graph

9989 Commits

Author SHA1 Message Date
sebastian.sellmair df7ab52505 [Gradle] Minor: Demote visibility of '.commonizeCInteropLibraries'
^KT-46198
2021-11-08 16:43:48 +00:00
sebastian.sellmair afa320a7b2 [Gradle] Minor: Move locateOrRegisterTask from CommonizerTasks.kt to TaskProviders.kt
^KT-46198
2021-11-08 16:43:48 +00:00
sebastian.sellmair 3bd36770cb [Gradle] Minor: Add return type for ModuleIds.fromDependency
^KT-46198
2021-11-08 16:43:48 +00:00
sebastian.sellmair 7c77ff83a7 [Gradle] Minor: Project.filesProvider add possibility to specify buildDependencies
^KT-46198
2021-11-08 16:43:47 +00:00
sebastian.sellmair 33e391583d [Gradle] Minor: Refactor AbstractCInteropCommonizerTask to extensions
^KT-46198
2021-11-08 16:43:47 +00:00
Michael Rittmeister 21a1582a83 Fix ExplicitApiMode.Disabled 2021-11-08 18:57:39 +03:00
Ilya Goncharov c464cabd44 [Gradle, JS] Use yarn.lock name by default 2021-11-08 17:54:15 +03:00
konstantin.tskhovrebov d9f5ef2f91 Add dSYMs to release XCFramework.
#KT-49484
2021-11-08 10:01:35 +00:00
Igor Laevsky 22c161bcee [Wasm] Run unit tests for the wasm stdlib (fail on verifier for now) 2021-11-03 16:23:02 +03:00
Igor Laevsky 36d9001d54 [Wasm] Teach gradle plugin to run wasm unit tests for nodejs and Mocha 2021-11-03 16:23:02 +03:00
Igor Laevsky 46b56c7642 [Wasm] Improve string constructor in stdlib 2021-11-03 16:23:01 +03:00
Igor Laevsky cb10bd3a95 [Wasm] Port stdlib and kotlin.test build to wasm gradle plugin 2021-11-03 16:23:01 +03:00
Yahor Berdnikau 5a11446c79 Migrate KotlinDaemonIT tests to new test dsl.
^KT-45745 In Progress
2021-11-03 13:34:52 +01:00
Yahor Berdnikau a6436adc17 Add KGPDaemonsBaseTest class as test base for daemons test.
This class will stop Gradle and Kotlin daemons after each test
execution.

^KT-45745 In Progress
2021-11-03 13:34:48 +01:00
Ilya Goncharov 540419a5d7 [Gradle, JS] Do not force dukat in separate dukat task
^KT-34014 fixed
^KT-49505 fixed
2021-11-03 09:53:54 +00:00
Ilya Goncharov 9c4aa8fe84 [Gradle, JS] Fix unit test after changes of test infrastructure 2021-11-03 09:53:54 +00:00
Ilya Goncharov 99f686af39 [Gradle, JS] Fix according to recently Gradle test ifrastructure changes
^KT-34014 fixed
^KT-49505 fixed
2021-11-03 09:53:53 +00:00
Ilya Goncharov ce57826ed3 [Gradle, JS] Configure requires NPM dependencies inside rootPackageJson
^KT-34014 fixed
^KT-49505 fixed
2021-11-03 09:53:53 +00:00
Ilya Goncharov 4bf6e6d722 [Gradle, JS] Use node_modules dir existence as marker of up-to-date
^KT-34014 fixed
^KT-49505 fixed
2021-11-03 09:53:52 +00:00
Ilya Goncharov 21249a1dcb [Gradle, JS] Use separate task class for good configuration caching
^KT-34014 fixed
^KT-49505 fixed
2021-11-03 09:53:52 +00:00
Ilya Goncharov 4caa3ad562 [Gradle, JS] Configure tasks in after evaluate block
^KT-34014 fixed
^KT-49505 fixed
2021-11-03 09:53:52 +00:00
Ilya Goncharov e496c638ad [Gradle, JS] Ignore scripts by default
^KT-34014 fixed
^KT-49505 fixed
2021-11-03 09:53:51 +00:00
Ilya Goncharov a03f346296 [Gradle, JS] Persist yarn lock by default
^KT-34014 fixed
^KT-49505 fixed
2021-11-03 09:53:51 +00:00
Ilya Goncharov c34884b0b6 [Gradle, JS] Update Node.JS onto 16.13.0 and Yarn onto 1.22.17
^KT-49530 fixed
2021-11-03 11:33:24 +03:00
Yahor Berdnikau 21d208341e Move few kapt tests into daemon tests.
This tests does assertion that require having fresh Gradle daemon.

^KT-45745 In Progress
2021-11-03 08:59:35 +01:00
Yahor Berdnikau 8991c78ae6 Migrate only Kapt tests to new test dsl.
^KT-45745 In Progress
2021-11-03 08:59:35 +01:00
Yahor Berdnikau 550287105a Add additional file assertions.
File does not exist, file exists in the tree, file does not exist in
the tree.

^KT-45745 In Progress
2021-11-03 08:59:35 +01:00
Yahor Berdnikau a5ff409c11 Also provide for tests JDK 1.8 as a parameter.
^KT-45745 In Progress
2021-11-03 08:59:35 +01:00
Yahor Berdnikau adbf075a68 Add method to include other test project as module.
^KT-45745 In Progress
2021-11-03 08:59:35 +01:00
Yahor Berdnikau 7cda2e9859 Add 'testResolveAllConfigurations' assertion for new test DSL.
^KT-45745 In Progress
2021-11-03 08:59:35 +01:00
Yahor Berdnikau 5989e0936f Add helper methods to find all Kotlin or Java source files.
^KT-45745 In Progress
2021-11-03 08:59:35 +01:00
Yahor Berdnikau 7583d4d74e Add KGP tests task dependency on sample annotation processor install.
Kapt tests expected it to be available in maven local.

^KT-45745 In Progress
2021-11-03 08:59:31 +01:00
Yahor Berdnikau 2adf19c2bb Move Gradle/Js tests into Js platform test tag.
^KT-45745 In Progress
2021-11-02 23:39:53 +01:00
konstantin.tskhovrebov b0c34e217b FatFrameworkTask: Fix dSYM extension check. 2021-11-02 21:08:16 +00:00
Ivan Gavrilovic 0ee4e386be KGP - Fix flaky tests invoking javac through JDK APIs
Tests invoking javac APIs were flaky because ClasspathAnalyzerTest
was using Gradle's ProjectBuilder, which appends tools.jar to
the system class loader. Other tests do not do that, and they
invoke javac APIs directly.

In some executions, this causes some javac classes to be loaded
from the system class loader (the one patched by Gradle), while
some of them will be loaded by UrlClassLoader which points to tools.jar
in java.home. Having javac classes from different class loaders causes
java.lang.IllegalAccessError as package private access across class loaders
is not allowed. https://bugs.openjdk.java.net/browse/JDK-8068152 has more
information on this issue.

This change fixes the issue by fully removing usage of ProjectBuilder.

Test: ClasspathAnalyzerTest
2021-11-02 18:03:34 +01:00
Ivan Gavrilovic 4d208b529d Kotlin Gradle plugin - Remove assertions from integration tests
This is because AGP 3.4 and 3.6 have version of R8 that is unable
to handle kotlin-stdlib 1.6+. Issue https://issuetracker.google.com/148661132
has more details on this.

Instead of adding logic to remove assertions based on the AGP version,
this change fully removes them to keep things simple. Also, running with
assertions enabled may be too much for the integration tests.
2021-11-02 17:53:30 +01:00
Yahor Berdnikau a29dfb3b48 Disable finalizing by 'cleanTestKitDir' for 'kgpDaemonTests' task.
Seems jna dependency file descriptor is leaking on Windows agents,
leading to '.testKitDir' directory remove error.
2021-11-02 15:13:26 +01:00
Konstantin Tskhovrebov a9f850dac0 Refactor FatFrameworkTask: use FrameworkDescriptor instead Framework.
for independence from module compilation.
2021-11-02 06:18:25 +00:00
Sergey Igushkin 05822c59b5 Fix Android Lint dependency resolution issues (KT-49483)
Android Gradle plugin resolves the *Classpath configurations in an
artifact view with an artifactType attribute set, which should
give a resolved variant with a different `org.gradle.category`
attribute. With `org.gradle.category=library` set by the Kotlin
Gradle plugin, that couldn't work.

To fix this, don't set the `org.gradle.category` attribute on the
Android resolvable configurations.

TODO: Add integration tests!
2021-11-01 14:57:50 +00:00
Yahor Berdnikau d7ae7ca911 Ensure all test tasks is finalized by 'cleanTestKitCacheTask' on CI.
^KT-45745 In Progress
2021-10-29 17:34:00 +02:00
Yahor Berdnikau c25d243111 Add 'kgpOtherTests' task.
This will run tests for all support plugins, such kapt, allopen, etc...

^KT-45745 In Progress
2021-10-29 17:34:00 +02:00
Svyatoslav Kuzmich 5b10396f48 [stdlib] Test that modification of the array returned by toCharArray() doesn't affect the original string 2021-10-28 15:49:00 +00:00
Svyatoslav Kuzmich 766377a041 [Wasm] Remove WasmForeign annotation
No longer needed since external interfaces are supported
2021-10-28 18:47:38 +03:00
Alexander Dudinsky f8dd1b3512 Fix Gradle Integration Tests MPP and Android on MacOS 2021-10-28 11:34:06 +03:00
Mikhail Glukhikh 8bd0b237b7 Convert EXPOSED_PROPERTY_TYPE_IN_CONSTRUCTOR into deprecation error
#KT-28078 Fixed
2021-10-27 19:43:01 +03:00
Ivan Gavrilovic 3e1cf77f54 Kotlin Gradle Plugin integration tests - ensure Android sdk...
... licenses are accepted before running the test build.
2021-10-27 16:41:51 +03:00
Dmitriy Novozhilov f26059a7d3 [FE] Add clear warning about future changes about nullability of safe call with non nullable receiver
^KT-46860
2021-10-27 16:28:37 +03:00
Nikolay Krasko 36c4938172 Add version to kotlin-reflect-stripped jar 2021-10-27 11:04:41 +03:00
Nikolay Krasko d348efa4c1 Do not pack proguard and stripped jars for kotlin-reflect into compiler zip
kotlin-reflect-proguard.jar has different timestamps and shows
difference on each build for the same sources.

The problem was introduced after migrating to Gradle 7.1 where
`libsDir` parameter was removed (https://docs.gradle.org/current/userguide/upgrading_version_6.html#removal_of_basepluginconvention_libsdir_and_basepluginconvention_distsdir).
After that the same variable started to be resolved to `dist` directory.
So this commit reverts the old behaviour.

^KTI-672 Fixed
2021-10-27 11:04:40 +03:00
Alexander Likhachev 2f19ff008f [Gradle] Migrate Kotlin/JS tests to the new test DSL
#KT-45745 In Progress
2021-10-26 20:21:15 +03:00