Commit Graph

48656 Commits

Author SHA1 Message Date
Ilya Matveev 36e8f84797 Add test for static/shared library building 2018-09-06 22:59:27 +07:00
Ilya Matveev bef898509d Allow using strings to set native output kinds 2018-09-06 22:59:27 +07:00
Ilya Matveev cfe7858229 Support static and shared libraries for native in kotlin-mpp 2018-09-06 22:59:27 +07:00
Ilya Matveev 0a685d57c2 Add macos in targets for new MPP integration tests 2018-09-06 22:59:27 +07:00
Sergey Igushkin 577bae763c Add tests for Kotlin/Native in new MPP
* Add K/N variants to the general MPP tests
* Also check the separated publishing
2018-09-06 22:59:27 +07:00
Sergey Igushkin 67bd659390 Fallback to publishing with coordinates inferred from publication
In Gradle < 4.7, there's no `ComponentWithCoordinates` interface, and we
need to make sure that none of our classes implementing this interface
are loaded with older Gradle versions.

Instead of that interface, we can rely on Gradle's metadata generation
heuristic that takes Maven coordinates for the variants from the
corresponding publications.
2018-09-06 22:59:27 +07:00
Ilya Matveev 091e680196 Fix validation warning for Kotlin/Native compilation task 2018-09-06 22:59:27 +07:00
Ilya Matveev ed7da870cf Rename test tasks for native targets 2018-09-06 22:59:27 +07:00
Ilya Matveev c23296a0d8 Publish different targets as different software components 2018-09-06 22:59:27 +07:00
Nikolay Krasko 91308508bd Inject with suffix and prefix arguments in annotations (KT-26584)
#KT-26584 Fixed
2018-09-06 17:39:54 +03:00
Mikhail Zarechenskiy 690762d46c Inline classes ABI: rename equals--impl to equals-impl0 2018-09-06 17:01:01 +03:00
Yan Zhulanow 280a3e3d26 Android Extensions: Support platform modules (KT-26169) 2018-09-06 14:42:23 +03:00
Yan Zhulanow ca4b99b1a0 Maven: Do not consider 'kapt' and 'test-kapt' executions as non-JVM (KT-26211) 2018-09-06 14:42:22 +03:00
Yan Zhulanow 2ec1a89fa1 Use IdePlatform instead of IdePlatformKind in 'Kotlin Facet' project structure tab 2018-09-06 14:42:21 +03:00
Yan Zhulanow a434cb00c6 Do not retain proxy-based components for compiler plugin settings in project model (again) (KT-24444)
The previous approach didn't work because Gradle wraps the copy() result, and the leakage didn't go away.
2018-09-06 14:42:20 +03:00
Yan Zhulanow f55a52b86e MPP: Fix compatibility issue with Android Studio 3.3 Canary 7
'TargetPlatformKind' is still used in AS 3.3 so we can't remove it entirely yet.
2018-09-06 14:42:19 +03:00
Alexander Udalov f90303315d Support array class literals in annotation serializer/deserializer
Note that this change brings an incompatibility: `Array<Foo>::class`
will be seen as `Foo::class` by the old deserializer. We consider this
OK because the compiler never had any logic that relied on reading class
literal arguments correctly (otherwise it wouldn't have worked because
it could only see `Array<*>::class` before this commit), and the support
of annotations on types in JVM reflection is only available in the
upcoming 1.3 release (KT-16795)

 #KT-22069 Fixed
2018-09-06 14:40:06 +03:00
Mikhael Bogdanov f3f93ed6cc Get rid of 'BRIDGE' flag on $default functions
#KT-24415 Fixed
2018-09-06 13:34:00 +02:00
Alexey Sedunov b441c76313 Generate equals/hashCode(): Support content equality from stdlib
#KT-22361 Fixed
2018-09-06 14:28:53 +03:00
Alexey Sedunov 5fcc6cfa0b Change Signature: Retain necessary backquotes in the dialog
#KT-17124 Fixed
2018-09-06 14:28:52 +03:00
Alexey Sedunov 26c02cd8bb Move Left/Right: Support type constraints
#KT-26525 Fixed
2018-09-06 14:28:52 +03:00
Alexey Sedunov a20857beb9 Misc: Do not look for *_main/*_test modules in import test (AS3.2) 2018-09-06 14:28:52 +03:00
Mikhail Zarechenskiy 3dd5a267b8 Refine scope of signed to unsigned conversions
Depend on a module of function declaration, not function call
2018-09-06 14:06:03 +03:00
Nicolay Mitropolsky e80a01a3fd 183: IDEA 183 version set to 183.2153.8 2018-09-06 12:49:00 +03:00
Sergey Igushkin 0ee19cf28f Support -Xcommon-sources in new MPP
In new MPP, add source sets taking part in more than one compilation to
the tasks' `commonSourceSet` in order to pass them as -Xcommon-sources

Issue #KT-26515 Fixed
2018-09-06 12:41:02 +03:00
Sergey Igushkin 5e6148c970 Refactor & fix: add allKotlinSourceSets and use it where appropriate
* Some of the usages of `kotlinSourceSets` should instead get all the
  source set from the source set hierarchies, i.e. including the ones
  transitively-participating in the compilation
2018-09-06 12:40:32 +03:00
Sergey Igushkin 96901c5487 Move KotlinSourceSet back to org.jetbrains.kotlin.gradle.plugin.*
After all MPP related changes, the `KotlinSourceSet` interface turns out
compatible with the old `KotlinSourceSet`, and, since there are external
usages of `KotlinSourceSet`, it is reasonable to expose the new
interface under the old FQ-name to fix those external usages.

Issue #KT-26498 Fixed
2018-09-06 12:35:59 +03:00
Sergey Igushkin 57c4886bd4 Don't create source sets and test compilation for the metadata target
Issue #KT-26253 In progress
2018-09-06 12:35:58 +03:00
Mikhail Zarechenskiy 5173a84dc7 Enable signed to unsigned coercion for modules with special capability
Mainly this is needed for Kotlin/Native part
2018-09-06 12:29:30 +03:00
Mikhail Glukhikh 55ff519aa8 Fix KtModifierListOwner.addAnnotation (case without modifier list)
Now add annotation to primary constructor should work correctly,
and may be some other related cases too.

Related to KT-25548
2018-09-06 11:10:05 +03:00
Mikhail Glukhikh 5f2c7d3c84 Do not report OPTIONAL_DECLARATION_USAGE_... in IDE for platform modules
#KT-26585 Fixed
Also fixes MultiPlatformHighlightingTestGenerated.testMultifileFacade
2018-09-06 11:07:21 +03:00
Nikolay Krasko ca1e0a4b88 Do not fetch Kotlin stubs for versioned files from multi-release jars (KT-26439)
An incomplete list of inner class files might be stored in versioned
directory and that ruins Kotlin stub building.

Another reason for excluding such files, that they are duplicated
in different declarations lists such as `Navigate -> Class...` action.

 #KT-26439 Fixed
2018-09-06 10:48:18 +03:00
Mikhail Zarechenskiy bc7f13b838 Temporarily allow equals & hashCode for SoF to compile bootstrap
equals & hashCode should be removed completely soon anyway
2018-09-06 10:39:34 +03:00
Mikhail Zarechenskiy 83975bd6ac Generate stub for specialized equals inside inline class 2018-09-06 10:39:33 +03:00
Mikhail Zarechenskiy b4674a172e Reserve secondary constructors with bodies inside inline classes
#KT-26575 Fixed
2018-09-06 10:22:01 +03:00
Mikhail Zarechenskiy 002a66fec1 Reserve box/unbox/equals/hashCode methods inside inline classes
#KT-26573 Fixed
2018-09-06 10:20:03 +03:00
Ilya Gorbunov 7f8863bfd0 Update public API after inline class generation schema was changed 2018-09-06 03:56:01 +03:00
Ilya Gorbunov 43eeccbcb8 Advance bootstrap to 1.3.0-dev-169 2018-09-06 03:55:02 +03:00
Vyacheslav Gerasimov e29151a1f0 Apply java plugin to kotlin-compiler project to fool idea import
java plugin makes idea import dependencies on this project as source (with empty sources however), this prevents reindexing of kotlin-compiler.jar after build on every change in compiler modules
2018-09-05 22:58:31 +03:00
Vyacheslav Gerasimov b868450e9a Make dependencies on :kotlin-compiler project testRuntimeOnly everywhere 2018-09-05 22:58:31 +03:00
Ilmir Usmanov 53a1526412 Add version to DebugMetadata
#KT-26580 Fixed
2018-09-05 22:51:55 +03:00
victor.petukhov e082fe19ea Actualize contracts diagnostic spec tests after 051ad0f79e 2018-09-05 18:04:58 +03:00
Mikhail Glukhikh ad27d9aae7 Package utils: implement getNonGeneratedKotlinSourceRoots
This is needed to prevent creation of actual elements
in generated sources. Checked manually.

#KT-24129 Fixed
2018-09-05 17:21:23 +03:00
Mikhail Glukhikh caee77cdae Kotlinize findOrCreateDirectoryForPackage in create actual fix
Before this commit, without existing directory
we tried to create it only inside Java source roots,
which is incorrect for JS and other non-JVM modules.
Source roots themselves still aren't created if they don't exist.

This fixes KT-19586 partially
2018-09-05 17:21:10 +03:00
Yan Zhulanow 3276e348cc Fix kapt tests (Kotlin version updated to 1.3) 2018-09-05 17:15:04 +03:00
Yan Zhulanow 17849473d6 Fix bunch compilation for AS 3.1/3.2 2018-09-05 17:15:04 +03:00
Dmitry Savvinov 051ad0f79e Fix unsound smartcast due to returns(null) in safecall
^KT-26382 Fixed
2018-09-05 16:27:48 +03:00
Dmitry Savvinov 18338f4ea3 Add test on safecall of function with returns(null) contract
Currently with non-desired testdata, fix incoming in the next commit.
2018-09-05 16:27:47 +03:00
Mikhail Glukhikh 1530a8bf53 Downgrade "Call chain -> sequence" to information level
Made to hide problem KT-26571
2018-09-05 14:55:23 +03:00
Roman Elizarov eac1f5f8c8 Bootstrap change to rename SuccessOrFailure to Result 2018-09-05 14:29:36 +03:00