Commit Graph

4427 Commits

Author SHA1 Message Date
Vyacheslav Gerasimov 01db78d776 Build: Introduce Project extension properties for source sets 2018-06-22 21:42:30 +03:00
Leonid Startsev bef97d85af Respect version string in SubpluginArtifact to load compiler plugins
with versions different from compiler one
2018-06-22 21:13:34 +03:00
Alexey Tsvetkov 2065f8e6fe Fix inter-project IC for android->non-android dependency
#KT-24832 fixed
2018-06-22 19:15:45 +03:00
Alexey Tsvetkov 9071a70a44 Avoid iterating jar inputs in inspectClassesForKotlinIC task
Jar's inputs can contain zipTrees in case of fat jars,
which can cause slow build
(Gradle unpacks them into temporary dir; that can be slow)

    #KT-24956 fixed
2018-06-22 19:15:45 +03:00
Alexey Tsvetkov e38cafb1a2 Don't create build directory for task in getter
Since the property is public, it can be invoked from outside,
possibly trough other properties.
This can lead to unwanted side effects: we can create taskBuildDirectory,
because some other task reads the property in parallel with 'clean' task
in current project.
That's exactly what happened when we referenced the property from
'GradleCompilerRunner#buildModulesInfo'.

    #KT-24938 fixed
2018-06-22 19:15:45 +03:00
Alexey Tsvetkov 03839f6861 Test: speed up integration test by not building release variant 2018-06-22 19:15:45 +03:00
Alexey Tsvetkov 433e742d73 Fix location mapping test on Windows 2018-06-22 19:15:45 +03:00
Ilya Gorbunov 6d027bbbfc Remove state from parts of multifile classes
Split COROUTINE_SUSPENDED marker to expect and actual because Kotlin/JS backend
expects it to be property without getter.

Update EXPECTED_REACHABLE_NODES in JS test data.

#KT-24986 Fixed
2018-06-22 11:35:05 +03:00
Anton Bannykh 6df9919eba JS IR: add DefaultContructorMarker to the runtime 2018-06-21 13:27:17 +03:00
Alexey Tsvetkov 3fb26d92df Filter out non-existent java source roots in kapt tasks
#KT-24716 fixed
2018-06-20 23:58:37 +03:00
Roman Artemev 02628e8de3 [JS IR BE] Support exceptions in IR BE runtime 2018-06-19 17:09:24 +03:00
Alexander Udalov f6169337dd Use kotlinx-metadata-jvm to relocate .kotlin_module files in kotlin-reflect
Instead of custom logic which used compiler internals and was very
brittle
2018-06-18 12:35:06 +02:00
Alexander Udalov a9974a522e Use correct class loader in kotlinx-metadata to load MetadataExtensions implementations
By default, ServiceLoader.load uses thread context class loader, which
can differ from the MetadataExtensions' class loader (which also loads
JvmMetadataExtensions, since they're in the same .jar) in many cases,
for example when used in annotation processing

 #KT-24881 Fixed
2018-06-15 19:35:39 +02:00
Roman Artemev 17d71f1e46 [JS IR BE] Implement type check
* IrTypeOperator lowering
 * runtime support
 * refactoring
2018-06-14 18:40:06 +03:00
Alexander Udalov 50eda3b8a0 Make metadata writers' properties protected
These properties are only supposed to be used from Writer classes in
KotlinClassMetadata
2018-06-14 17:19:08 +02:00
Alexander Udalov fec2c14ea5 Support local delegated properties in kotlinx-metadata-jvm 2018-06-14 17:19:08 +02:00
Alexander Udalov b00f765255 Pass whole ReadContext/WriteContext to kotlinx-metadata extensions 2018-06-14 17:19:08 +02:00
Vyacheslav Gerasimov 992a31af88 Build: introduce javaPluginConvention extension on project
`ExtensionAware.the<T>()` introduced in gradle 4.7 made existing calls `the<JavaPluginConvention>()` invalid (on wrong receiver)
2018-06-13 19:43:03 +03:00
Alexander Gorshenev 6d7dd58f70 Separated idl2k frontend and backend invocations. 2018-06-13 15:45:54 +03:00
Yan Zhulanow ed43cb57e3 PrePush: Add a pre-push warning before committing to locked branches 2018-06-08 19:37:21 +03:00
Yan Zhulanow bf10c1162a Kapt: Fix Gradle input/output verification 2018-06-08 19:37:21 +03:00
Yan Zhulanow 8645be3ace Kapt: Remove the remaining kapt1-related code in Gradle plugin 2018-06-08 19:37:20 +03:00
Yan Zhulanow 64ea16fdfc Kapt: Allow running kapt using Workers API in Gradle 2018-06-08 19:37:19 +03:00
Yan Zhulanow 2bc45e0484 Kapt: Extract annotation processing running logic from the compiler plugin 2018-06-08 19:37:19 +03:00
Yan Zhulanow ab611a20c5 Kapt: Do now show a warning for APs from 'annotationProcessor' configuration also declared in 'kapt' configuration (#KT-23898) 2018-06-08 19:27:00 +03:00
Yan Zhulanow 614003ad70 Android Extensions: Allow to disable specific features of Android Extensions (#KT-23244) 2018-06-08 19:26:59 +03:00
Yan Zhulanow a70707b72b Android Extensions: Allow to access library project resources in Gradle setup (#KT-22430) 2018-06-08 19:26:59 +03:00
Yan Zhulanow 5eedbf4177 G2K: Rewrite AndroidGradleWrapper in Kotlin 2018-06-08 19:26:59 +03:00
Yan Zhulanow 9aa02c7ae4 G2K: Move AndroidGradleWrapper to the Kotlin source set, rename to .kt 2018-06-08 19:26:59 +03:00
Ilya Gorbunov 1ee37b1772 Update ReadMe for stdlib-js 2018-06-07 14:39:48 +03:00
Alexey Tsvetkov 451c732b8f Test: speed up tests by minimizing number of tasks to run
E.g. avoid building release variants for Android
(extremely slow due to proguard minification, optimization)
2018-06-06 17:54:51 +03:00
Alexey Tsvetkov 0383584f33 Test: rename file to match class name 2018-06-06 17:54:51 +03:00
Alexey Tsvetkov 0c12b0e5fb Test: refactor Gradle daemon memory test
Currently the test makes more harm than use:
* It is too slow: two executions (with different Gradle versions)
take 5 minute on CI.
* It is unreliable: the test fails on CI for months
with insignificant violation of the memory growth limit.

After this change:
* the memory growth limit is increased;
* the test run count is decreased;
* changes the test to use separate project with minimal amount of classes
(we're not interested in compiler's memory leaks; only Gradle plugin specific ones);
2018-06-06 17:54:51 +03:00
Alexey Tsvetkov 43e7b0425d Test: move Gradle daemon memory test to separate class 2018-06-06 17:54:50 +03:00
Ilya Gorbunov 0f972f2412 Restore default parameter values in JS collection constructors
Even if they now have overloads that will be selected when these parameters are omitted.
This is to preserve compatibility with the libraries compiled against the older library.

#KT-24782 Fixed
2018-06-06 15:32:34 +03:00
Roman Artemev 4b8d906e45 Add runtime for JS IR BE 2018-06-05 21:21:18 +03:00
Alexey Tsvetkov 2fecf07dd7 Test: do not expect copy classes task to run with Gradle 4.0+ 2018-06-05 19:27:08 +03:00
Alexey Tsvetkov 141cf43153 Test: remove KotlinGradlePluginMultiVersionIT
We run all tests with multiple Gradle versions now,
so parametrized test is not needed anymore.

Test cases are moved to relevant test classes.

testKaptProcessorPath is removed because kapt1 is not supported anymore.
2018-06-05 19:27:07 +03:00
Alexey Tsvetkov fdbd3cd8cb Test: remove unsupported Gradle versions from tests 2018-06-05 19:27:07 +03:00
Alexey Tsvetkov 80731437a8 Drop forcing Java task to recompile
We don't support Gradle <= 3.5 at the moment,
it does not make sense to have the code for Gradle < 2.14
2018-06-05 19:27:07 +03:00
Alexey Tsvetkov 0eadc76cb7 Remove unneeded code from Gradle plugin 2018-06-05 19:27:07 +03:00
Alexey Tsvetkov 3dc314d509 Remove com.intellij usages from Gradle plugin 2018-06-05 19:27:07 +03:00
Alexey Tsvetkov c9e49ed198 Remove unused util 2018-06-05 19:27:07 +03:00
Alexey Tsvetkov 5f2513ee20 Get rid of split package org.jetbrains.kotlin.incremental in Gradle plugin
#KT-18621 fixed
2018-06-05 19:27:07 +03:00
Alexey Tsvetkov f7b32bdfa7 Refactor managing Gradle daemons for tests
Encapsulate daemon run count within DaemonRegistry to simplify reasoning
about the state.

Never count test process Gradle version as active Gradle process.

Fix the bug when daemon version hit max run count threshold
would be restarted every time after that.
2018-06-01 23:14:34 +03:00
Alexey Tsvetkov 0fd0eb9a18 Do not build release variant for Android Gradle test
This speeds up the test case significally. On my machine the time spent
in test case dropped from 1+ minute to 15 seconds.
2018-06-01 23:13:37 +03:00
Alexey Tsvetkov 87b053958b Make lint not fail on error in Android tests
It fails with meaningless (for us) errors, such as "target version 23
won't be accepted to play store soon".
2018-06-01 23:13:37 +03:00
Alexey Tsvetkov 3ccaae249a Move Android test from foo to com.example package
Otherwise the test `KotlinAndroid32GradleIT.testIncrementalCompile`
failed with Android resource linking failed error:
"attribute 'package' in <manifest> tag is not a valid Android package name: 'foo'."
2018-06-01 23:13:37 +03:00
Alexey Tsvetkov 44a845eca9 Avoid using bound class reference
Bound references require kotlin-reflect 1.1.x on runtime.
However old Gradle versions (e.g. 3.4) can leak 1.0.x reflect
into Gradle classloader, so getting bound reference fails on runtime
(in this case the plugin couldn't connect to the daemon).
2018-06-01 23:13:37 +03:00
Alexey Tsvetkov 42350ffb1a Fix applying subplugin from script
#KT-24497 fixed
2018-06-01 23:13:36 +03:00