Commit Graph

300 Commits

Author SHA1 Message Date
Yahor Berdnikau a49906f4e4 Bump AGP dependency version to 4.2.2
^KT-56454 Fixed
2023-02-24 09:17:47 +00:00
Yahor Berdnikau 96316a4016 Generate KotlinNativeCompilerOptions Gradle DSL
^KT-53108 In Progress
2023-02-22 13:02:59 +00:00
Anton Lakotka 5b0a9c7a55 [Gradle] Update kotlin-gradle-plugin-api.api
^KT-55881 Verification Pending
2023-02-21 10:15:37 +00:00
Anton Lakotka 1b3b83755e [Gradle] Add withSourcesJar to gradle dsl
* Each target can be configured to either publish or not its sources.
* For convenience withSourcesJar available also on kotlin multiplatform
  extension level. It then calls `withSourcesJar` for each target.

^KT-55881 In Progress
2023-02-21 10:15:36 +00:00
Dmitriy Novozhilov 66544a4e00 Switch kotlin version to 1.9
with appropriate fixes in testdata, tests and other
places.
2023-01-30 09:29:55 +00:00
Stanislav Ruban 4523535545 Deprecate -Xuse-k2 compiler flag in Gradle DSL
^KT-56239 Fixed
2023-01-27 12:42:50 +00:00
Sebastian Sellmair 294014a85d [Gradle][Minor] KotlinTargetHierarchyDsl: Fix doc pointing to old function
KT-56204
2023-01-26 15:37:23 +00:00
Sebastian Sellmair ca859c0132 [Gradle] KotlinTargetHierarchy: Change naming from 'any' to 'with' prefix
^KT-56204 Verification Pending
2023-01-26 15:37:23 +00:00
Artem Kobzar 71486a321c [K/JS] Add support of compilation with ES-classes 2023-01-17 18:14:17 +00:00
Mikhail Glukhikh 3dc05f4ec5 Introduce language version 2.0 and associate K2 compiler with it 2023-01-16 18:12:55 +01:00
Yahor Berdnikau f90b447c7f Add task to generate Kotlinlang reference
Based on the template from
https://github.com/JetBrains/kotlin-web-site/tree/master/dokka-templates.
Template itself is updated frequently and should be added by CI
configuration.

Generated reference has versioning support. Older generated references
should put into:
<project_dir>/<build_dir>/dokka/kotlinlangDocumentationOld

^KT-55520 Fixed
2023-01-13 16:16:09 +00:00
Yahor Berdnikau d3ecb9a75f Allow to reference Gradle API javadoc in generated documentation
^KT-55520 In Progress
2023-01-13 16:16:09 +00:00
Yahor Berdnikau 4de60879f0 Explicitly enable Dokka javadocs generation
Actually we don't need javadoc generation for our internal stuff like
':kotlin-gradle-plugin'. But ':kotlin-gradle-plugin-api' is a public api
 and should have properly generated javadocs.

^KT-55520 In Progress
2023-01-13 16:16:08 +00:00
Pavel Kirpichenkov 40f7360694 [cinterop] Deprecate CInteropSettings#getDependencyConfigurationName
KT-55908
KT-54974
2023-01-13 14:24:18 +00:00
Stanislav Erokhin 37ab139139 [Gradle][MPP] Deprecate several K/N targets 2023-01-11 17:52:28 +00:00
Anton Lakotka 0e3be164c7 [Gradle] Update kotlin-gradle-plugin-api after removing...
... `getRelatedConfigurationNames` override.

This property shouldn't be used in user scripts. It supposed to be
internal.
2023-01-11 12:32:58 +00:00
Anton Lakotka eaa3eadc9e Remove metadataConfiguration for source set and reuse
resolvableMetadataConfiguration
2023-01-11 12:32:55 +00:00
Anton Lakotka 35b2672436 [Gradle] Deprecate scoped metadata dependencies
Scoped metadata dependencies are not needed since
metadata dependencies are used only for metadata compilation. Metadata
is not consumed at runtime. Therefore, scoped metadata dependencies
are not required.

^KT-55312
2023-01-11 12:32:55 +00:00
Yahor Berdnikau b9aac83135 Add Kotlin Gradle plugins bom
This should help with failed variants selection between different Kotlin
 Gradle plugins versions.

 ^KT-54691 In Progress
2023-01-05 18:26:27 +00:00
Ilya Goncharov a0211fc5fe [Gradle, JS] Deprecation of BOTH and LEGACY consts
^KT-55593 fixed
2023-01-03 12:47:11 +00:00
Alexander Udalov 3c4b5529af Update year to 2023 in COPYRIGHT_HEADER.txt
This commit is the result of changing the year to 2023 in
COPYRIGHT_HEADER.txt and running all `generate*` tasks in
`generators/build.gradle.kts`.
2023-01-02 22:52:15 +01:00
Yahor Berdnikau 860d3fda95 Undeprecate 'kotlinOptions' DSL
'@ReplaceWith' is not that flexible in this case and proper IDE support
required for smooth migration. After such migration in IDE will be added
 - deprecation should be restored.

 ^KT-54399 Fixed
2022-12-16 17:25:49 +00:00
Anton Lakotka 36591ab8a0 [Gradle] Replace toLowerCase/toUpperCase with ASCII-only variants
^KT-38712 Verification Pending
2022-12-12 10:47:44 +00:00
Anton Lakotka 1d041b7ef4 [Gradle] Replace deprecated String::capitalize with capitalizeAsciiOnly
This should prevent issues when ascii characters are uppercased or
lowercased on users machines with their locales.

For example in Turkish locale:
* 'i' uppercases to 'İ'
* 'I' lowercases to 'ı'

^KT-38712 Verification Pending
2022-12-07 20:39:26 +00:00
Anton Lakotka 98678bce0a [Gradle] Remove metadata dependencies transformation for runtimeOnly
Kotlin Metadata KLIBs cannot be used in runtime thus
we don't have to transform composite JARs that contain
metadata per source set for runtimeOnly dependencies scopes.

^KT-55230 Fixed
2022-12-06 12:49:27 +00:00
Sebastian Sellmair f8919533dc [Gradle] Update kotlin-gradle-plugin-api.api
KT-55218
2022-12-06 08:35:17 +00:00
Sebastian Sellmair 8bea195d68 [Gradle] KotlinTargetHierarchyBuilder: Use any prefix for target functions
... to disambiguate with target preset functions

KT-55218
2022-12-06 08:35:16 +00:00
Andrey Uskov 41ff283856 Don't call File.getCanonicalPath in KGP
Relates to KT-54579.
2022-12-04 18:49:30 +00:00
Anton Lakotka f72b67a5ca [Gradle] Update kotlin-gradle-plugin-api.api
Add new field `sourcesElementsConfigurationName` to KotlinTarget

^KT-36943
2022-12-01 18:57:03 +00:00
Anton Lakotka 3fa85bf7fd [Gradle, MPP] Publish sources as gradle variants
Now when MPP library is published it will contain "sourcesElements"
variant for each target and one for common code.

Sources variants are published under gradle attributes that were
borrowed from Java Gradle Plugin for consistency reasons.
This makes it compatible with JVM tooling that rely on these attributes.

^KT-36943 Verification Pending
2022-12-01 18:57:02 +00:00
Artem Daugel-Dauge 4f736524b2 KT-54969 Kotlin artifacts withPodspec DSL 2022-11-27 18:09:38 +00:00
Sebastian Sellmair e5398e6be7 [Gradle][Minor] Move KotlinTargetComponent into separate source file
KT-54981
2022-11-21 07:33:17 +00:00
Ilya Gorbunov 59131f8138 Use BCV plugin to dump and check public API of Kotlin Gradle plugin-related artifacts 2022-11-18 06:00:18 +00:00
Ilya Goncharov 54a166b2a3 [Gradle, JS] Deprecate for users to not use on their scripts 2022-11-01 14:08:55 +00:00
Ilya Goncharov 8dbdfb4591 [Gradle, JS] Generate externals inside top level dependencies with deprecation 2022-11-01 14:08:54 +00:00
Sebastian Sellmair f148390e14 [Gradle] Rename KotlinCompilationData to GradleKpmCompilationData
^KT-54312 Verification Pending
2022-10-27 09:13:16 +00:00
Sebastian Sellmair b3d82c74fe [Gradle] KotlinCompilation: Remove .ownModuleName vs .moduleName duplication
This mechanism is simply not necessary anymore.
Just using the 'ownModuleName' as the value of 'moduleName' is
sufficient.

^KT-54312 Verification Pending
2022-10-27 09:13:16 +00:00
Sebastian Sellmair c71517399e [Gradle] Remove Compiler.*Options typealias
^KT-54312 Verification Pending
2022-10-27 09:13:10 +00:00
Sebastian Sellmair 69b7cef2e2 [Gradle] Restore AbstractKotlinCompilation and AbstractKotlinCompilationToRunnableFiles...
... into KotlinCompilation class hierarchy (scheduled for removal later)

KT-54312
2022-10-27 09:13:08 +00:00
Sebastian Sellmair 4cbd715b17 [Gradle] Implement Kotlin*NativeCompilations with underlying KotlinCompilationImpl
KT-54312
2022-10-27 09:13:06 +00:00
Sebastian Sellmair a67b2a8be5 [Gradle] Implement KotlinJvmCompilation with new underlying KotlinCompilationImpl
KT-54312
2022-10-27 09:13:06 +00:00
Sebastian Sellmair aef7512477 [Gradle][Minor] Move KotlinCompilationOutput into separate source file
KT-54312
2022-10-27 09:13:01 +00:00
Sebastian Sellmair b5327bc46e [Gradle][Minor] Move Kotlin2JvmSourceSetProcessor into separate source file
KT-54312
2022-10-27 09:12:57 +00:00
sebastian.sellmair c332c928fc [Gradle][MPP] Refine naming for KotlinTargetHierarchyBuilder
^KT-53570 Verification Pending
2022-10-24 14:34:49 +00:00
Sebastian Sellmair da8a18920d [Gradle][MPP] Mark KotlinTargetsContainer and KotlinTargetHierarchyBuilder with KotlinTargetsDsl annotation
To prevent confusing shortcuts defined on `KotlinTargetsContainer`
when declaring a KotlinTargetHierarchy:

e.g.

```kotlin
kotlin {
    targetHierarchy.default {
        common {
            ios() // <- [DSL_SCOPE_VIOLATION]
            //'fun ios(): Unit' can't be called in this context
            // by implicit receiver. Use the explicit one if necessary
        }
    }
 }
```

^KT-53570 Verification Pending
2022-10-24 14:34:48 +00:00
Sebastian Sellmair 1823e0fad4 [Gradle][MPP] KotlinTargetHierarchyBuilderImpl: only build child groups if explicitly included
^KT-53570 Verification Pending
2022-10-24 14:34:47 +00:00
Sebastian Sellmair 487368d9df [Gradle][MPP] KotlinTargetHierarchyDescriptor: Remove function supertype
^KT-53570 Verification Pending
2022-10-24 14:34:47 +00:00
Sebastian Sellmair a8a861e1ce [Gradle][MPP] KotlinTargetHierarchyBuilder: implement w/ include & exclude predicates
^KT-53570 Verification Pending
2022-10-24 14:34:47 +00:00
Sebastian Sellmair c5d6162578 [Gradle][MPP] Implement initial KotlinTargetHierarchy APIs
^KT-53570 Verification Pending
2022-10-24 14:34:46 +00:00
Ilya Goncharov c7fff95231 [JS] Warning on npm dependencies with generateExternals declaration 2022-10-18 14:01:26 +00:00