Commit Graph

6004 Commits

Author SHA1 Message Date
Sergey Igushkin c292380aff Improve Kotlin/Native disabled targets warning, KT-29693
* Group all disabled targets from all subprojects in a single warning
* Make the warning optional, suggest disabling it with a Gradle property

Issue #KT-29693 Fixed
2019-07-09 16:01:18 +03:00
Roman Artemev d4fb76c1da [JS IR BE] Fix overriding property of Throwable 2019-07-09 10:40:01 +03:00
Ilya Gorbunov 7573fcde53 Demote new experimental capitalize overloads in overload resolution
Revert "Fix method reference ambiguity in test after introducing 'capitalize' overload"
This reverts commit fe9bd9ee
2019-07-09 03:39:25 +03:00
Ilya Gorbunov 686bcb830e Bit query and bit rotation functions for UInt, ULong, UShort, UByte
#KT-12749
2019-07-08 19:09:32 +03:00
Ilya Gorbunov 39bdf34b9f Use common implementation of fastLog2 based on countLeadingZeroBits 2019-07-08 19:09:32 +03:00
Ilya Gorbunov f8724654a1 Bit query and bit rotation functions for Int, Long, Short, Byte
#KT-12749
2019-07-08 19:09:32 +03:00
Ilya Gorbunov 32fc131d62 Rename jvm actuals from Numbers to NumbersJVM
Rename multifile facade to from MathKt to NumbersKt to avoid confusion
with kotlin.math.MathKt
2019-07-08 19:09:32 +03:00
Ilya Chernikov a96a938f87 Fix creating of the script definition from legacy template
adding classpath needed to load template and related class to the
appropriate host configuration
fixes tests
2019-07-08 13:20:06 +02:00
Ivan Gavrilovic f60bf5cb97 KT-31127: register only generated Java sources to AGP
When adding generated Java sources to AGP using Variant API,
add only Java sources. This was already done in
a6ae4494167c9d4cca23995457c59fb2daedad39 for Java projects, and this
commit fixes the same issue for Android projects.

Test: Kapt3Android33IT.testKotlinProcessorUsingFiler
2019-07-08 16:25:18 +09:00
Svyatoslav Kuzmich 675f01ee80 [JS IR BE] Set Throwable subtype name in extendThrowable function 2019-07-05 19:31:23 +03:00
Ilya Chernikov cfceeb1e8c Implement direct bindings to script properties mapping in the JSR-223 implementation
fix infrastructure and codegen parts
2019-07-05 17:02:10 +02:00
Ilya Chernikov 4940f64265 Refactor scripting infrastructure - convert usages to the new entities 2019-07-05 17:02:10 +02:00
Ilya Chernikov 80ada5113e Fix flaky test 2019-07-05 17:02:10 +02:00
Svyatoslav Kuzmich a2625c7bc8 [JS IR BE] Don't render null messages in Throwable
Set message property to 'undefined' to make Error.prototype.toString
skip it
2019-07-04 18:33:23 +03:00
Svyatoslav Kuzmich 94aebd0101 [JS IR BE] Proper support for String and Any constructors
Remove workarounds from codegen
2019-07-04 17:03:47 +03:00
Svyatoslav Kuzmich 918d470e1b [JS IR BE] Simplify throwable lowering.
- Make kotlin.Throwable class extenral
- Add runtime function 'extendThrowable' to use instead of delegating
  constructors to Throwable
2019-07-03 20:37:48 +03:00
Ilya Matveev ba64600ee5 Gradle: Make K/N properties uniform with other Kotlin properties
Names of project properties used by K/N (e.g.
org.jetbrains.kotlin.native.home) are not uniform
with other kotlin properties (e.g. kotlin.coroutines).

This patch renames these properties by dropping the
'org.jetbrains' prefix and adds corresponding
deprecation warnings.

Issue #KT-32302 Fixed
2019-07-02 19:46:50 +07:00
Ilya Matveev fd1fc7d28a Gradle: Support K/N restricted distribution
Restricted distribution is a K/N distribution built for MacOS only
alongside with a regular distribution and containing no platform
libraries for MacOS. This commit allows switching between
distribution types using a special project property.

Issue #KT-32301 Fixed
2019-07-02 19:46:49 +07:00
Ilya Matveev 35d7fff035 Gradle: Fix input annotation for the Webpack task 2019-07-02 19:46:48 +07:00
Anton Bannykh f8035096ea JS: lock tape version to avoid kotlin.test + tape integration test failure 2019-07-02 15:14:07 +03:00
Svyatoslav Kuzmich 69962cbf8c [JS IR BE] Add JsExport annotations 2019-07-01 18:55:41 +03:00
Sergey Rostov bb0f467f63 Gradle, JS: don't project.getTasksByName inside task realization callback
Or project evaluation would be called

#KT-32072 Fixed
2019-06-28 15:28:21 +03:00
Vyacheslav Gerasimov 4531d2a7b4 Build: restore service files relocation for kotlin-reflect 2019-06-27 19:51:58 +03:00
Vyacheslav Gerasimov bdcf674c79 Build: Remove dependency on missing task :kotlin-main-kts:dist 2019-06-27 18:33:51 +03:00
Sergey Rostov f35680e823 Build: cleanup stdlib/jps-build/build.gradle.kts 2019-06-27 17:56:52 +03:00
Sergey Rostov 6647d8fd93 Build: remove mergeServiceFiles from reflectShadowJar 2019-06-27 17:56:52 +03:00
Vyacheslav Gerasimov 2d6a3cb2c8 Build: Introduce flag for disabling jar post processing
proguard, relocation, etc.
2019-06-27 17:56:52 +03:00
Vyacheslav Gerasimov ca37cb0028 Build: Remove jps hacks from kotlin-main-kts-test 2019-06-27 17:56:50 +03:00
Vyacheslav Gerasimov 72be81ba46 Build: Add JPS artifact for dist 2019-06-27 17:56:49 +03:00
Vyacheslav Gerasimov 55b1ee9a17 Build: Fix premature configuration resolution in kotlin-test-js-it 2019-06-27 17:56:48 +03:00
Vyacheslav Gerasimov db3b01d2d4 Build: Centralize compiler dist build logic in :kotlin-compiler project 2019-06-27 17:56:48 +03:00
Ilya Gorbunov d58c8c68d5 Fix replacement for deprecated Math.pow #KT-32083 2019-06-27 05:22:25 +03:00
AJ Alt ed96197d6b Always use LF line endings in generated stdlib code
The code generation uses a mixture of literal `\n` characters and `appendln`. The latter insert `\r\n` on Windows by default, causing generated files to contain a mixture of line endings.

This commit sets the `line.separator` system property for the generator to `\n` so that `appendln` will never insert `\r` characters. As an additional measure, `.gitattributes` files were added to checkout generated stdlib files always with LF line endings.
2019-06-27 03:02:10 +03:00
Sergey Igushkin 685f56e179 Fix slow AndroidSubPlugin#getCommonResDirectories, KT-29538
Replace a functionally-built file collection that filters files against
multiple original file collections upon each evaluation with a
lazy file sets intersection that is evaluated only once.

Issue #KT-29538 Fixed
2019-06-26 16:18:08 +03:00
Ilya Chernikov 6ea1d92841 Implement main-kts test with command-line compiler 2019-06-26 13:01:40 +02:00
Nikolay Krasko aa079376e7 Fix signing artifacts (KT-32192)
Broken in f1e3e26e6cd6e38b473ffe1a23b19b68ebb2d11f.

----
> Task :kotlin-reflect:signArchives FAILED
Build time for tasks:
Compiling kotlin: 1.44s (12.33% of total time)
Processing jars: 4.28s (36.75% of total time)
Uncategorized: 5.39s (46.26% of total time)

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':kotlin-reflect:signArchives'.
> Duplicate key Signature kotlin-reflect:jar.asc:asc:
---

 #KT-32192 Fixed
2019-06-25 11:46:17 +03:00
Roman Artemev 97203973ac [JS IR BE] Fix coroutine context 2019-06-24 20:14:19 +03:00
Svyatoslav Kuzmich 0b19a4a32b [JS IR BE] Initial version of member namer 2019-06-21 17:02:01 +03:00
Ilya Matveev 65b7da9d0a Gradle: Add a shortcut DSL method for linuxArm64 target
Issue #KT-32034 Fixed
2019-06-20 18:05:25 +07:00
Ilya Gorbunov eae1813ead stdlib-js(-v1/-ir): rename source files to avoid duplicates in sources
Prohibit having duplicates in sources jar and rename those source files,
that clash with the same named source files coming from
the common js source root.

Relates to KT-31965
2019-06-18 20:03:04 +03:00
Ilya Gorbunov 5bafba6bff stdlib-js-ir: preserve source directory structure of common js sources 2019-06-18 19:58:47 +03:00
Ilya Gorbunov ff9d2744ce Provide conversions between Kotlin and Java time durations 2019-06-18 19:49:50 +03:00
Ilya Gorbunov d7252548fc Add symmetric number * duration operators 2019-06-18 19:49:50 +03:00
Ilya Gorbunov a2b1c537af Change Duration.toString scientific exponent formatting
- use 'e+' for positive exponents in scientific format
2019-06-18 19:49:35 +03:00
Ilya Gorbunov a5b7c270ae Change Duration.toString(unit, decimals) formatting
- switch to scientific notation when value is too big (greater than 1e14)
- allow at most 12 decimals, larger values are coerced to 12
- use scientific format with exactly two decimals in mantissa in JVM
2019-06-18 19:49:35 +03:00
Sergey Rostov 7d7f4a8783 Gradle, JS: fix TCServiceMessageOutputStreamHandlerTest on windows 2019-06-18 15:11:08 +03:00
ilgonmic 024636f704 Gradle, JS, webpack: run js directly (don't use bin script)
On windows, bin script wrapped with bashsh and cmd shell, so node failed
 to run it

#KT-31985 Fixed
2019-06-18 10:50:41 +03:00
ilgonmic a4427773a5 Gradle, JS, webpack: escape strings inside webpack config
#KT-31985
2019-06-18 10:50:40 +03:00
Ilya Gorbunov 58b04c7974 Add remaining docs for Duration members, runnable samples for toString 2019-06-18 04:02:35 +03:00
Ilya Gorbunov ffd9d8c71d Remove unneeded buildString from Duration.toString 2019-06-18 04:02:35 +03:00