Andrey Uskov
63925ee018
Implemented collecting projectId from Gradle
...
#KT-45337 Fixed
2021-03-07 19:40:08 +03:00
Yahor Berdnikau
58564a7b89
Distinguish outputs of JS IR tasks.
...
Now JS IR link and sync tasks will output produced artifacts based on
compilation name, binary name and binary mode. This will remove
Gradle 7 error about missing task dependencies, which should not depend
on each other.
^KT-44949 In Progress
2021-03-06 19:43:50 +01:00
Yahor Berdnikau
e17aa5efaa
Change source jar duplication error to warning.
...
For now Gradle 7 will print warnings on publishing sources jar containing
duplicate files.
Duplicates are coming from SourceSets SourceSet added to sources jar
task depends on. Such approach should be rethought.
^KT-44949 In Progress
2021-03-06 19:43:49 +01:00
Yahor Berdnikau
d78f579a42
Link task producing jar with sources to dukat tasks.
...
This required by Gradle 7 task validation.
Though in some cases sourcesJar task should not depend in some cases on Dukat tasks.
^KT-44949 In Progress
2021-03-06 19:43:49 +01:00
Yahor Berdnikau
2a8e2613a2
Split klib and cinterop outputs.
...
So Gradle 7 will not complain that some tasks using klib or cinterop
should depend on both tasks producing klib and cinterop, while they
don't need both.
^KT-44949 In Progress
2021-03-06 19:43:49 +01:00
Yahor Berdnikau
db2d6c7e0a
Ensure compilation task depends on friend artifact producer task.
...
Without it Gradle 7.0 tasks dependency validation will fail.
Fix JS tasks are not cacheable due to friends inputs change.
^KT-44949 In Progress
2021-03-06 19:43:49 +01:00
Cedric Champeau
0340a89045
Fix File as input of an artifact transform
...
Using `File` as input of an artifact transform was deprecated.
With Gradle 7, this becomes an error. This commit fixes the
problem by using the proper replacement:
Provider<FileSystemLocation>
2021-03-06 15:46:07 +03:00
Yahor Berdnikau
297aa17b6e
Fix Jvm target tries to use removed configuration.
...
KT-44949 In Progress
KT-44957 Fixed
2021-03-05 16:28:03 +03:00
Yahor Berdnikau
117cfc763a
Fix JS target configuration triggers task creation too early.
...
This raised the problem that task, compilation task depends on, has not
been yet created and Gradle fails the build with exception.
KT-44949 In Progress
2021-03-05 16:28:01 +03:00
Yahor Berdnikau
d06ec61b79
Migrate to the actual workers api available from Gradle 5.6.
...
Old api was removed in Gradle 7 and causes build crashes.
KT-44949 In Progress
2021-03-05 16:28:00 +03:00
Bingran
03df752e8e
Update min supported gradle version to 6.1
...
This PR also updates the min agp version we test with because older agp
versions are using gradle apis which doesn't exist in gradle 6.0+.
GH PR: #4155
2021-03-05 14:11:10 +03:00
Alexander Likhachev
70d434e992
Update tests after compiler properties rework
...
#KT-43605 Fixed
2021-03-04 19:36:18 +03:00
Alexander Likhachev
3537c699b5
[Gradle] Read system properties at configuration time using Gradle providers
...
The change is a step to fully support Gradle configuration cache.
Relates to #KT-43605
Relates to #KT-44611
2021-03-04 19:36:11 +03:00
Ivan Gavrilovic
d73f5d299a
KAPT - Make StructureTransformAction cacheable
...
When computing classpath structure ignore absolute
paths and timestamps. This also makes the transform
cacheable and it should increase cache hit rate.
Test: existing BuildCacheRelocationIT
2021-03-04 19:00:14 +03:00
Ivan Gavrilovic
08446e2371
KT-45168: Avoid generating stubs for generated Kotlin sources
...
Filter out Kotlin sources coming from KAPT-generated dirs.
Some annotation processors e.g Moshi, generate Kotlin sources,
and when generating stubs in non-incremental runs, stub generation
must ignore those sources. This fixes #KT-45168.
Test: Kapt3IT
2021-03-03 11:35:29 +03:00
Yaroslav Chernyshev
7d766add4b
Add lambda configurable languageSettings function in KotlinSourceSet
...
Function with Groovy Closure is already exists, it provides DSL parity
#KT-44834 Fixed
2021-03-02 16:32:06 +03:00
Stanislav Erokhin
f77ba914c7
[MERGE] Kotlin/Native history merged into kotlin/master
2021-02-26 15:30:58 +01:00
Alexander Likhachev
9d140cacc0
[Gradle, K/N] Create compiler download temp dir inside target dir
...
Motivation is to make directory moving more likely atomic
Relates to KT-39016
2021-02-26 16:11:19 +03:00
Alexander Likhachev
172b5f9621
[Gradle, K/N] Unpack compiler into temp directory then move to proper place
...
#KT-39016 Fixed
2021-02-26 16:11:14 +03:00
Vasily Levchenko
f051119c4b
[tests][kotlin-gradle-plugin] workaround for old k/n artifacts
2021-02-26 12:51:52 +01:00
Vasily Levchenko
5c80dbfd4b
[kotlin-gradle-plugin] workaround for old k/n artifacts
2021-02-26 12:51:52 +01:00
Ilya Goncharov
80a0545ac2
[Gradle, JS] Fix ProcessedFilesCache.kt according to configuration cache
2021-02-26 14:32:51 +03:00
Alexander Likhachev
ef890464d8
[Gradle] Rework KotlinTestReport to be compatible with configuration cache
...
Minimal supported version is effectively changed to 6.1 due to usage of Gradle build services
Relates to #KT-43605
2021-02-26 13:49:01 +03:00
Alexander Likhachev
3e09bb3d3f
[Gradle] Bump gradle-download-task version to 4.1.1 to support configuration cache
...
Relates to #KT-44611
2021-02-26 13:49:00 +03:00
Alexander Likhachev
67632a495b
[Gradle, MPP] Rework build finished listener into build service
...
Registering build finished listeners is not supported by configuration cache
Relates to #KT-44611
#KT-44900 Fixed
2021-02-26 13:48:59 +03:00
Stefan Wolf
d88ef64288
Remove references to validateTaskProperties
...
The task is now called `validatePlugins`.
2021-02-23 23:26:41 +03:00
Stefan Wolf
200ef832d2
Add PathSensitive annotation to all input file properties
...
So new validation which will be added in Gradle 7.1
won't cause warnings during the build.
2021-02-23 23:26:39 +03:00
Stefan Wolf
8b01df6772
Enable stricker Kotlin Gradle Plugin validation
2021-02-23 23:26:35 +03:00
Aleksandr Liublinskii
08cf78fafd
MI-141 Fix 'Empty Library' entry in module dependencies
2021-02-22 12:25:47 +01:00
Alexander Udalov
1d6b198915
Build: suppress version and JVM target warnings
...
To further reduce the output on each build.
2021-02-18 12:17:17 +01:00
Hyojae Kim
82ac482143
Fix typo ( #4051 )
...
Fix typo
2021-02-18 12:28:19 +03:00
sebastian.sellmair
4500b6ce74
[Commonizer] Implement :native:kotlin-klib-commonizer:api with support for library commonization
...
- Implement new Gradle module ':native:kotlin-klib-commonizer'
- Implement new NativeKlibCommonize task
- Implement CommonizerTarget.identityString
2021-02-17 19:24:54 +00:00
Yahor Berdnikau
440fc8c4e4
Deprecated 'kotlin.useCompilerFallbackSearch' property.
...
This property was introduced in 2018 and no longer supported.
See https://discuss.kotlinlang.org/t/how-to-set-usefallbackcompilersearch/9039
for details why it was introduced.
2021-02-15 12:43:22 +01:00
Yahor Berdnikau
069941cdaf
Provide compiler classpath as task input.
...
This ensures that compiler classpath is what is expected
by Kotlin Plugin and removes possibility of leaking wrong jars
from Gradle wrapper classpath.
For 'kotlin.useFallbackCompilerSearch' old behaviour is still present,
but this option should be marked as deprecated and removed in one
of the Kotlin releases.
2021-02-15 12:43:18 +01:00
Yaroslav Chernyshev
8acf3b1d76
[Cocoapods] Fail import if project's version wasn't specified
...
#Fixed KT-44000
2021-02-15 12:39:40 +03:00
Alexander Likhachev
b463a0fa58
[Gradle] Use property provider for configuration time only if available
2021-02-15 09:58:51 +03:00
Alexander Likhachev
683bd0ed38
[Gradle, JVM] Don't create deprecated compile/runtime configurations
...
Gradle also removes these configurations in 7.0. See gradle/gradle@2cb45cdbd0
#KT-44462 Fixed
2021-02-15 09:35:54 +03:00
Alexander Likhachev
ef458b20e1
[Gradle] Replace deprecated dependencies configurations in buildscript
2021-02-15 09:21:44 +03:00
Alexander Likhachev
383b9834a1
[Gradle, K/N] Make BitcodeEmbeddingMode move backward compatible
2021-02-15 09:21:44 +03:00
Alexander Likhachev
cbeb031099
[Gradle, K/N] Move NativeBinaryTypes from kotlin-gradle-plugin to kotlin-gradle-plugin-api
2021-02-15 09:21:44 +03:00
Alexander Likhachev
a6cdfeafed
[Gradle, K/N] Consumable frameworks review fixes
2021-02-15 09:21:43 +03:00
Alexander Likhachev
604dda839a
[Gradle, K/N] Generate fat framework tasks and consumable configurations
2021-02-15 09:21:43 +03:00
Alexander Likhachev
d844296629
[Gradle, K/N] Add user-defined variant attributes to framework artifact
2021-02-15 09:21:43 +03:00
Alexander Likhachev
cbdcd8f2bc
[Gradle, K/N] Add consumable configuration with K/N frameworks
2021-02-15 09:21:42 +03:00
Alexander Likhachev
ba969410c2
[Gradle, JS] Make MultiplePluginDeclarationDetector compatible w/ conf cache
2021-02-15 09:21:42 +03:00
Alexander Likhachev
1cceec3642
[Gradle, JS] Postpone TeamCity project property read using 'by lazy'
...
Replace direct Gradle property access to provider usage. See https://docs.gradle.org/6.8.2/userguide/configuration_cache.html#config_cache:requirements:undeclared_gradle_prop_read
2021-02-15 09:21:42 +03:00
Alexander Likhachev
240fdfa7a8
[Gradle] Support multiple failures in KotlinTestReport back again
2021-02-15 09:21:42 +03:00
Alexander Likhachev
a6bf9bf51b
[Gradle, JS] Remove workaround for configuration cache enabled builds
...
It's removed as those tasks now support Gradle configuration cache
2021-02-15 09:21:41 +03:00
Alexander Likhachev
432c6486d5
[Gradle] Make KotlinTest, KotlinTestReport partially cc-compatible
2021-02-15 09:21:41 +03:00
Alexander Likhachev
c7421e2bea
[Gradle, JS] Use FileSystemOperations only when it's available
...
FileSystemOperations is available since Gradle 6.0. ArchiveOperations usage is also refactored. Integration tests Gradle version requirements are reverted.
2021-02-15 09:21:41 +03:00