Commit Graph

3482 Commits

Author SHA1 Message Date
Sergey Rostov dface77b5c NodeJS Test runner: update build time dependencies 2019-07-12 12:47:21 +03:00
Sergey Rostov 38ff228bc8 Gradle, Tests runner: handle case when test runtime exits abnormally
In this case we should close all test nodes with failures and gracefully
close all other enclosing nodes.

#KT-32136 Fixed
2019-07-12 12:31:09 +03:00
Sergey Igushkin dfcd28da2c Use the direct test descriptor parent for test start events in Gradle
The reportingParent previously used for that purpose was null in test
start events, resulting in ungrouped tests.
2019-07-11 20:47:59 +03:00
Ilya Chernikov ab938efa68 Attempt to fix Windows detection in main-kts tests 2019-07-11 15:50:27 +02:00
Ilya Chernikov 382e55284c Fix legacy definitions error propagation
also fixes script-util test with resolving errors
2019-07-11 15:50:26 +02:00
Ilya Chernikov 9c004c3a52 Refactor scripting compiler plugin - move cli dependent parts out of the -impl jar
The kotlin-scripting-compiler-impl jar is used in the idea plugin and
therefore should not depend on the cli parts of the compiler to avoid
dependency from the plugin to the kotlin-compiler.jar.
Therefore the cli-dependent parts were moved to the scripting plugin
jar, which is used only in cli compiler based environments.
Also implement required abstractions to allow this movement and
drop some redundant dependencies to the cli parts in other projects.
2019-07-11 15:50:26 +02:00
Ilya Chernikov dc4370ff08 Implement support for new script customizations in command line compiler
refactor and fix internals in many places to make it work
add appropriate tests for main-kts case
2019-07-11 15:50:25 +02:00
Sergey Igushkin 701b9ce166 (minor) Minor corrections in K/A/30GradleIT#testOmittedStdlibVersion 2019-07-11 02:04:58 +03:00
technoir 15feeddc46 Allow omitting version of standard artifacts when kotlin-android plugin is used 2019-07-11 01:44:52 +03:00
Sergey Igushkin 0aa80d1912 Fix org.jetbrains.kotlin.native.disabledTargets registered as extension
Do not register an extension, use an extra property instead. This way,
it is less visible for a build author.

Hotfix for commit c292380aff
Issue #KT-29693
2019-07-10 21:12:23 +03:00
Sergey Igushkin 26a8c16166 Fix Gradle task input annotations for Gradle 5.5 checks
* Interface and abstract properties are now checked, too.
  For them, copy the @Input/@Internal annotations from the
  implementations (luckily, they were all consistent).

* Annotating a private property without a public accessor is not not
  allowed. Remove one such annotation.
2019-07-10 21:06:57 +03:00
Sergey Igushkin 4516902aaf Fix metadata transformation for non-published dependencies, KT-32225
Fix dependencies that are added in non-published source sets, which were
omitted from the requested dependencies since their configurations were
not added to the extendsFrom set of the merged configurations.

Also, don't resolve both merged configurations (compile and runtime) in
GranularMetadataTransformation, as the IDE can anyway import only the
compile-scoped dependencies from api & implementation.

Issue #KT-32225 Fixed
2019-07-10 19:37:03 +03:00
Sergey Igushkin dbc8007c63 Fix visibility for MPP dependencies from non-root source sets, KT-32204
Fix incorrect source sets visibility when a dependency is added to a
non-root source set and its visible source sets are mistakenly treated
as already visible by the dependsOn parents and are thus not extracted
from the metadata package.

To simplify the logic, reuse the GranularMetadataTransformation
instances from the dependsOn parent source sets: they can provide the
requested dependencies sets for the parents and their transformation
results, so that excluding the dependency source sets which are seen
the parents gets simpler.

The issue is then fixed by naturally excluding only the source sets
which are mentioned in the parents' transformation results.

Issue #KT-32204 Fixed
2019-07-10 19:36:57 +03:00
Sergey Rostov 4a8dbeda1b Gradle, webpack: add conventional archive properties
#KT-31890 Fixed
#KT-32209 Fixed
2019-07-10 13:26:56 +03:00
Sergey Rostov b6ca323a5e Gradle, karma, webpack: add required dependencies 2019-07-10 13:26:55 +03:00
Sergey Rostov 8b622955fe Gradle, js, minor: fix typos, formatting and imports 2019-07-10 13:26:55 +03:00
Sergey Rostov b68582656e Gradle, DtsResolver: use canonical path to avoid files duplication 2019-07-10 13:26:55 +03:00
Sergey Rostov 80068c0a40 Gradle, js: fix task annotations 2019-07-10 13:26:55 +03:00
Sergey Rostov 3c606c27a1 Gradle, js: support generating kotlin external declarations from .d.ts
#KT-31703 Fixed
2019-07-10 13:26:55 +03:00
Sergey Rostov 2fb4d23f1e Gradle, js, KotlinProjectNpmResolution: index by compilation 2019-07-10 13:26:54 +03:00
Sergey Rostov 7332290ece Gradle, js, NpmDependency: getDependenciesRecursively 2019-07-10 13:26:54 +03:00
Sergey Rostov 50e07330f4 Gradle, js, resolver, requireInstalled: close resolving if kotlinNpmResolve is up-to-date 2019-07-10 13:26:54 +03:00
Sergey Rostov 1860097c08 Gradle, js, npm resolver: support custom package json entries, index files and extensions 2019-07-10 13:26:54 +03:00
Sergey Rostov 88fa396d26 Gradle, js, resolver: don't skip reading lock file while skipping package manager execution 2019-07-10 13:26:54 +03:00
Sergey Rostov d1789b07ad Gradle, js, yarn: store resolved version and integrity hash to NpmDependency 2019-07-10 13:26:54 +03:00
Sergey Rostov d051748e2b Gradle, js, npm: support scopes 2019-07-10 13:26:54 +03:00
Sergey Rostov 5e6c76a6e7 Gradle, execWithProgress: report description as first progress 2019-07-10 13:26:53 +03:00
Sergey Rostov 638554ba1c Gradle, JS, resolver: don't add files that are not existed, add kjsm files 2019-07-10 13:26:53 +03:00
Sergey Rostov bcf894aba3 Gradle, JS, resolver: return null if npm dependency being resolved before kotlinNpmInstall 2019-07-10 13:26:53 +03:00
Sergey Rostov 8b0dffe182 Gradle, JS, compilation resolver: close dependent compilation resolver when it's packageJson task is up-to-date 2019-07-10 13:26:53 +03:00
Sergey Rostov 3658ad785f Gradle, JS, NpmResolutionManager: cleanup and document states 2019-07-10 13:26:53 +03:00
Sergey Rostov 327d75dc5d Gradle, JS: Extract NpmResolutionManager 2019-07-10 13:26:53 +03:00
Sergey Rostov 982f08ce7a Gradle, JS: replace NodeJs plugin and extension with NpmResolver plugin 2019-07-10 13:26:52 +03:00
Sergey Rostov 2f90742809 Gradle, JS: rework nodejs extensions and plugins
Get rid of Project.nodeJs
2019-07-10 13:26:52 +03:00
Sergey Rostov 24f08a614e Gradle, GradleNodeModulesCache: use new ProcessedFilesCache API 2019-07-10 13:26:52 +03:00
Sergey Rostov fd2d99e205 Gradle, ProcessedFilesCache: use file as target type (not string)
recompute removed target directories
2019-07-10 13:26:52 +03:00
Sergey Rostov 9679403831 Gradle, ProcessedFilesCache: optimize serialization
JSON kept for debugability
2019-07-10 13:26:52 +03:00
Sergey Rostov dff48b251d Gradle, JS: rework extension registering and resolver phasing
This allows to resolve projects lazily.

#KT-32393 Fixed
#KT-31565
#KT-32015
#KT-31917
2019-07-10 13:26:52 +03:00
Sergey Rostov f4dcc18baf Gradle, JS: rework NpmResolver
Now resolving works per compilation, so transitive dependency between
 compilations in same project can be resolved (KT-31917).

Resolving gradle configurations now occurs in separate
per-project `KotlinPackageJsonTask`s. Global install called in
`KotlinNpmInstallTask`. Tasks inputs configured, so tasks now
reported as UP-TO-DATE if nothing was changed.

#KT-31565 Fixed
#KT-32015 Fixed
#KT-31917 Fixed
2019-07-10 13:26:51 +03:00
Sergey Igushkin c292380aff Improve Kotlin/Native disabled targets warning, KT-29693
* Group all disabled targets from all subprojects in a single warning
* Make the warning optional, suggest disabling it with a Gradle property

Issue #KT-29693 Fixed
2019-07-09 16:01:18 +03:00
Ilya Gorbunov f8724654a1 Bit query and bit rotation functions for Int, Long, Short, Byte
#KT-12749
2019-07-08 19:09:32 +03:00
Ivan Gavrilovic f60bf5cb97 KT-31127: register only generated Java sources to AGP
When adding generated Java sources to AGP using Variant API,
add only Java sources. This was already done in
a6ae4494167c9d4cca23995457c59fb2daedad39 for Java projects, and this
commit fixes the same issue for Android projects.

Test: Kapt3Android33IT.testKotlinProcessorUsingFiler
2019-07-08 16:25:18 +09:00
Ilya Chernikov 80ada5113e Fix flaky test 2019-07-05 17:02:10 +02:00
Ilya Matveev ba64600ee5 Gradle: Make K/N properties uniform with other Kotlin properties
Names of project properties used by K/N (e.g.
org.jetbrains.kotlin.native.home) are not uniform
with other kotlin properties (e.g. kotlin.coroutines).

This patch renames these properties by dropping the
'org.jetbrains' prefix and adds corresponding
deprecation warnings.

Issue #KT-32302 Fixed
2019-07-02 19:46:50 +07:00
Ilya Matveev fd1fc7d28a Gradle: Support K/N restricted distribution
Restricted distribution is a K/N distribution built for MacOS only
alongside with a regular distribution and containing no platform
libraries for MacOS. This commit allows switching between
distribution types using a special project property.

Issue #KT-32301 Fixed
2019-07-02 19:46:49 +07:00
Ilya Matveev 35d7fff035 Gradle: Fix input annotation for the Webpack task 2019-07-02 19:46:48 +07:00
Sergey Rostov bb0f467f63 Gradle, JS: don't project.getTasksByName inside task realization callback
Or project evaluation would be called

#KT-32072 Fixed
2019-06-28 15:28:21 +03:00
Vyacheslav Gerasimov bdcf674c79 Build: Remove dependency on missing task :kotlin-main-kts:dist 2019-06-27 18:33:51 +03:00
Vyacheslav Gerasimov 2d6a3cb2c8 Build: Introduce flag for disabling jar post processing
proguard, relocation, etc.
2019-06-27 17:56:52 +03:00
Vyacheslav Gerasimov ca37cb0028 Build: Remove jps hacks from kotlin-main-kts-test 2019-06-27 17:56:50 +03:00