Commit Graph

2694 Commits

Author SHA1 Message Date
Ilya Chernikov d760299dc1 Implement context classpath extraction using particular class,...
Use it in the main-kts.
Also improve diagnoistics related to the definition loading.

#KT-26828 fixed (after this commit - finally, see also another related commit)
2018-09-15 15:44:53 +02:00
Ilya Chernikov d9760f00f6 Move context classpath utils from script-util to scripting-jvm
since it is the right place to have it in the new structure.
Solves the problem that script-util classes not found then script
definition with context classpath is loaded by the scripting compiler
plugin, since script-util is not packed into embeddable plugin.
The old context utils are deprecated and in fact wrap the new utils.
#KT-26828 fixed (in fact - partially, see another related commit)
2018-09-15 15:43:53 +02:00
Ilya Gorbunov 7e0a658de7 Change nextInt/Long with range parameters from members to extensions
We'd like to fix the implementation of these methods, so we could intrinsify them later
or perform other optimizations that are not possible when these methods are open.
2018-09-14 15:15:52 +03:00
Ilya Matveev ccd4bc1bff Add a project property for Kotlin/Native version overriding 2018-09-14 14:58:03 +03:00
Ilya Matveev 80bec0898f Download native compiler in configuration stage 2018-09-14 14:58:03 +03:00
Ilya Chernikov a03bfb3561 Implement support for non-kts scripts in gradle
#KT-26784 fixed
2018-09-13 20:47:21 +02:00
Ilya Gorbunov 2d356b89b5 Specialize contentDeepEquals/HashCode/ToString for arrays of unsigned types
#KT-26388
2018-09-13 06:10:10 +03:00
Ilya Gorbunov f340bc9f91 Do not use deprecated org.junit.Test in gradle js integration tests 2018-09-12 21:42:48 +03:00
Ilmir Usmanov 273889d1a9 Add our own primitive boxing methods to stdlib
These methods are very thin wrappers around primitive wrapper classes
constructors.
They are used by coroutines code which returns primitives and this way
HotSpot is able to throw the allocations away completely.
 #KT-26591 Fixed
2018-09-12 15:36:11 +03:00
Alexander Udalov f63cf9d506 Use JvmName on kotlin.Metadata parameters to improve public API
#KT-26359 Fixed
2018-09-12 14:37:11 +03:00
victor.petukhov 50d9dbbfc1 Fix inheritance in stdlib contracts code (KT-26409) 2018-09-12 12:34:15 +03:00
Ilya Gorbunov a18770fbbb Remove projectDist dependency helper usages
Use default configuration dependencies instead of projectDist ones.
2018-09-12 06:05:05 +03:00
Ilya Gorbunov 03340d770b Replace remaining distJar dependencies with default configuration dependencies 2018-09-12 06:05:05 +03:00
Alexander Udalov e7807cc168 Skip prerelease check when building kotlin-stdlib-js-merger 2018-09-11 21:10:04 +03:00
Ilya Gorbunov 010b36be1f Raise deprecation level for kotlin.js.Math functions
#KT-21703
2018-09-11 18:15:03 +03:00
Ilya Gorbunov ad76edd7b7 Raise deprecation level for org.junit.Test in stdlib for common and JS
#KT-21703
2018-09-11 18:15:03 +03:00
Leonid Startsev fa990174ef Rename kotlinx-serialization => kotlin-serialization
Discussed with @elizarov and @ilya-g
2018-09-11 17:31:38 +03:00
Sergey Igushkin 099ad8de1e Don't set Kotlin platform attribute for the default configuration
Also, fix empty configurations created for targets that have no runtime
outputs (metadata ones, especially), which could get chosen by Gradle
during dependency variant-aware resolution of a `project(...)`
dependency.

See also: d13ca38

With the attribute set, an input configuration that does not require the
Gradle's USAGE attribute but requires Kotlin platform metadata, will
fail to resolve because the attributes set on the consumable
output configurations are not subsets of each other, as follows:

> Cannot choose between the following variants of project :lib:
  - metadataApiElements
  - metadataDefault
  - metadataRuntimeElements
  All of them match the consumer attributes:
    - Variant 'metadataApiElements':
      - Found org.gradle.usage 'java-api' but wasn't required.
      - Required org.jetbrains.kotlin.platform.type 'common' and found
        compatible value 'common'.
    - Variant 'metadataDefault':
      - Required org.jetbrains.kotlin.platform.type 'common' and found
        compatible value 'common'.
    - Variant 'metadataRuntimeElements':
      - Found org.gradle.usage 'java-runtime-jars' but wasn't required.
      - Required org.jetbrains.kotlin.platform.type 'common' and found
        compatible value 'common'.

Issue #KT-26383 Fixed
2018-09-11 17:22:36 +03:00
Ilya Gorbunov 1eda3805ec Introduce overloads to check for T? element contained in iterable range in a constant time
#KT-18483
2018-09-11 17:06:42 +03:00
Sergey Igushkin f147b8d2b2 Change classes task naming and create additional task for IDE runner
Issue #KT-26641 Fixed
2018-09-11 16:24:59 +03:00
Ilya Matveev 29048ce5ae Add generated interop libraries in compile dependency configuration (#1864) 2018-09-11 16:07:33 +03:00
Ilya Chernikov a02d5b4b21 Rename script annotation params according to configuration keys...
rename evaluation params consistently too
2018-09-11 14:56:51 +02:00
Leonid Startsev 7011e9422d Rename kotlinx-gradle-serialization-plugin => kotlinx-serialization 2018-09-11 13:22:17 +03:00
Ilya Gorbunov 48add96e79 Deprecate mixed Int/FP contains operator for ranges
#KT-22423
2018-09-11 05:40:15 +03:00
Ilya Matveev 3269c0e51b Support cinterop in the native part of kotlin-multiplatform 2018-09-10 20:43:00 +03:00
Ilya Matveev f7949a2131 Use 'teamcity.version' property to detect CI in K/N tests 2018-09-10 20:40:59 +03:00
Ilya Matveev 0ac701d8bf Provide getters for names of native link tasks 2018-09-10 20:40:59 +03:00
Ilya Matveev f1de88ebbc Use teamcity test logger if the project has a corresponding property 2018-09-10 20:40:59 +03:00
Ilya Matveev cbb1b9fae5 Provide a basic DSL for liking task accessing 2018-09-10 20:40:59 +03:00
Ilya Matveev f5eecdd547 Support custom entry points for native binaries 2018-09-10 20:40:59 +03:00
Ilya Matveev 76074f9543 Support language settings from source sets for native 2018-09-10 20:40:59 +03:00
Ilya Matveev 14e4f219da Support compiler plugins in native part of the mpp plugin 2018-09-10 20:40:59 +03:00
Ilya Matveev 41367b0285 Create test tasks for all native hosts + tests
#KT-26547 fixed
2018-09-10 20:40:59 +03:00
Ilya Matveev 03e1e8d19d Support friend modules in native mpp 2018-09-10 20:40:59 +03:00
Ilya Matveev 595a7700df Use FQ names for Kotlin/Native project properties 2018-09-10 20:40:59 +03:00
Alexander Udalov 9311ea5d25 Support progressive mode via "-progressive"
#KT-25862 Fixed
2018-09-10 14:12:31 +03:00
Nikolay Krasko a5e8508e5a Write official code style to maven archetypes (KT-23400) 2018-09-10 13:03:41 +03:00
Dmitriy Dolovov 5183eba70b Fix K/N module compilation in MPP project imported from Gradle #KT-26688 2018-09-10 11:17:42 +03:00
Roman Elizarov e2713501ce Rename SuccessOrFailure to Result and hide Failure from ABI
* The members of Result are isSuccess, isFailure, exceptionOrNull, getOrNull
* The rest of API is implemented via inline-only extensions
* There are two internal functions to hide detailed mechanics of an internal
  Result.Failure class: createFailure and throwOnFailure
* Result.toString is explicit: either Success(v) or Failure(x)

See KT-26538
2018-09-09 11:34:31 +03:00
Dmitriy Dolovov 337100edc3 Rename "konan" modules to "kotlin-native" modules 2018-09-08 12:16:20 +03:00
Ilya Matveev 299e508204 Add libraries provided by the K/N compiler in dependencies 2018-09-08 12:16:20 +03:00
Leonid Startsev 9aba3b6c72 Add forgotten kotlinx-maven-serialization 2018-09-07 21:17:08 +03:00
Leonid Startsev dea69e4469 Integrate serialization plugin into big Kotlin plugin
Split import handlers into multiple files
Add empty Maven handler for Android Studio

Add testRuntime dependency on kx-serialization-plugin for all modules which require compiler
plugins in test classpath
2018-09-07 21:17:07 +03:00
Leonid Startsev 087f60389a Migrating to 1.3 preview API 2018-09-07 21:17:06 +03:00
Leonid Startsev 359a37c9c3 Fix after rebase 2018-09-07 21:17:05 +03:00
Leonid Startsev 090f7e67eb Separate module for unshaded version 2018-09-07 21:17:04 +03:00
Leonid Startsev 6770cccd61 [IR-plugin] New symbol tables 2018-09-07 21:17:04 +03:00
Leonid Startsev 566e5ce603 Updates for new API 2018-09-07 21:17:03 +03:00
Leonid Startsev 223733558c Use new approach to resolve compiler plugin classpaths in gradle 2018-09-07 21:16:59 +03:00
Leonid Startsev 9ad3922c7d Fix 1.2.50 compatibility
Updated version to 0.5.1

Fix resolving serializers for classes from other modules
(Kotlin/kotlinx.serialization/153)

Respect @SerialName on classes

Add support for @SerialInfo on class-level
2018-09-07 21:16:58 +03:00