Commit Graph

4270 Commits

Author SHA1 Message Date
Victor Turansky 90c993334f KT-37240 Deterministic order for webpack config patches
Additional fix - only files with `js` extension processed (directories excluded)

`listFiles()` already contains 'is directory' check. Duplicated check removed
2020-03-19 11:55:24 +03:00
Vyacheslav Gerasimov bcefa68df0 Always checkout/checkin text files with lf endings
Different line endings on linux/windows prevents gradle from reusing
build cache since endings make task inputs completely different between
systems
2020-03-18 22:33:15 +03:00
Vyacheslav Gerasimov 7dc24a13e4 Build: Make ProGuard task cacheable
Exclude jdk files form libraries input. Instead add jdk major version
to inputs. JavaCompile task acts same to ignore fluctuations in JDK
implementations since api should remain same
2020-03-18 22:32:07 +03:00
Yan Zhulanow 897c48f97e Add more robust check for plugin application order (KT-37245)
Cause build to fail if the 'kotlin-kapt' plugin is applied before the
  main Kotlin plugin ('kotlin' or 'kotlin-android').
  The 'logger.error()' prints an error message, however the build
  continues.
2020-03-18 18:26:17 +09:00
Vyacheslav Karpukhin eb68a0de47 Android import: simplify the check for android plugin version 2020-03-16 23:46:38 +01:00
Dmitriy Dolovov f3f971005d [Commonizer] GC obsolete & unused commonized libraries to free disk space 2020-03-16 19:52:21 +07:00
Sergey Igushkin e1ec53d4e9 Filter kapt generate stubs classpath for non-existent entries (KT-37241) (#3192)
Issue #KT-37241 Fixed
2020-03-16 14:16:35 +03:00
Kirill Shmakov 5474d5f1d3 Support debug in Gradle tasks responsible for K/N tests 2020-03-16 12:20:29 +03:00
Sergey Igushkin a0aeb1554d Filter kapt generate stubs classpath for non-existent entries (KT-37241)
Issue #KT-37241 Fixed
2020-03-13 21:53:02 +03:00
Abduqodiri Qurbonzoda b1fac4e721 Implement reduceIndexedOrNull and reduceRightIndexedOrNull #KT-36866 2020-03-12 18:08:55 +03:00
Abduqodiri Qurbonzoda b60633d79a Add associateWith to Array<T> #KT-30372 2020-03-12 18:06:54 +03:00
Abduqodiri Qurbonzoda e632d58936 Nullable Array.contentEquals/contentHashCode/contentToString #KT-34161 2020-03-12 18:01:23 +03:00
Sergey Bogolepov e919e7b79a [Gradle][Native][Cache] Don't skip metadata-based interop libraries
`resolveSingleFileKlib` by default doesn't support klibs with
non-default ir providers. In case of cache generation for native interop
libraries we need to override this behavior because they have
ir_provider=kotlin.native.cinterop.
2020-03-12 18:11:47 +07:00
Ilya Goncharov dc2dd2e3e3 [Gradle, JS] Remove idle test runner
#KT-37037 fixed
2020-03-12 13:23:45 +03:00
Ilya Goncharov 857f3335bb [Gradle, JS] TestFramework is public to detect it in debug extension
#KT-37037 fixed
2020-03-12 13:23:27 +03:00
Ilya Goncharov 3728dd45ce [Gradle, JS] Remove redundant hacks for debug
#KT-37037 fixed
2020-03-12 13:22:42 +03:00
Sergey Igushkin 435e74b74b Redirect warning output to error log when allWarningsAsErrors is enabled
Issue #KT-35447 Fixed
2020-03-11 16:03:55 +03:00
Dmitriy Dolovov 182c1cee05 [Commonizer] Don't regenerate commonized KLIBs for *-SNAPSHOT versions 2020-03-11 15:18:35 +07:00
Alexander Udalov 787e4503e5 Migrate -Xuse-experimental -> -Xopt-in in project sources 2020-03-10 12:07:15 +01:00
Alexander Udalov 795d6ab407 Migrate UseExperimental->OptIn in project sources 2020-03-10 12:07:14 +01:00
Alexander Udalov 98aecbef6b Optimize runtime representation for callable reference subclasses
Instead of generating overrides for getOwner/getName/getSignature in
each anonymous class representing a callable reference, pass them to the
superclass' constructor and store as fields. This occupies some small
memory but helps to reduce the size of the generated class files, and
will be helpful for adding further runtime information to callable
references, such as information about implicit conversions this
reference has been subject to.

Represent owner as java.lang.Class + boolean instead of
KDeclarationContainer, so that the unnecessary wrapping Class->KClass
wouldn't happen before it's needed, and also to make sure all callable
references remain serializable.

Note that the argument type where the "is declaration container a class"
is passed is int instead of boolean. The plan is to pass the
aforementioned implicit conversion information as bits of this same
integer value.

 #KT-27362 Fixed
2020-03-06 16:55:07 +01:00
Alexander Udalov 8d7c8672ac Generate reference to existing class for builtin function references
Instead of non-existing `kotlin.KotlinPackage`, which led to
NoClassDefFoundError as soon as reflection tried to call getOwner on a
builtin callable reference, use a reference to a new physical class
`kotlin.jvm.internal.Intrinsics$Kotlin`. This will allow to support
KT-17151.

Note that for API version less than 1.4, this will still lead to
NoClassDefFoundError, but this is not worse than the current situation
where it happens anyway.
2020-03-06 16:55:05 +01:00
Ilya Goncharov 7da220b0a2 [Gradle, JS] Check current chosen js compiler for targets in JS and MPP 2020-03-06 17:26:48 +03:00
Ilya Goncharov a1263e445e [Gradle, JS] Add redundant methods for single js plugin 2020-03-06 17:26:48 +03:00
Ilya Goncharov 8fbfa8b819 [Gradle, JS] Migrate from singletons to classes 2020-03-06 16:07:11 +03:00
Ilya Goncharov 82de930574 [Gradle, JS] Consider transitivity in cache of npm dependencies 2020-03-06 16:07:11 +03:00
Ilya Goncharov 49814c438c [Gradle, JS] Fix naming 2020-03-06 16:07:10 +03:00
Ilya Goncharov 2eea8b0760 [Gradle, JS] Support transitive mode for npm dependencies
#KT-36196 fixed
2020-03-06 16:07:10 +03:00
Ilya Goncharov d108c8ef51 [Gradle, JS] Move logic of resolving NpmDependency to Npm Api
#KT-36196 fixed
2020-03-06 16:07:10 +03:00
Sergey Igushkin 90f4f5db26 Internal visibility between common source sets in Gradle (KT-37264)
In KotlinCompileCommon, pass the friendPaths and refinesPaths arguments

In KotlinNativeCompilation, add both friend and refined dependencies as
friends for now.

In getVisibleSourceSetsFromAssociateCompilations, exclude the metadata
compilations to avoid incorrect results (those compilations don't have
proper kotlin

Issue #KT-37264 Fixed
2020-03-06 15:56:41 +03:00
Vyacheslav Gerasimov c2457cae60 Read KotlinCompilerVersion from resource file
Writing build number into a public constant field leads to poor gradle
cache reuse between different builds. Public constant value is a part of
public api and its changes affect inputs of dependent modules.
Extracting build number to resource file allows to ignore it from
runtime classpath which fixes same problem for KotlinCompile tasks
2020-03-05 18:05:53 +03:00
Abduqodiri Qurbonzoda a32f742893 Inherit ReadWriteProperty from ReadOnlyProperty #KT-27729 2020-03-05 16:53:02 +03:00
Ivan Gavrilovic 6d4eb9ae52 KT-36113: Make KAPT classpath snapshot deterministic
When snapshotting a classpath entry, sort information about types
so there is no dependency on the order of entries in jar.

Test: ClasspathAnalyzerTest
2020-03-03 14:22:57 +09:00
Ilya Kirillov a6139f3635 Wizard: minor: fix YamlParsingError package 2020-03-01 21:32:36 +03:00
Ilya Kirillov a9c96a7cde Wizard: move downloading Kotlin version phase to the end 2020-03-01 19:07:51 +03:00
Ilya Kirillov a03510e3c0 Wizard: add tags for project templates 2020-03-01 19:07:50 +03:00
Ilya Kirillov d639816393 Wizard: use kotlinx-collections-immutable for storing IRs 2020-03-01 19:07:49 +03:00
Vyacheslav Gerasimov 05b5894ef1 Build: Use configurations property for shadowJar in :kotlin-main-kts
It marked as classpath and improves cache reuse between different builds
2020-02-29 16:36:02 +03:00
Sergey Igushkin f764d3a021 testCompileOnlyDependencyProcessingForMetadataCompilations -> Gradle 5+
This test fails with Gradle 4.9 due to a Gradle bug when Gradle is
unable to pick up task dependencies from providers nested into a file
collection. That doesn't seem feasible to fix.
2020-02-28 20:09:45 +03:00
Sergey Igushkin b8602fa31a Fix missing installation dependencies in Gradle integration tests 2020-02-28 20:09:45 +03:00
Ilya Matveev f53b059410 [Gradle, tests] Fix native compiler arguments test for Windows 2020-02-28 17:50:55 +07:00
Vyacheslav Karpukhin a01b840eab Android Import: Search for Android SDK using public API instead of reflection 2020-02-26 19:03:48 +01:00
Stanislav Erokhin 74348d5ffb Fix compile configuration for maven compiler plugins
Previously in kotlin-maven-noarg & kotlin-maven-serialization plugins
java was compiled before kotlin, and because of that links from java
to kotlin was unresolved.
It was fixed as prescribed by docs: https://kotlinlang.org/docs/reference/using-maven.html#compiling-kotlin-and-java-sources
2020-02-26 12:12:35 +03:00
Ilya Goncharov ee9be61c20 [Gradle, JS] Fix propogation useCommonJs to irTarget
#KT-37036 fixed
2020-02-26 11:40:45 +03:00
Ilya Goncharov 7719dfca4a [Gradle, JS] Fix timeout for debug
#KT-37035 fixed
2020-02-26 11:36:17 +03:00
Ilya Kirillov 870b7d234f Wizard: refactoring do not use context directly in UI 2020-02-26 11:19:09 +03:00
Ilya Kirillov ad39d0520a Wizard: use first enum entry as default value for enumSetting 2020-02-26 11:19:08 +03:00
Ilya Kirillov 3967522c08 Wizard: fix Android minifyEnabled call for groovy 2020-02-26 11:19:08 +03:00
Ilya Kirillov 7e22572324 Wizard: add configuration for Android MPP target 2020-02-26 11:19:08 +03:00
Ilya Kirillov 3eca687611 Wizard: move module configurator settings to companion objects 2020-02-26 11:19:08 +03:00