Commit Graph

3443 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
Ilya Gorbunov f8724654a1 Bit query and bit rotation functions for Int, Long, Short, Byte
#KT-12749
2019-07-08 19:09:32 +03: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
Ilya Chernikov 80ada5113e Fix flaky test 2019-07-05 17:02:10 +02: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
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 bdcf674c79 Build: Remove dependency on missing task :kotlin-main-kts:dist 2019-06-27 18:33:51 +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 db3b01d2d4 Build: Centralize compiler dist build logic in :kotlin-compiler project 2019-06-27 17:56:48 +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
Ilya Matveev 65b7da9d0a Gradle: Add a shortcut DSL method for linuxArm64 target
Issue #KT-32034 Fixed
2019-06-20 18:05:25 +07: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 155dfeaf35 Generate kotlin.time package public API dump 2019-06-18 04:02:35 +03:00
Sergey Igushkin 41d8c536c3 Update Gradle module metadata warnings: don't warn when it's enabled
Also add a suggestion to enable the module metadata publishing in
Gradle 5.3+ projects that consume Gradle module metadata by default but
don't produce it unless explicitly enabled.

Issue #KT-31023 Fixed
2019-06-17 17:29:41 +03:00
Roman Artemev 8015152bfc [JS IR BE] Support JS IR in maven plugin 2019-06-14 18:41:00 +03:00
Vyacheslav Gerasimov 52303d65ab Build: Fix test runtime for kotlinp tests 2019-06-14 18:06:04 +03:00
Vyacheslav Gerasimov c4e33728a8 Build: Fix test runtime for gradle plugin tests 2019-06-14 00:44:36 +03:00
Ilya Gorbunov 1960161e78 Exclude inline reified functions and properties from public API
Public inline reified functions are getting into public API dump after
changing their visibility generation strategy (see KT-18563)
from always private to public synthetic. However, they still do not
constitute public binary API, since they can be removed without breaking
compatibility with an already compiled code.
2019-06-13 21:23:21 +03:00
Vyacheslav Gerasimov 5a39c637c2 Build: Fix intellij dependency leak from ir tree module 2019-06-13 21:03:55 +03:00
Alexander Udalov a680067ac3 Use new kotlinx-metadata API in binary-compatibility-validator 2019-06-13 18:00:42 +02:00
Alexander Udalov 5ee34503c0 Introduce new API for kotlinx-metadata-jvm
Kdocs are provided in a subsequent commit

 #KT-26602 Fixed
2019-06-13 18:00:33 +02:00
Sergey Rostov b2607b47e2 Gradle, tests runner, output stream handler: don't treat flush as new line
#KT-31931 Fixed
2019-06-12 17:03:22 +03:00
Sergey Rostov d0e3ab1beb Gradle, tests runner: don't use separate thread to parse process output
Or --scan will fail (see KT-31891 for more details).
To do it in same thread we should parse output on output stream calls.
TCServiceMessageOutputStreamHandler will do that.

Also, all new lines now preserved, so TCServiceMessagesClient should
ignore new lines after messages. New ignoreLineEndingAfterMessage setting
will do that.

#KT-31891 Fixed
2019-06-11 09:18:27 +03:00
Sergey Rostov 84b87a22e6 Gradle, tests runner: use OperationIdentifier object as id (not long)
#KT-31448 Fixed
#KT-30691 Fixed
2019-06-11 09:18:26 +03:00
Sergey Rostov 560f34bde5 Gradle, JS, webpack: add dependency to compile classpath 2019-06-08 20:36:09 +03:00
Sergey Rostov 354bf1f308 Gradle, JS, run: don't add dependency from project run task
As js webpack-dev-server will not finish
2019-06-08 20:36:09 +03:00
Sergey Rostov 45d4a9d67c Gradle, js: rename objects to avoid clashing with moowork nodejs plugin
#KT-31834 Fixed
2019-06-08 20:36:09 +03:00
Sergey Rostov b5515a31eb Gradle, js, karma: useConfigDirectory DSL
#KT-31686 Fixed
2019-06-08 20:36:08 +03:00
Vyacheslav Gerasimov 5bde9720b7 Build: Fix dependencies on :kotlin-compiler project
Dependencies on :kotlin-compiler should never be used in configurations
which are imported transitively because ide fails to import it as
project dependency. When :kotlin-compiler dependency is imported as
kotlin-compiler.jar dependency ide re-indexes it on every change. This
behaviour is super annoying.

 #KT-31120 Fixed
2019-06-08 19:36:28 +03:00
Ilya Chernikov e542c9ea84 Refactor script definitions and resolving/refining infrastructure:
- implement wrappers to wrap old and new API providers and resolvers
- make old API deprecated (with error where possible)
- drop old internal classes related to the old API
- refactor usages accordingly
- fix and add missing features to the scripting API where necessary
2019-06-06 17:21:00 +02:00
Sergey Rostov 8995d89599 Gradle, js, karma: don't run karma if no browsers configured
#KT-31662 Fixed
2019-06-06 09:15:40 +03:00
Sergey Rostov 97fc3fe989 Gradle, js, karma: use ^4.0.0-rc.6 to use webpack 3, require webpack
#KT-31564 Fixed
2019-06-06 09:15:40 +03:00
Sergey Rostov eab577001b Gradle, js, npm simple linker: fix creating junction on windows 2019-06-06 09:15:40 +03:00
Sergey Rostov 96fc06c7fb Gradle, js, tests: use compilation runtime classpath as input
#KT-31814 Fixed
2019-06-06 09:15:39 +03:00
Ilya Matveev f32d48c66d Gradle, tests: Fix native interop test for Win x86 2019-06-06 12:53:02 +07:00
Ilya Matveev 2ab0760e35 Gradle, native: Fix creating test binaries for non-host platforms
Issue #KT-31725 fixed
2019-06-06 12:53:01 +07:00
Ivan Gavrilovic 7a2332fe36 KT-31714: Close files after analysis in incremental KAPT
Artifact transform used to analyze classpath was not closing files, which
caused java.nio.file.FileSystemException. This commit fixes that, and all
input streams are closed after use.

Fixes: KT-31714
2019-06-05 18:19:50 +09:00
Ivan Gavrilovic 695f202e46 KT-31127: add only generated Java sources to JavaCompile inputs
This commit changes how generated sources are added to the Gradle JavaCompile
task. Previously, directory was added to sources which caused issues with
annotation processors that only generate Kotlin sources. I.e. JavaCompile task
was executed but no java sources existed.

Now, only generated Java sources are added to the JavaCompile task. This
means that if only Kotlin sources are generated JavaCompile task will be
skipped.

Fixes: KT-31127
Test: Kapt3IT.testKotlinProcessorUsingFiler
2019-06-05 18:19:50 +09:00
Svyatoslav Kuzmich cd651be461 [JS IR BE] Migrate JS BE to common klib utils 2019-06-05 11:15:45 +03:00
Sergey Rostov 1c0519b0a2 Gradle, js, npm: fix resolving transitive npm dependencies using yarn.lock
- already visited transitive npm dependencies should be stored in parent dependencies
- child NpmDependency should search resolved project data in parent NpmDependencies
2019-06-04 19:32:10 +03:00
Sergey Rostov 465a47a194 Gradle, js, npm: fix idea gradle sync for multiproject builds
npm resolver ProjectData stored per project (not in root project)
2019-06-04 19:32:10 +03:00
Sergey Rostov b5080bda75 Gradle, js, npm: fix reading package.json files
#KT-31788 Fixed
2019-06-04 19:32:10 +03:00
Sergey Rostov 32a0bb9f0e Gradle, js, npm: fix npm aggregated configuration attributes
#KT-31788 Fixed
2019-06-04 19:32:10 +03:00