Commit Graph

10574 Commits

Author SHA1 Message Date
Ilya Chernikov 352fa7540c Fix versions in poms, etc, unmute and fix appropriate test 2022-04-22 15:04:26 +02:00
Yahor Berdnikau 5450367e39 Flip Gradle plugin kotlin_module names
Now common SourceSet output will have '_common' suffix, while all
variants will have the same name - '<module-name>.kotlin_module'.

This change is required for KSP as short-term workaround, as they
are using some internal properties/methods, which was mangled before
this change and hard to access in different variants.

^KT-52138 Fixed
2022-04-22 10:54:46 +00:00
sebastian.sellmair 99d995a313 [Commonizer] Implement integration test for KT-52050
The test project will be compiled and proves that
'platform.posix.DIR' retains it's 'CPointed' supertype.

The test is expected to fail on platforms that do not support
macos (windows and linux), since the issue seems to be caused
by optimistic, single platform propagation.
2022-04-22 08:47:36 +00:00
Hung Nguyen 862c0b0c9a Trivial cleanup for KotlinCompile.classpathSnapshotProperties
^KT-51978 Fixed
2022-04-21 17:34:02 +00:00
Hung Nguyen c109d3d95b Trivial cleanup for PlainTextBuildReportWriter
^KT-51978 In Progress
2022-04-21 17:34:02 +00:00
konstantin.tskhovrebov e974d16e7a Add KotlinArtifactsExtensionImpl code generator. 2022-04-21 08:32:28 +00:00
konstantin.tskhovrebov 3085f6bacf Extract kotlin artifacts public API. 2022-04-21 08:32:27 +00:00
konstantin.tskhovrebov 19dc91135c Add info comments to KotlinNativeLinkArtifactTask.kt 2022-04-21 08:32:26 +00:00
konstantin.tskhovrebov 5f0303698e Add kotlin artifacts config and object collections for extensibility.
Extending by external plugins:
project.kotlinArtifactsExtension.apply {
    artifactConfigs.all {
      //add custom extension to artifact config DSL
      (it as ExtensionAware).extensions.create("myConfig", Config::class.java)
    }
    artifacts.all {
      val config = it.extensions.findByName("myConfig") as Config
      //configure additional tasks, etc
      //here we can use artifact parameters
    }
}
2022-04-21 08:32:26 +00:00
konstantin.tskhovrebov 9430f0bafb Add artifacts collection inside KotlinArtifacts extension.
And make KotlinArtifact instances expandable via groovy machinery.
2022-04-21 08:32:25 +00:00
Alexander Likhachev feccc5785f [Build] Revert workaround introduced in 2f39a656 2022-04-20 14:27:18 +00:00
Alexander Likhachev 41daf39000 [Build] Fix deprecation warnings in KGP integration tests 2022-04-20 14:27:17 +00:00
Alexander Udalov 2e515f3945 Prohibit JVM target 1.6
But still compile stdlib, reflect, kotlin.test and scripting runtimes
with JVM target 1.6 to simplify migration from Kotlin 1.6 to 1.7.

 #KT-45165 Fixed
2022-04-19 22:54:40 +02:00
Alexander Udalov 1e800b8e18 Advance JVM target to 1.8 for kotlinx-metadata-jvm 2022-04-19 22:54:40 +02:00
Alexander Udalov 04cba8d767 Remove usage of JVM target 1.6 from HierarchicalMppIT
#KT-45165
2022-04-19 22:54:40 +02:00
Alexander Udalov ef6d30dd51 Remove usages of JVM target 1.6 from compiler tests
#KT-45165
2022-04-19 22:54:40 +02:00
Alexander Udalov f134575b86 Gradle: remove setJvmTargetFromAndroidCompileOptions
This flag was introduced for KT-21030 (see also KT-31027), to change JVM
target 1.6 to 1.8 if Android options declare source/target compatibility
with JDK 1.8.

After JVM target 1.8 became the default for Kotlin (KT-29405), the logic
was changed in e9436da858 to the reverse: if Android options declare
source/target compatibility 1.6, then also use JVM target 1.6. Note that
at that point, the problem with usages of default interface methods
described in KT-21030 became obsolete, because it described a runtime
crash when Kotlin tooling failed to recognized that JVM target >= 1.8
should be used -- which was now always the case, unless you explicitly
opted in with `-jvm-target 1.6` (which would make little sense).

Now that we're removing support for JVM target 1.6 in KT-45165, there is
no use in this flag anymore. Even if Android options declare
source/target compatibility 1.6, Kotlin should still use the minimal
supported version for the JVM target, which is now 1.8. And since 1.8
is the default, no changes to the compiler options are needed.
2022-04-19 22:54:40 +02:00
Yahor Berdnikau 25d6439471 Update AGP version in 'android-test-fixes' plugin
This aligns version with other Gradle plugins.
2022-04-19 18:15:05 +02:00
Yahor Berdnikau 6ed0efedd3 Add workaround for Gradle dependency resolution error
Gradle throws unexpected error on dependency resolution without
this workaround.

Related to KT-51837
2022-04-19 15:38:33 +02:00
Vyacheslav Gerasimov bfe8306f62 Don't finalize gradle tests with cleanTestKitCacheTask on Teamcity
It may fail on Windows because of locked files and not really necessary
because TeamCity can clean up checkout directories when space needed
2022-04-19 11:45:23 +00:00
Vyacheslav Gerasimov 202347865d Move gradle testKit cache to the build directory 2022-04-19 11:45:23 +00:00
Vyacheslav Gerasimov d9e8f0c180 Build: Rework test workers calculation with respect to available memory
#KTI-787
2022-04-19 11:45:23 +00:00
Alexander Likhachev 079400796a [Build] Validate Gradle plugins on install 2022-04-19 00:39:25 +03:00
Alexander Likhachev eda759ba31 [Build] Avoid buildscript root capture into task action
#KT-44611 In Progress
2022-04-19 00:39:24 +03:00
Alexander Likhachev 64aae756d1 [Build] Avoid project usages in jdk6 tests
#KT-44611 In Progress
2022-04-19 00:39:24 +03:00
Alexander Likhachev 899964ba30 [Build] Update gradle-node-plugin to 3.2.1
#KT-44611 In Progress
2022-04-19 00:39:21 +03:00
Alexander Likhachev e42bed07fa [Build] Temporary disable hmpp metadata tasks with CoCa
Should be reverted when KT-49933 is resolved
#KT-44611 In Progress
2022-04-19 00:35:35 +03:00
Alexander Likhachev 2f39a65679 [Build] Add workarounds for https://github.com/gradle/gradle/issues/17936
#KT-44611 In Progress
2022-04-19 00:33:36 +03:00
Alexander Likhachev aa3b653847 [Build] dependencies-maven-all: use ArchiveOperations service
`normalizeComponentsXmlEndings` task was using `zipTree` method of `project`. The `ArchiveOperations` method should be used to work properly with configuration cache.
#KT-44611 In Progress
2022-04-19 00:33:34 +03:00
Alexander Likhachev f4b17ff78f [Build] kotlin-test: cross-project task dependencies -> artifacts sharing for combinedSourcesJar
It's recommended way to work with such setups, and the former way itn't work properly with Gradle configuration cache
#KT-44611 In Progress
2022-04-19 00:33:33 +03:00
Ilya Gorbunov a03999fe81 Rename DefaultTimeMark to TimeSource.Monotonic.ValueTimeMark 2022-04-14 16:54:32 +00:00
Ilya Gorbunov 77cf41c189 Saturate overflowing values when adjusting time marks
KT-46132
2022-04-14 16:54:31 +00:00
Ilya Gorbunov f32e0f3cba Provide specialized TimeSource.Monotonic for wasm
KT-46132
2022-04-14 16:54:30 +00:00
Ilya Gorbunov fede70d0d5 Make TimeMark returned by TimeSource.Monotonic a value class
This value class wraps Long on JVM and Native thus reducing allocations
in time measurement scenarios when the default monotonic time source is
statically known.

KT-46132
2022-04-14 16:54:30 +00:00
Yahor Berdnikau 5b45ea9bc9 Introduce KotlinBasePlugin
This interface is a top-level interface for all Kotlin plugins.
Additionally it provides 'pluginVersion' property allowing to get
current applied plugin version

^KT-50869 Fixed
^KT-48008 Fixed
2022-04-14 16:15:42 +00:00
Ivan Gavrilovic ca193a89d2 [Gradle] Add APIs that allow AGP to configure Kotlin compilation
Add APIs that describe tasks, so that AGP can configure them. This
change all adds support to *Config objects to support configuring
tasks when there is no access to internal KGP objects.

^KT-50869 In Progress
2022-04-14 16:15:42 +00:00
Ivan Gavrilovic 46cb4902e1 [Gradle] Move more task inputs to properties
... move more configuration logic to TaskConfigAction classes. This is
to avoid directly accessing tasks to configure them. The TaskConfigAction
objects should eventually have access to all information that is required
to configure the task, and they should compute the final values of
all properties.

This will also allow 3P plugins to configure Kotlin tasks, without
the need to create KGP internal objects.

^KT-50869 In Progress
2022-04-14 16:15:41 +00:00
Jerome Prinet 769f4c630f Update Gradle Enterprise plugins versions 2022-04-14 14:21:31 +03:00
Jerome Prinet c067026133 Set task dependencies 2022-04-14 14:21:31 +03:00
Jerome Prinet 61b12c9dbf Fix AbstractArchiveTask deprecations 2022-04-14 14:21:31 +03:00
Jerome Prinet 6aec88446a Fix JavaExec.main deprecation 2022-04-14 14:21:31 +03:00
Kevin Bierhoff 9fe6e97cb8 Extensions for java.util.Optional (KT-50484)
Co-authored-by: Ilya Gorbunov <ilya.gorbunov@jetbrains.com>
2022-04-13 14:34:06 +03:00
Ilya Gorbunov f3cf8cc13b Hide subarrayContentToString in Native&Wasm 2022-04-12 15:03:40 +00:00
Ilya Gorbunov 1845e326d1 Hide deprecated Double/FloatArray.contains/indexOf/lastIndexOf 2022-04-12 15:03:40 +00:00
Ilya Gorbunov b35c571a23 Remove deprecated sequence and iterator builders
They were originally provided for migration from experimental coroutines

#KT-26678
2022-04-12 15:03:39 +00:00
Ilya Gorbunov 2303730d57 Remove deprecated and not stabilized primitive unsigned iterators 2022-04-12 15:03:38 +00:00
Ilya Gorbunov 4598552e46 Promote Regex.matchAt and matchesAt to Stable #KT-51470 2022-04-12 15:03:37 +00:00
Ilya Goncharov d62b01ef41 [JS] Update lock files
Merge-request: KT-MR-6073
Merged-by: Ilya Goncharov <Ilya.Goncharov@jetbrains.com>
2022-04-12 15:02:21 +00:00
Yahor Berdnikau 2c252f9231 Print in info level logs applied plugin variant
^KT-49227 Fixed
2022-04-12 14:48:49 +00:00
Yahor Berdnikau e8774448ee Allow to register specific variant implementations
Such way those implementations are accessible from the common code.
 To avoid putting stub implementations in every variant, it is also
 possible to add default implementation from the common code if variant
 hasn't register own.

 As an example of usage, support for removed in Gradle 7.0 'maven' plugin
 was moved into 'main' variant (Gradle 6.7.1 - 6.9.3).

 ^KT-49227 In Progress
2022-04-12 14:48:48 +00:00