Commit Graph

4363 Commits

Author SHA1 Message Date
Ilya Kirillov f1741a4d1b Wizard: do not require to default settings to be present in yaml 2020-03-26 09:38:38 +03:00
Ilya Kirillov a16cb7b74d Wizard: add option to enable Java support for JVM targets
#KT-36179 fixed
2020-03-26 09:38:37 +03:00
Ilya Kirillov 691ee7412a Wizard: all context operations to read/write operations 2020-03-26 09:38:36 +03:00
Ilya Kirillov 81c7cb20f3 Wizard: minor, move out module validators from Module class 2020-03-26 09:38:35 +03:00
Ilya Kirillov a88a19a1b9 Wizard: migrate tests to Kotlin 1.3.70 2020-03-26 09:38:34 +03:00
Ilya Kirillov 693e12d826 Wizard: minor, remove unused functions 2020-03-26 09:38:33 +03:00
Ilya Kirillov 2460f6cfe6 Wizard: remove unused error types 2020-03-26 09:38:32 +03:00
Ilya Kirillov 98faaf9eba Wizard: make YamlParsingError to be exception error 2020-03-26 09:38:31 +03:00
Ilya Kirillov 51f71a4e33 Wizard: do not use apache maven Version classes 2020-03-26 09:38:29 +03:00
Ilya Kirillov 38ff41a524 Wizard: move settings to separate package 2020-03-26 09:38:21 +03:00
Ilya Kirillov 2fa0e7490f Wizard: minor, remove unused functions 2020-03-26 09:38:20 +03:00
Ilya Kirillov 4ef01aea3f Wizard: minor, commonize settings initialization with default values 2020-03-26 09:38:19 +03:00
Ilya Kirillov 42529ec525 Wizard: add test infrastructure, project importing tests & project templates tests 2020-03-26 09:38:17 +03:00
Ilya Kirillov 2f30195a6d Wizard: add some basic IOs module configurator 2020-03-26 09:38:16 +03:00
Ilya Kirillov 275212b6a9 Wizard: introduce Android module type 2020-03-26 09:38:15 +03:00
Ilya Goncharov b04844d583 [Gradle, JS] Actualize Node and Yarn versions
#KT-37762 fixed
2020-03-25 19:50:44 +03:00
Dmitriy Novozhilov 0d6bb33f49 Update version of kotlinx-collections-immutable in dependencies 2020-03-25 18:07:27 +03:00
Yaroslav Chernyshev b13b6d86c7 [Gradle, Native] Advanced CocoaPods integration. 2020-03-25 11:20:01 +03:00
Ilya Goncharov c527f8e117 [Gradle, JS] Do not check exit code
Because mocha don't make difference between infrastructure and runtime problems and failing tests
This reverts commit e6d39ce7
https://github.com/mochajs/mocha/issues/4216
2020-03-24 19:22:24 +03:00
Ilya Goncharov 930b69bef5 [Gradle, JS] Add checks on module name set before browser and nodejs
- Add outputModuleName for compilations

KT-32017
2020-03-24 19:05:45 +03:00
Ilya Goncharov 4da31f1948 [Gradle, JS] Fix cast
#KT-32017 fixed
2020-03-24 17:43:37 +03:00
Ilya Goncharov 5492a93229 [Gradle, JS] Module name for js
#KT-32017 fixed
2020-03-24 17:43:37 +03:00
Ilya Goncharov 19afcd7b6b [Gradle, JS] Introduce semver satisfying for comparison with wildcard 2020-03-24 17:38:17 +03:00
Ilya Goncharov eabd8cfb5f [Gradle, JS] KT-37587 Dynamic resolve of karma.config.d 2020-03-24 17:05:16 +03:00
Victor Turansky 1f6834538b KT-37587 Karma. Revert input check for 'webpack.config.d' directory 2020-03-24 15:52:52 +03:00
Victor Turansky 4cd4dfee25 KT-37587 Karma. Support dynamically created webpack configs 2020-03-24 15:52:52 +03:00
Ilya Goncharov 7736e5f4a7 [Gradle, JS] Run tasks for legacy target 2020-03-24 15:42:07 +03:00
Ilya Matveev 4171dd511f Gradle, native: Fix generating platform libs for Windows 2020-03-24 18:54:12 +07:00
Ilya Matveev 38b5414f30 Gradle, native: Actualize stacktrace format in tests 2020-03-24 18:54:12 +07:00
Ilya Matveev a51230d307 Gradle, native: Support reinstalling K/N compiler
Sometimes a user may need to invalidate all precompiled
caches and regenerate all platform libraries. For example
this may be necessary after updating Xcode since platform
libraries are generated on basis of Xcode frameworks.

This patch provides a simple setting allowing a user
to manually reinstall a K/N compiler.
2020-03-24 18:54:11 +07:00
Ilya Matveev 27f5c577c9 Gradle, native: Generate platform libraries at the user side
Since 1.4, a regular K/N distribution will not contain prebuilt
platform libraries, so the libraries must be generated at the
user side.

This patch adds support for such generation to the MPP Gradle
plugin. The generation itself is performed by separate utility
provided by the K/N compiler distribution. The plugin checks
existence of platform libraries for required targets and starts
this utility if some some of these libraries are missing. Building
caches for platform libraries is also performed at this step.

The patch also adds some project properties allowing a user to
workaround potential problems. User will be able to:
  - Use a special distribution with prebuilt platform libraries.
  - Force building platform libraries in the good old sourcecode mode
    in case of some issues with the new metadata mode.

Kotlin/Native counterpart: https://github.com/JetBrains/kotlin-native/pull/3829.

Issue #KT-32931 Fixed
2020-03-24 18:54:11 +07:00
Victor Turansky 95857c5af4 KT-34468 Yarn. Add entry registry 2020-03-24 11:28:02 +03:00
Victor Turansky 35e3691d6c KT-34468 Yarn. Lock file check at the beginning 2020-03-24 11:28:02 +03:00
Victor Turansky 8cd23dfc9a KT-34468 Yarn. Remove redundant collection creation 2020-03-24 11:28:02 +03:00
Victor Turansky 21cd5086ed KT-34468 Yarn. Named parameters for NpmDependency 2020-03-24 11:28:02 +03:00
Victor Turansky 6931b37a79 KT-34468 Yarn. Dependency search key calculated once 2020-03-24 11:28:02 +03:00
Victor Turansky 0d1bf66c2a KT-34468 Yarn. Star version support fix 2020-03-24 11:28:02 +03:00
Victor Turansky d494881cb9 KT-34468 Yarn. Dependency check at the beginning 2020-03-24 11:28:02 +03:00
Victor Turansky c2b3dd8b33 KT-34468 Yarn. Support dependency GitHub version 2020-03-24 11:28:02 +03:00
Sergey Igushkin ad1a1ac49a Fix failures when a common source set compiled to nothing (KT-36674)
This could happen:
* when a common source set had no sources
* when the compile task of a common source set was disabled

In those cases, there were two subsequent failures:
* the metadata JAR could not interpret the missing klib file as ZIP
* the consumer could not read the empty klib in its dependencies

Issue #KT-36674 Fixed
2020-03-24 01:48:34 +03:00
Sergey Igushkin 066d413fb8 Add a test for host-specific metadata publishing and consumption 2020-03-24 01:48:34 +03:00
Sergey Igushkin 2478a57646 Rework source sets metadata consumption
* Add `ResolvedMppVariantsProvider` that provides variant names,
  platform artifacts, and metadata artifacts for MPP dependencies

* Rework SourceSetVisibilityProvider.kt so that it uses the
  `ResolvedMppVariantsProvider` to determine which source sets should be
  read from which metadata artifacts

* Rework `GranularMetadataTransformation` and its consumers so that:

  * it uses the
    visibility result and extracts the source set metadata from the
    host-specific artifacts whenever `SourceSetsVisibilityProvider`
    yields host-specific artifacts in the visibility results

  * it uses the new Gradle API for resolutionResults / artifactView

* Rework module IDs in the code base, unify the logic of their
  construction, also fix possible false-positive visibility in
  `applyToConfiguration` that used a module ID that mismatched the
  published module ID.
2020-03-24 01:48:33 +03:00
Sergey Igushkin 33ef4452b7 Always create shared-Native metadata compilations
Create the compilations even when all of the targets that the
shared-Native source set is compiled for are disabled on the current
host. In that case, disable the compilation task

Also clear the inputs of the disabled tasks so that when Gradle builds
the task graph it doesn't resolve the dependencies.

Otherwise, a Gradle build that includes the compile tasks of the
disabled targets in the task graph would fail as follows, e.g. on a
macOS host with a project containing a mingw target):

```
Could not determine the dependencies of task ':compileKotlinMingwX86'
...
Could not resolve all task dependencies for configuration
':mingwX86CompileKlibraries'
...
Could not find com.example:my-dependency-mingwx86:1.0
...
2020-03-24 01:48:33 +03:00
Sergey Igushkin 593869aa37 Fix incorrect unchecked cast in kotlin.metadata()
It was broken once the metadata target got K/N compilations along with
K2Metadata compilations.
2020-03-24 01:48:33 +03:00
Sergey Igushkin 94e3fa2132 (minor) Extract constants for XML nodes in project structure metadata 2020-03-24 01:48:33 +03:00
Sergey Igushkin f30aada84a If a source set is host-specific, publish it within the Native modules
Consider host-specific all source sets that participate in a compilation
of a target that cannot be built on some of the hosts.

Exclude those source sets from the `-metadata` artifact since the
`metadata` target must publish in the same way from any host.

Instead, add a metadata variant to those targets which use such a source
set and pack the source set's klib into a similar metadata JAR as the
artifact of those metadata variants.
2020-03-24 01:48:32 +03:00
Ilya Goncharov e6d39ce785 [Gradle, JS] True on check exit code in mocha
#KT-37668 fixed
2020-03-23 15:36:52 +03:00
Leonid Startsev f0dc809255 Add explicit api mode flag to top-level kotlin {} DSL block in Gradle
for both MPP and single-target projects.

For now, it is only applied to source sets that are connected to 'main'
compilation. It seems fine for all projects except android ones.
There's a way to determine android variant for source set,
but importing android projects seems to be made via other code path.

 #KT-36019 Fixed
 #KT-37652 Open
2020-03-20 19:41:06 +03:00
Ilya Goncharov 59148cdce4 [Gradle, JS] Fix extracting package json from klib
#KT-37636 fixed
2020-03-20 19:18:02 +03:00
Ilya Goncharov 40a0e31be4 [Gradle, JS] Add other devtools
#KT-37635 fixed
2020-03-20 19:13:24 +03:00