Commit Graph

1542 Commits

Author SHA1 Message Date
Alexey Tsvetkov d303bdaa0e Minor: add missing import 2016-12-19 22:55:23 +03:00
Alexey Tsvetkov 8228d5828e Fix multiproject Gradle IC with daemon 2016-12-19 22:55:22 +03:00
Alexey Tsvetkov 51a8f6ee4f Implement server side IC 2016-12-19 22:55:21 +03:00
Alexey Tsvetkov 9654607f42 Refactoring: pass MessageCollector, OutputItemsCollector in CompilerEnvironment 2016-12-19 22:55:20 +03:00
Alexey Tsvetkov 3f91df4c84 Minor: move GradleCompilerEnvironment to separate file 2016-12-19 22:55:20 +03:00
Alexey Tsvetkov c1812d7d92 Move IC tests to compiler
Fixing IC after moving it from Gradle to the compiler in commit f40a3eff20
2016-12-19 22:55:19 +03:00
Alexey Tsvetkov f40a3eff20 Move IC from Gradle to compiler
Reasons for moving:
1. Integration with Kotlin daemon for Gradle.
Gradle bundles Kotlin compiler (kotlin-compiler-embeddable) since Gradle 3.2.
There is no plugin isolation in Gradle, so strange compilation errors/exceptions may happen.
We decided to fix this problem by compiling out-of-process using Kotlin daemon.

Reasons for moving IC to the compiler:
* Better isolation from Gradle process.
* Incremental compilation logic is not scattered across two process and multiple modules.
* Makes it possible to implement standalone CLI IC
2016-12-19 22:46:12 +03:00
Alexey Tsvetkov 377912f42d Replace Gradle logger with ICReporter 2016-12-19 22:46:12 +03:00
Alexey Tsvetkov 599f11b431 Refactoring: extract interface AnnotationFileUpdater 2016-12-19 22:46:12 +03:00
Alexey Tsvetkov fdd3bc31f1 Rename: IncReporter->ICReporter 2016-12-19 22:46:12 +03:00
Alexey Tsvetkov 4fdca24db4 Remove source annotations removing (not needed with KAPT3) 2016-12-19 22:46:12 +03:00
Alexey Tsvetkov 190c038ad8 Minor: log compiler arguments 2016-12-19 22:46:12 +03:00
Alexey Tsvetkov c7c2a93d1f Use daemon when compiling Kotlin to JS 2016-12-19 22:46:12 +03:00
Alexey Tsvetkov 25816b2ccf Use ProcessLauncher from native platform for out-of-process compilation 2016-12-19 22:46:12 +03:00
Alexey Tsvetkov 5082e8f236 Add a way to customize compiler file in build.gradle 2016-12-19 22:46:12 +03:00
Alexey Tsvetkov 75133bdfb9 Implement fallback strategies 2016-12-19 22:46:12 +03:00
Alexey Tsvetkov d636803d2f Run compiler via Kotlin daemon in Gradle plugin 2016-12-19 22:46:12 +03:00
Alexey Tsvetkov 1f21a0ec90 Add compiler daemon client and runner to maven build 2016-12-19 22:46:12 +03:00
Yan Zhulanow 568523b065 Kapt3: Set correct compiler options when the annotation processing classpath is empty (KT-15146). Disable annotation processing in Javac task a bit earlier 2016-12-19 21:18:17 +03:00
Ilya Gorbunov 2209631f1a Add SinceKotlin to new coerceIn method. 2016-12-19 18:36:52 +03:00
Ilya Gorbunov 10f8e70322 Rename ClosedComparableRange to ClosedFloatingPointRange 2016-12-19 18:36:52 +03:00
Alexey Tsvetkov 9fc3d0838e Fix references from test to main in Gradle JS plugin with default output file 2016-12-17 21:46:13 +03:00
Alexey Tsvetkov b14a0d543f Add references from test to main in multiplatform test project 2016-12-17 21:32:36 +03:00
Alexey Tsvetkov 6974cdf167 Avoid adding common sources to platform source set
If common sources are added to a platform source set,
then IDE sees common src dir as a source root in a platform project,
which is incorrect.
2016-12-17 21:32:32 +03:00
Alexey Tsvetkov c6586f2ac8 Fix mapping kotlin properties in JS plugin 2016-12-17 21:32:28 +03:00
Denis Zharkov 5ec62108ee Rename RestrictsSuspendExtensions -> RestrictsSuspension 2016-12-16 18:56:30 +03:00
Ilya Gorbunov b2ccea87f3 Temporary workaround to generate functions with optional parameters with bodies in common code. 2016-12-16 04:36:30 +03:00
Ilya Gorbunov b72e5c038d Generate common headers to common/src/generated 2016-12-16 04:36:29 +03:00
Ilya Gorbunov 75992173b6 Unify Array.plus and plusElements function templates between JVM and JS. 2016-12-16 04:36:21 +03:00
Ilya Gorbunov 202cd81134 Unify Array.copyOf and copyOfRange function templates between JVM and JS. 2016-12-16 04:36:20 +03:00
Ilya Gorbunov 572a63f0e2 Unify Array.sort and sortWith function templates between JVM and JS.
Introduce new inline-only overload Array<out T: Comparable<T>>.sort().
2016-12-16 04:36:18 +03:00
Ilya Gorbunov e890cb137f Unify MutableList.reverse function template between JVM and JS 2016-12-16 04:36:16 +03:00
Ilya Gorbunov 085f476d22 Unify content[ToString, Equals, HashCode] function templates between JVM and JS 2016-12-16 04:36:14 +03:00
Ilya Gorbunov f3df648f4a Unify toTypedArray and asList templates between JVM and JS 2016-12-16 04:36:12 +03:00
Ilya Gorbunov 3d7e6e1996 Refactor stdlib generator: introduce platform-specialized properties.
Use Kotlin 1.1-M03 to utilize new language features.
2016-12-16 04:31:07 +03:00
Ilya Gorbunov c097f326fb Generate common headers of stdlib functions. What constitutes the header is yet to be decided. 2016-12-16 04:31:07 +03:00
Ilya Gorbunov 6ea1cde449 Generate additional sources for JS instead of copying them from JVM 2016-12-16 04:31:07 +03:00
Ilya Gorbunov bc2d7dda2c kotlin-stdlib-generator: Allow to generate top-level functions by specifying empty custom receiver. Allow to parametrize primitive specialization bodies with the type of primitive. 2016-12-16 04:31:07 +03:00
Ilya Gorbunov 236333e475 Update public API dump for coroutines rev. 2 2016-12-16 04:28:32 +03:00
Alexey Tsvetkov 3af0840512 Test coroutines setting in Gradle plugin 2016-12-15 23:58:32 +03:00
Alexey Tsvetkov 3e1edf006f Set coroutines setting for JS in Gradle plugin 2016-12-15 23:58:31 +03:00
Mikhail Zarechenskiy c0a3d3568a Add test on using kotlin.coroutines property in gradle 2016-12-15 23:58:30 +03:00
Mikhail Zarechenskiy 6697c902fc Attempt to add property go kotlin gradle plugin 2016-12-15 23:58:29 +03:00
Dmitry Petrov 9fd1ac72a9 Purge remaining traces of @AllowSuspendExtensions. 2016-12-15 23:58:19 +03:00
Yan Zhulanow f3d001077b Move Maven subplugin test to kotlin-maven-plugin-test module 2016-12-15 18:36:17 +03:00
Alexey Tsvetkov c31f91c28a Introduce Gradle multiplatform plugin 2016-12-15 16:43:35 +03:00
Alexey Tsvetkov 34b740e2f7 Minor: add debug test util 2016-12-15 16:43:35 +03:00
Alexey Tsvetkov 93fa27a195 Provide default output JS file in Kotlin Gradle plugin 2016-12-15 16:43:35 +03:00
Alexey Tsvetkov 232b40eb36 Extract throwGradleExceptionIfError 2016-12-15 16:43:35 +03:00
Alexey Tsvetkov 5a846f94fc Rename: SourceRoots.ForJs->KotlinOnly 2016-12-15 16:43:35 +03:00