Commit Graph

5139 Commits

Author SHA1 Message Date
Ilya Gorbunov cff32e46bb Provide expect declarations for String.startsWith/endWith overloads
Mark the existing declarations as actual.
2018-11-22 19:17:24 +03:00
Ilya Gorbunov 3d2a3cddff Stop producing empty kotlin-stdlib-coroutines jar 2018-11-21 03:42:27 +03:00
Ilya Gorbunov 7d3de70754 Correct replacement for js Math.log
The correspondent kotlin.math function is ln(x)

#KT-28251 Fixed
2018-11-17 00:20:54 +03:00
Ilya Gorbunov e81859b50d Document exceptions that can be thrown from MatchGroupCollection.get(name) 2018-11-16 20:29:38 +03:00
Ilya Gorbunov 8d0d6d1bf3 Do not mutate Matcher in MatchResult.next()
Instead of mutating the matcher create a new one when `next()` is called.
This allows getting named groups from that matcher later.

Add lookbehind in matchSequence test to ensure this change doesn't alter
the existing behavior.

Also fixes #KT-20865
2018-11-16 20:29:38 +03:00
Ilya Gorbunov f76c0568ea Additionally run kotlin-stdlib-jdk8 tests on jdk9 and jdk10/11 if available 2018-11-16 19:46:38 +03:00
Ilya Gorbunov c0a7c5cff4 Refactor: use ArrayDeque instead of Stack in FileTreeWalkIterator
Cleanup modifiers, replace if with when.

#KT-27251 Fixed
2018-11-16 19:40:40 +03:00
Xavi Arias Seguí 14311e77c2 Fix typo in Kotlin doc for contract method
Fix the typo in "Specifies the contact of a function."
2018-11-15 03:58:41 +03:00
Alexey Tsvetkov 5fa627c501 Add flag to enable intra-project parallel tasks
To enable parallel tasks execution within a project,
add 'kotlin.parallel.tasks.in.project=true'
to gradle.properties or local.properties file .

    #KT-28155 fixed
2018-11-14 11:41:43 +03:00
Alexey Tsvetkov 4678a00324 Always clear local state directories for non-incremental build 2018-11-14 11:41:43 +03:00
Alexey Tsvetkov 21289722b7 Move after-compilation cleanup actions to GradleKotlinCompilerWork
Otherwise cleanup actions would run in-parallel or before
compilation when Gradle Workers are used
2018-11-14 11:41:43 +03:00
Alexey Tsvetkov ff81a46233 Pass arguments to GradleKotlinCompilerWork in GradleKotlinCompilerWorkArguments
It's less error prone to add/remove/reorder arguments this way,
because named arguments can be used and the compiler actually
checks that all arguments are passed to GradleKotlinCompilerWorkArguments's
constructor.
2018-11-14 11:41:43 +03:00
Alexey Tsvetkov 349386960e Minor: remove unnecessary return 2018-11-14 11:41:43 +03:00
Alexey Tsvetkov 4fc05f74c3 Wrap null values into serializable optional
Otherwise worker executor fails with NPE
2018-11-14 11:41:43 +03:00
Alexey Tsvetkov a41c2d759a Avoid catching exceptions from workers in GradleKotlinCompilerRunner
Exceptions were catched in `KotlinCompilerRunner.runCompiler`.
When the method from superclass is not used in
`GradleKotlinCompilerRunner`, the superclass does not make much sense
anymore, so I turned it into util object.
2018-11-14 11:41:43 +03:00
Alexey Tsvetkov 37dfe2b608 Use Workers API for NMPP tasks
This change enables parallel execution of compile tasks in NMPP projects
within a subproject.

    #KT-28155 In Progress
2018-11-14 11:41:43 +03:00
Alexey Tsvetkov ba5795519b Minor: move compile iteration result to daemon common
The class is used on both server and client, but it was defined in
server module.
Gradle plugin worked, because all classes are present in kotlin compiler
embeddable, but the code was red in IDE (which is correct because
Gradle plugin does not depend on daemon server module).
2018-11-14 11:41:43 +03:00
Alexey Tsvetkov 22192e7008 Stop using experimental coroutines in kotlin-scripting-jvm-host tests 2018-11-13 21:54:36 +03:00
Mikhail Zarechenskiy 45541296ad Stop building separate jar with unsigned types
Now this is not needed as unsigned types were merged into stdlib
2018-11-13 15:47:06 +03:00
Mikhail Zarechenskiy ed2b9172da Support unsigned integers in kotlinx-metadata-jvm
#KT-25371 Fixed
2018-11-13 01:29:39 +03:00
Sergey Igushkin 308eafe0e1 (test data) Revert removal of coroutines opt-in from a test
This test checks the coroutines opt-in, so it should stay there.

Revert the change made in a64a76d5
2018-11-12 17:26:07 +03:00
Ilya Chernikov 9c51f521a9 Add embeddable version of the jvm scripting host
#KT-27382 fixed
2018-11-09 15:57:09 +03:00
Ilya Gorbunov 5f4e8bf4fb Correct abstract mutable collections declarations in kotlin-stdlib-common
Add SinceKotlin(1.3) to the new and substantially changed common declarations

#KT-28091
2018-11-09 13:39:44 +03:00
Ilya Gorbunov 4f2ec3533a Remove inline modifier from expect functions without lambda or reified types
This gives more flexibility when providing actuals for them.
2018-11-09 13:39:07 +03:00
Ilya Gorbunov 23ead5e430 Remove extensive testing of the discontinued jre7/8 artifacts 2018-11-09 04:00:26 +03:00
Ilya Gorbunov b026b9eb22 Remove +ReleaseCoroutines explicit feature enabling
It's enabled by default in Kotlin 1.3
2018-11-09 04:00:26 +03:00
Ilya Gorbunov a64a76d5fc Remove experimental coroutines opt-in from build scripts
It has no effect in Kotlin 1.3

Only enable coroutines if '-ReleaseCoroutines' is used
2018-11-09 04:00:26 +03:00
Svyatoslav Kuzmich 370b04df35 [JS IR BE] Inline classes lowering 2018-11-08 15:00:30 +03:00
Ilya Matveev 798b4a8164 Update Kotlin/Native: 1.0.2 2018-11-08 11:06:49 +03:00
Alexander Udalov 61d3b6ee1f Restore heuristic to compute inner class names in ClassifierResolutionContext
This commit restores the heuristic removed in 9df02b2366, but only
enables it in case the class wasn't found with the name mapped initially
according to the InnerClasses attribute values. This helps to support
class files which do not have the InnerClasses attribute for all nested
referenced classes, such as those generated by Groovy.

Note that in theory it's still possible for this code to behave
incorrectly, for example a reference to a class `C` nested in a
_top-level_ class named `A$B` will not be loaded by this code correctly.
This is a lower-priority issue and it will need to be fixed later.

 #KT-27874 Fixed
2018-11-07 18:12:58 +01:00
Bradley Smith 4b8f8604f2 Change kotlinSourceSets -> allKotlinSourceSets
This ensures that transitive SourceSets are also merged and included in
the model.
2018-11-06 20:19:02 +03:00
Bradley Smith f426fda18b Remove unused inport 2018-11-06 20:19:02 +03:00
Bradley Smith 1e37785de1 Populate the SourceSets with more relevant information. 2018-11-06 20:19:02 +03:00
Bradley Smith f3482d1251 Register KotlinModelBuilder for kotlin-android plugin 2018-11-06 20:19:02 +03:00
Karen Schwane d88fd8aa6f KT-20357 Add samples for maxBy and minBy 2018-11-04 22:34:16 +03:00
Alexey Tsvetkov aae24c993d Revert usage of lazy task API
We want to be compatible with Gradle 4.0+
where the API is not available.
Use eager task creation API for now.
Lazy API support should be added later with
proper Gradle versions checks.
2018-11-03 00:59:27 +03:00
Ivan Gavrilovic c42b3b8ff8 Do not resolve configuration for scripting Gradle plugin
Avoid resolving kotlinScriptDef configurations during
configuration phase. Also, make task creation lazy.

   #KT-27160 fixed
2018-11-03 00:59:27 +03:00
Ilya Gorbunov 332b843301 kotlin-bom: Add distributionManagement and signing profile
Since kotlin-bom intentionally has no parent these settings have to be duplicated
same as in the root kotlin-project pom.

#KT-18398
2018-11-02 19:04:10 +03:00
Ilya Gorbunov 11519e40cc Add scripting dependencies to kotlin-bom
#KT-18398
2018-11-02 18:52:40 +03:00
Ilya Gorbunov 119385839a Provide bom (bill-of-materials) pom for kotlin libraries
#KT-18398 Fixed
2018-11-02 18:52:40 +03:00
Alexey Tsvetkov d68cac314a Do not fail builds during lint checks in Gradle tests
Tests fail with unrelevant checks like recommended
target SDK for play store
2018-11-01 19:35:20 +03:00
Ilya Gorbunov cad8b81dcb Update selenium version to 2.53.1
This change is required to fix failing tests of browser-example and browser-example-with-library.
Tests began to fail recently because `htmlunit-driver` had a dependency on `selenium-support`
constrained to [2.53.0,4.0.0) range. Apparently the recently released 3.141.0 version of that artifact
became incompatible with the rest of selenium 2.52.

This fix advances the version of selenium to 2.53.1. This version has a dependency on
`selenium-support:2.53.1`. Since it goes earlier in dependency tree and satisfies the range constraint,
it is used for `htmlunit-driver` too.
2018-11-01 17:52:48 +03:00
Ilya Gorbunov 2b699f8f07 Add a test for CharSequence/String.regionMatches 2018-11-01 17:51:24 +03:00
Ilya Gorbunov e49789f819 Build java9 modular artifacts under 'modular' classifier
Provide additional modular artifacts as a workaround for KT-21266

Update module-info declarations:
  - add new packages
  - add exports and opens for internal PlatformImplementations
  - remove exports of kotlin.coroutines.experimental.*

#KT-27919 Fixed
2018-11-01 02:27:49 +03:00
Alexey Tsvetkov f139ec72cd Convert kotlin-gradle-plugin-integration-tests build script: step 2 2018-11-01 00:59:07 +03:00
Alexey Tsvetkov 45ac6ba251 Convert kotlin-gradle-plugin-integration-tests build script: step 1 2018-11-01 00:59:07 +03:00
Alexey Tsvetkov bc65e6e66a Convert kotlin-gradle-plugin-model build script: step 2 2018-11-01 00:59:07 +03:00
Alexey Tsvetkov 9c7bd610c5 Convert kotlin-gradle-plugin-model build script: step 1 2018-11-01 00:59:07 +03:00
Alexey Tsvetkov e0e3d90774 Convert kotlin-gradle-plugin-api build script: step 2 2018-11-01 00:59:07 +03:00
Alexey Tsvetkov 0ab326e4ba Convert kotlin-gradle-plugin-api build script: step 1 2018-11-01 00:59:07 +03:00