Commit Graph

4998 Commits

Author SHA1 Message Date
Alexander Udalov 55c8b35eee Remove unneeded default imports in stdlib and tests 2018-10-01 13:39:02 +02:00
Alexander Udalov 009f18f1f4 Split AnalysisFlag values to AnalysisFlags and JvmAnalysisFlags
Declare AnalysisFlags in module 'frontend', and JvmAnalysisFlags in
module 'frontend.java', to avoid leaking Java-related logic to common
compiler code
2018-10-01 13:31:00 +02:00
Ilya Matveev d2740db88f Update Kotlin/Native: 0.9.3 2018-09-30 11:27:13 +03:00
Ilya Matveev 7a5c05b72d Filter java.endorsed.dirs property in K/N runner 2018-09-30 11:27:13 +03:00
Sergey Igushkin 58a8411575 Fix KNPE due to publications processing order in Gradle 4.7
A KNPE happened because Gradle 4.7 (but not 4.8+) requested a
publication's dependencies before all other publications were created.

Issue #KT-27231 Fixed
2018-09-28 21:57:09 +03:00
Svyatoslav Kuzmich 334c776b92 [JS IR BE] Fix @DoNotIntrinsify processing. Reuse it for compareTo 2018-09-28 20:27:01 +03:00
Ilya Gorbunov 12a31637d1 Improve groupingBy samples 2018-09-28 19:59:30 +03:00
Ilya Gorbunov 3a40e3f041 Move groupingByEachCount together with the new Grouping samples 2018-09-28 19:51:07 +03:00
Itsuki Aoyagi 039d41679e Add samples for groupingBy operations 2018-09-28 19:51:07 +03:00
Ilya Matveev 5140e674b4 Use compileClasspath configuration for native standard libraries 2018-09-28 14:15:11 +03:00
Ilya Matveev 5c4adc1100 Don't add dependency on a klib task for binary tasks 2018-09-28 14:15:11 +03:00
Ilmir Usmanov 6e0391f9ec Use release coroutines in script-runtime 2018-09-27 21:59:35 +03:00
Dmitry Petrov 0191e3d1cf Migrate to release coroutines 2018-09-27 21:59:31 +03:00
Sergey Igushkin 2441df820b Support Kotlin/JS DCE in new MPP
Issue #KT-27196 Fixed
2018-09-27 17:54:38 +03:00
Ilya Chernikov 499146db0e Fix pill problem with main-kts-test, reenabling pill for main-kts modules 2018-09-27 16:27:55 +02:00
Ilya Chernikov 7b7f87a3b7 Move ivy resolver to the main-kts to avoid classloading issues...
e.g. when main-kts is loaded in IDEA
#KT-26828 fixed
2018-09-27 12:56:19 +02:00
Ilya Gorbunov 0c81e30d46 Make a more correct implementation of unsigned arrays copyInto
Return the destination array instead of the destination storage array
wrapped in a new unsigned array. The difference should be
indistinguishable, however in JS, where inline classes are not inlined yet,
it had resulted in an extra wrapper.
2018-09-26 22:57:14 +03:00
ymnder 1a20b1f357 Add sample for 'repeat' function
Co-authored-by: Ilya Gorbunov <ilya.gorbunov@jetbrains.com>
2018-09-26 22:39:56 +03:00
shiraji 0c97d99d77 KT-20357 Add sample code for Regex.find
Co-authored-by: Ilya Gorbunov <ilya.gorbunov@jetbrains.com>
2018-09-26 22:24:53 +03:00
takattata f06ea6fddd KT-20357 Add sample code for Char extensions 2018-09-26 21:58:50 +03:00
Takayuki Matsubara d26c0f777b KT-20357 Add samples for Map.containsValue
Co-authored-by: Ilya Gorbunov <ilya.gorbunov@jetbrains.com>
2018-09-26 21:03:57 +03:00
Keita Watanabe 12ec4fdce0 KT-20357 Add sample for mutableSet function 2018-09-26 20:44:40 +03:00
Ilya Gorbunov df6ccbca49 KT-20357 Add samples for elementAtOrElse
Move samples to Elements nested class.
2018-09-26 20:44:40 +03:00
Takayuki Matsubara 7d5efe7f51 KT-20357 Add samples for elementAtOrNull 2018-09-26 20:44:40 +03:00
Takayuki Matsubara ad9b700ec4 KT-20357 Add samples for elementAt 2018-09-26 20:44:40 +03:00
Vyacheslav Gerasimov cb398ea6b1 Fix compilation of kotlin-gradle-plugin broken after migration to gradle 4.10 2018-09-26 18:56:35 +03:00
Ilya Gorbunov 7b66a4d295 Remove links to contract samples as these samples are not supported by Dokka 2018-09-26 18:15:52 +03:00
Ilya Gorbunov b2b23ac282 Improve contract API documentation 2018-09-26 18:15:52 +03:00
Ilya Gorbunov f2a51f96a5 Improve documentation of experimental annotations 2018-09-26 18:15:52 +03:00
Ilya Gorbunov 04f1f6086b Fix doc build script after removing taks distJar from stdlib project 2018-09-26 18:15:52 +03:00
Vyacheslav Gerasimov 1f0e9f24c5 Fix noDefaultJar helper for gradle 4.10
artifacts don't implement ArchivePublishArtifact in gradle 4.10
2018-09-26 16:19:09 +03:00
Vyacheslav Gerasimov 1109b795da Build: upgrade gradle to 4.10 2018-09-26 16:19:09 +03:00
Vyacheslav Gerasimov 10810aa90f Build: upgrade gradle to 4.8, fix ivy artifacts publication
Fix kotlin gradle plugin compilation against gradle 4.8 api
Internal ivy artifacts api has been changed, there is no longer DefaultIvyArtifact
2018-09-26 16:19:09 +03:00
Sergey Igushkin 44f87e4951 Revert "(minor) Transform KotlinPlatformType attribute to String, rename entries"
This reverts commit 3f24f8bd
2018-09-26 15:58:14 +03:00
Sergey Igushkin 8d054ba346 Revert "Build source sets hierarchy in Android projects"
This reverts commit 269410d7

The change causes errors in AS 3.2 import.
2018-09-26 15:58:14 +03:00
Ilya Matveev 3f452b2af2 Fix native test working directory 2018-09-26 15:49:47 +03:00
Ilya Matveev 6741a550d9 Add implementation dependencies into publication for native 2018-09-26 15:49:47 +03:00
Ilya Matveev ac24bb0433 Update Kotlin/Native: 0.9.2 2018-09-26 15:49:47 +03:00
Ilya Matveev da1fcb008b Fix -Xcommon-sources in native args 2018-09-26 15:49:47 +03:00
Sergey Igushkin c4283de9cb Mark deprecated Gradle configurations with the Kotlin platform attribute
The traditional Gradle/Java model assumes several configurations, which
are now deprecated, which are both `canBeConsumed = true` and
`canBeResolved = true`.

* compile, testCompile, etc.
* runtime, testRuntime, etc.
* default

These configurations need to somehow resolve correctly to an appropriate
platform-specific artifact when they contain an MPP library or project
dependency.

However, simply marking them with the Kotlin platform type attribute
would put these configurations under considerations during Gradle
variant aware depdendency resolution of project dependencies, which
in order would lead to ambiguity (e.g. `compile` vs `runtime` vs
`testCompile` vs ... vs `apiElements`).

To deprioritize these configurations during dependency resolution, we
mark them with a special attribute with a unique value in each project.
Given that the values are different in different projects, Gradle will
not choose a configuration marked by this attribute.

But we still need 'project(path: '...', configuration: '...')`
dependencies to work, and so, instead of rejecting those different
values of the attribute, we say that all values are compatible, but
when an ambiguity arises, choose the configurations not marked by this
attribute, so effectively eliminating them from resolution.

Issue #KT-27111 Fixed
2018-09-26 13:02:32 +03:00
Sergey Igushkin 3f24f8bd8d (minor) Transform KotlinPlatformType attribute to String, rename entries
* To avoid unexpected effects from the Gradle instantiation mechanisms
  for attribute values, use a safer String attribute type for the
  KotlinPlatformType attribute

* Rename its entries to keep enum entries naming consistent
2018-09-26 13:02:32 +03:00
Sergey Igushkin 65e3559c09 Fix resources processing configuration
* Add resources processing to the K/N compilations

* Use a proper resources output path (composed from target + compilation
  rather than just compilation name)

* Fix incorrect reassignment of the resources directory
2018-09-26 13:02:32 +03:00
Sergey Igushkin fef61eca51 Add tests for variant-aware dependency resolution between projects 2018-09-26 13:02:32 +03:00
Sergey Igushkin 81ae54c05b Show warnings for disabled targets on current host
Issue #KT-26647 Fixed
2018-09-26 13:02:32 +03:00
Sergey Igushkin 4f650bb056 Add an experimental feature warnings on MPP usage & metadata publishing
Issue #KT-25200 Fixed
2018-09-26 13:02:31 +03:00
Sergey Igushkin 54988932a3 Ensure that kapt configurations are not exposed for consumption 2018-09-26 13:02:31 +03:00
Sergey Igushkin 7c05f77cb7 Add tools for testing dependencies resolution by resolving all configs 2018-09-26 13:02:31 +03:00
Sergey Igushkin c3dd24e9b2 Rewrite project dependencies when publishing a multimodule MPP
When a new MPP is published without Gradle metadata, the project
dependencies should be replaced with specific module dependencies,
e.g. `sample-lib` with `sample-lib-jvm`, because a consumer won't be
able to resolve `sample-lib` in a variant-aware way.
2018-09-26 13:02:31 +03:00
Sergey Igushkin 05301e37d8 Fallback for publishing with no Gradle metadata
The following parts of the publications are affected:

* root publication
  * with Gradle metadata, it is published and references the
    other publications using the `available-at` mechanism
  * without metadata opt-in, it is not published

* Kotlin metadata variant
  * with Gradle metadata, it is added as an additional variant to the
    platform-specific publications to allow the IDE to discover it
  * without metadata opt-in, it is added as a dependency to the platform-
    specific modules (like in old MPP)
2018-09-26 13:02:31 +03:00
Sergey Igushkin b388f7fde0 Introduce Kotlin variants with metadata variant and metadata dependency
These two will be needed when we publish a platform-specific part of a
MPP library in order to help the consumers of that single module
(rather than the whole MPP library) find the Kotlin metadata.

`KotlinVariantWithMetadataVariant` will be used for publishing with
Gradle metadata enabled, `KotlinVariantWithMetadataDependency` for
publishing without Gradle metadata, instead adding the Kotlin metadata
as a dependency, just like we did in old MPP.
2018-09-26 13:02:31 +03:00