Commit Graph

2564 Commits

Author SHA1 Message Date
Ilya Gorbunov 1792a77a47 Generate hashCode and equals for unsigned types 2018-08-30 14:52:51 +03:00
Alexander Udalov 082da82f3e Introduce kotlin.jvm.functions.FunctionN
#KT-13764
2018-08-30 14:52:36 +03:00
Alexander Udalov e35ebff4e1 Move superinterface to the only subclass of FunctionBase 2018-08-30 14:51:17 +03:00
Ilya Gorbunov 07a0cb91d4 Introduce Char.MIN_VALUE and MAX_VALUE constants (KT-21763)
Add Char.MIN_VALUE and Char.MAX_VALUE implementations in primitive companion objects.
Update builtins test data and public API.

Co-authored-by: Oskar Drozda <themppsplx@gmail.com>
2018-08-30 14:51:14 +03:00
Ilya Gorbunov 0c50014e7a Introduce SIZE_BYTES and SIZE_BITS constants for all integral types
#KT-8247 Fixed
2018-08-30 14:51:10 +03:00
Kerooker af5f78076c KT-7922 Added Boolean Companion Object 2018-08-30 14:51:04 +03:00
Ilya Gorbunov fa33b1b5a9 Random docs and API refinement
KT-17261
2018-08-30 14:50:40 +03:00
Ilya Gorbunov 7e4528e217 Common shuffle/shuffled with the specified random source
KT-17261, KT-9010
2018-08-30 14:50:38 +03:00
Ilya Gorbunov cc031e3a40 Provide common Random API
#KT-17261
2018-08-30 14:50:36 +03:00
Ilya Gorbunov bbee18b84d Introduce StringBuilder.clear() extension
#KT-18910 Fixed
2018-08-30 14:50:29 +03:00
Alexander Udalov f423403167 Make kotlin.Metadata public
Prohibit explicit usage of `@Metadata` to prevent possible
AnnotationFormatError at runtime

 #KT-23602 Fixed
2018-08-30 14:50:25 +03:00
Ilya Gorbunov 8102e512d3 For bootstrapping on 1.3-M1: compile parts that can be used in .gradle.kts scripts with 1.2 language version 2018-08-30 14:50:23 +03:00
Ilya Gorbunov b160561795 Include new coroutines and unsigned classes into stdlib
Fix clashing module name in common coroutines sourceset
2018-08-30 14:50:21 +03:00
Ilya Gorbunov 4c6c0aa279 Update public API test due to ProperVisibilityForCompanionObjectInstanceField 2018-08-30 14:50:19 +03:00
Ilya Gorbunov 76e581fe4f Temporarily turn off ReleaseCoroutines feature 2018-08-30 14:50:16 +03:00
Ilya Gorbunov d4a195c757 Advance maven project versions to 1.3-SNAPSHOT 2018-08-30 14:49:30 +03:00
Ilya Gorbunov 0f5f90cf52 Advance project version to 1.3-SNAPSHOT
Set LATEST_STABLE language version and current version of stdlib to 1.3, set IS_PRE_RELEASE
Remove "EXPERIMENTAL" from 1.3 version description in tests and gradle options
2018-08-30 14:49:27 +03:00
Ilya Gorbunov 36936d252c Support multiple expectedBy dependencies when building -Xcommon-sources list
`addCommonSourceSetToPlatformSourceSet` may be called multiple times during
a platform project configuration.
2018-08-28 19:13:36 +03:00
Ivan Gavrilovic 48784fd95e Use new API for getting the raw Android resources
A new method has been added in the Android Gradle
plugin 3.3.0. This commit switches from ussing the
MergeResources task, and uses getAllRawAndroidResources
API instead.

Test: manually verified
2018-08-24 17:28:40 +03:00
Yan Zhulanow c83581e6b8 Kapt: Strict mode. Issue an error if the converter fails to process a class (#KT-25518, #KT-24272) 2018-08-24 04:28:11 +05:00
Yan Zhulanow ef210d7122 Kapt: Do not write references to anonymous classes to stubs & metadata (#KT-25374) 2018-08-24 04:28:09 +05:00
Alexey Tsvetkov 32d910320f Annotate KotlinNativeCompile#outputFile 2018-08-21 23:49:42 +03:00
Sergey Igushkin ef85fe7ab2 Always apply the java-base plugin from the new MPP plugin
This fixes misconfigured test tasks and the `Usage` attribute
compatibility rule missing that is added by `java-base`.

Issue #KT-26301 Fixed
2018-08-21 22:54:50 +03:00
Sergey Igushkin 2040cdde4b Add missing Gradle task input path sensitivity
Fix after the commit 0f003802f
2018-08-21 22:54:49 +03:00
Sergey Igushkin 674e464230 Fix Kotlin source directories not added into the Java source set srcDirs
Before the new MPP, Kotlin source directories were added to the Java
source set's `allJava` and `allSource` by all of the Kotlin plugins,
including common and JS ones. As it turned out, this was required by the
IntelliJ Gradle import.

* Make all `KotlinSourceSetProcessor`s (not just JVM) check whether a
  compilation has a Java source set and add the Kotlin source
  directories to `allSource` and `allJava`

* Also disable the unclear resource `exclude` for the Java source set
  that filters Kotlin source directories out of the resources

Issue #KT-26020 Fixed
Issue #KT-26267 Fixed
2018-08-21 18:05:52 +03:00
Alexander Udalov 0f003802fe Introduce -Xcommon-sources and pass it correctly from build tool plugins
#KT-25196 In Progress
2018-08-21 12:49:10 +02:00
Alexey Tsvetkov 272f9b8a10 Recompile all subclasses of changed classes
Previously inter-project IC recompiled only direct subclasses
of changed classes

    #KT-25455 fixed
2018-08-21 04:32:32 +03:00
Alexey Tsvetkov 73f7c2ef3c Use file trees in InspectClassesForMultiModuleIC
#KT-26208
2018-08-21 04:32:32 +03:00
Alexey Tsvetkov 41a47ea50f Minor: remove redundant default argument 'weakTesting = false' 2018-08-21 04:32:31 +03:00
Alexey Tsvetkov c9a62e078a Minor: remove GradleICReporter 2018-08-21 04:32:31 +03:00
Alexey Tsvetkov 30f3622b27 Implement inter-project JS IC with Gradle
#KT-25025 fixed
2018-08-21 04:32:31 +03:00
Alexey Tsvetkov 02af631e14 Minor: move tests for incremental compilation of Kotlin when Java changes 2018-08-21 03:53:57 +03:00
Alexey Tsvetkov 638c1eadff Avoid rebuild when '--verbose' is used in Gradle
#KT-23472 fixed
2018-08-20 23:41:11 +03:00
Alexey Tsvetkov d09629972a Use same system property to avoid deleting module file in JPS and Gradle 2018-08-20 23:41:11 +03:00
ilmat192 2251440f04 Basic native support in kotlin-multiplatform (#1811)
* Add dependency on KN shared in gradle-plugin

* Basic support for Kotlin/Native:
     * Target presets
     * Compilation into a klib
     * Compilation into native binraies: framework and executable
     * Basic dependencies between projects
     * No jars in native publications
     * Replace '-' with '_' in framework names
    * Escape quotes in native command lines on Windows
* Move targets from Kotlin/Native repo
* Download KN compiler using Gradle's mechanisms
* Support source set dependencies in native
2018-08-19 20:45:31 +07:00
Sergey Igushkin b125f1e23e Revert "Fix source set resources filtering broken by refactoring"
This reverts commit 6af6834
2018-08-17 17:54:43 +03:00
Sergey Igushkin 1a3dd67176 Enable metadata publishing for new MPP and consumption from source sets
* Add configurations for consuming source sets metadata (extending the
  source set's dependency configurations). These configurations will be
  used by the IDE to pick up the dependencies metadata.

* Remove the universal preset from the default presets, create a
  metadata target by default for compiling and publishing the metadata
  of `commonMain` (in the future, we will publish and consume the
  metadata of the other source sets as well).

* Make the classpath configurations of common modules consume the
  metadata and thus ensure compatibility of 1.2.x MPP with the new MPP
  model.
2018-08-17 15:12:44 +03:00
Jonathan Lermitage 66bb744e3c Update Maven central repository url to latest version 2018-08-17 09:46:07 +02:00
Sergey Igushkin 6af6834966 (minor) Fix source set resources filtering broken by refactoring
Before the last change in this logic, the resources filtering used
the original Kotlin source directories, not those with Java filtered
out.

Make sure that the Java source directories that are added to the Kotlin
source set are excluded from the resources, and all the related
configuration works lazily, i.e. supports source sets modification
after configuration took place.
2018-08-17 03:22:30 +03:00
Sergey Igushkin d1a5794d36 (minor) Move source set configuration creation
It was placed in the new MPP plugin and was therefore not used for
the 'KotlinSourceSet's with the old plugin. Move this logic to the
KotlinSourceSetFactory so that it is applied to all source sets
2018-08-17 03:18:32 +03:00
Alexander Udalov 3345dc81fd Do not return field signature if there's none in the metadata
Otherwise this code behaves incorrectly on getter-only properties: it
returns a meaningless field signature whereas the property has no field.
It's hard to come up with an example of when this could matter in
compiler code, but it's very noticeable in kotlinx-metadata-jvm

 #KT-26188 Fixed
2018-08-16 15:05:19 +02:00
Alexander Udalov 3f32e1cce9 Do not serialize empty property signature to JVM metadata
This should have no effect on the correct code currently because all
properties have at least a getter, but may help in debugging problems
with serialized metadata for properties
2018-08-16 14:11:09 +02:00
Sergey Igushkin d13ca38296 Relax some restrictions on Gradle dependency configurations in new MPP
* Set canBeConsumed = false only on those configurations that have this
  flag according to the Gradle Java plugins. This saves us from breaking
  existing build scripts but introduces ambiguity between consumable
  configurations (e.g. between `apiElements`, `compile`, `runtime`). See
  the solution in the next point.

* Don't set the Kotlin platform attribute on configurations that are
  not meant for consuming in other projects or resolving directly. This
  change hides these configurations from Gradle's variant aware
  dependency resolution and therefore prevents ambiguity

(cherry-picked from 81f2c48f)
2018-08-15 17:48:44 +03:00
Leonid Startsev 0ac969a617 Attempt to make loading of compiler plugins from kotlin-platform-native Gradle plugin
Moved SubpluginEnviroment to separate file and made public some methods
KotlinNativeCompile task now extends AbstractCompile so it could be passed to SubpluginEnviroment.loadSubplugins
KotlinNativeBasePlugin now declares kotlinCompilerPluginClasspath configuration
2018-08-15 12:19:04 +03:00
Alexander Udalov c011bf61fe Support multiple version requirements on single element 2018-08-13 11:02:35 +02:00
Sergey Igushkin 5815d6a70c Implement language settings API for Kotlin source sets 2018-08-11 23:16:03 +03:00
Sergey Igushkin 2c04e2b95c Fix: create a compilation's default source set for Android as well 2018-08-11 23:16:03 +03:00
Alexander Udalov f663b8f554 Fix kotlin-maven-plugin compilation 2018-08-10 18:34:40 +02:00
Sergey Igushkin caec846330 Improve Android libraries support: allow project dependency on a lib
* Add a platform type androidJvm that is one-way compatible (can
  consume but cannot be consumed) with jvm, register the matching
  strategy

* Write our attributes to Android's output configurations (this uses
  a naming convention that Android inherits from Java, but there's no
  public API at the moment for that)
2018-08-07 15:55:46 +03:00
Sergey Igushkin 3f60798848 Fix the use case of an old-style project depending on an MPP lib
* Setup the attributes for the resolvable and output configurations
2018-08-07 15:55:46 +03:00