66 Commits

Author SHA1 Message Date
Artem Kobzar 77f0cba23f [K/JS] Introduce v2015 target 2024-03-06 12:21:38 +00:00
Yahor Berdnikau 4921a29aa5 [Gradle] Deprecate dceOptions in KotlinJsDce task
^KT-63419 In Progress
2024-02-28 21:20:18 +00:00
Yahor Berdnikau 2f70478e67 [Gradle] Deprecate kotlinOptions DSL in KotlinCompile DSL
^KT-63419 In Progress
2024-02-28 21:20:18 +00:00
Yahor Berdnikau 433bec3700 [Gradle] Deprecate kotlinOptions DSL in KotlinCompilation
^KT-63419 In Progress
2024-02-28 21:20:18 +00:00
Yahor Berdnikau bdb96dc0db [Gradle] Rename to HasConfigurableKotlinCompilerOptions
Added "Kotlin" to better indicate to what this interface belongs to.

^KT-65196
2024-02-26 19:32:26 +00:00
Ilya Goncharov d02be30e3b [Gradle, JS] Return back deprecated options noStdlib and metaInfo 2024-02-09 18:20:08 +00:00
Ilya Goncharov 2340d59f40 [JS] Get rid of outputFile in compiler args (KT-61116)
^KT-56753 fixed
2024-02-09 18:20:08 +00:00
Yahor Berdnikau facc9cdb58 [Gradle] Add compiler options DSL for Kotlin targets
Restore compiler options DSL for all Kotlin targets. 'KotlinTarget'
interface does not provide any common way to configuring options - this
is the responsibility of related plugin extensions.

From the hierarchical standpoint of view target DSL overrides options
configured in the extension.

^KT-57292 In Progress
2024-01-19 14:16:11 +00:00
Yahor Berdnikau e527781772 [Gradle] Introduce HasConfigurableCompilerOptions DSL interface
This interface should be attached to the KGP DSL entities that want to
provide an ability to configure Kotlin compiler options.

^KT-60733 In Progress
2024-01-19 14:16:11 +00:00
Yahor Berdnikau e8704cc556 Revert "[Gradle] Add deprecated accessor to sourceSets inside KotlinSourceSet"
This reverts commit 5fba2962b9.
2024-01-10 22:10:59 +00:00
Yahor Berdnikau 5fba2962b9 [Gradle] Add deprecated accessor to sourceSets inside KotlinSourceSet
Apparently, using such an approach is a popular case especially for
configuring 'dependsOn' parameter. And we should simplify user migration
 to more restricted DSL.

^KT-64722 Verification Pending
2024-01-08 14:07:50 +00:00
Yahor Berdnikau 2af60a5e27 [Gradle] Add deprecated access to sourceSets container inside KotlinTarget
This should keep compatability with user scripts that for any reason tried to configure 'sourceSets' container inside KotlinTarget, but keep such users warned.

^KT-57292 In Progress
2023-12-21 10:30:50 +00:00
Yahor Berdnikau 36e85fec95 [Gradle] Introduce public KotlinGradlePluginDsl marker annotation
The purpose of this annotation is to distinguish different levels of DSL
 in KGP:
- top level extension
- target level DSL
- compilation level DSL

With this marker user should not be able to call implicit methods from
upper levels of DSL, and it should reduce confusion with DSL usage.

^KT-57292 In Progress
2023-12-21 10:30:50 +00:00
Yahor Berdnikau 1671c41652 [Gradle] Update KDoc for Kapt extension
^KT-58858 In Progress
2023-12-07 16:19:24 +00:00
Yahor Berdnikau e50f6e6bca [Gradle] Add '@JvmStatic' annotation to companion methods in Kotlin types
This should improve usability in groovy scripts.

^KT-63601 Fixed
2023-11-29 10:24:23 +00:00
Yahor Berdnikau ffa6bfc95e [Gradle] Partially restore top-level compiler options DSL in MPP
To support configuring free compiler arguments for all shared source
sets (KT-61573), we restore 'compilerOptions { }' DSL in the
multiplatform extension.

To avoid user confusion on accidentally using 'compilerOptions {}'
inside Kotlin targets and Kotlin compilations DSL, similar methods with
ERROR deprecation level were added into `KotlinTarget` and
`KotlinCompilation` interfaces. Invoking these interfaces will throw
UnsupportedOperationException. Such an approach works both for Kotlin
and Groove Gradle scripts.

^KT-63491 Fixed
2023-11-21 14:06:17 +00:00
Ilya Goncharov 94ce4c06a7 [Gradle, Wasm] Use separate hierarchical methods for JS and wasi
^KT-63417 fixed
2023-11-20 10:30:58 +00:00
Ilya Goncharov 22a01432df [Gradle,JS] Remove legacy target in Gradle plugin
This reverts commit 4c82206d

^KT-60694 fixed
2023-10-17 09:42:38 +00:00
Sebastian Sellmair 4c15509776 [Gradle] Rename KotlinExtensionPoint to KotlinGradlePluginExtensionPoint
KT-61634
2023-10-12 18:24:17 +00:00
Sebastian Sellmair 30665c3e02 [Gradle] Implement KotlinExtensionPoint to allow extensible designs inside the KotlinGradlePlugin
KT-61634
2023-10-12 18:24:17 +00:00
Sebastian Sellmair 1dad890652 [Gradle][KMP] Remove top level and target level compilerOptions APIs
as those experimental APIs have shown to negatively affect usages
of stable APIs (because of resolve confusion), whilst also
failing to address popular use cases.

KT-61636
KT-61355
KT-61368
2023-10-04 12:23:39 +00:00
Dmitrii Krasnov 8299fffae2 Added possibility to create a custom usable KotlinCompile task without using internals ownModuleName and moduleName
#KT-60541 Ready for Review
2023-08-31 09:37:21 +00:00
Sebastian Sellmair 02c2c76ffe [Gradle] Remove ':kotlin-project-model' and ':kotlin-project-model-tests-generator'
KT-61463
2023-08-29 16:45:12 +00:00
Sebastian Sellmair 6c6200a9c5 [Gradle][Minor] Deprecate 'KotlinCompilation.associateWith' property...
... in favor of associateCompilations and allAssociateCompilations

^KT-60937 Verification Pending
2023-08-07 13:40:32 +00:00
Yahor Berdnikau 38b17420c1 [Gradle] Introduce compilerOptions on KotlinTarget
This will allow configuring compiler options for all compilations in the
target.

^KT-57292 In Progress
2023-08-03 14:29:43 +00:00
Alexander Udalov d4b5599373 Add JVM target bytecode version 21
Unfortunately, there are still problems with running JVM backend tests
with JVM target 21 because:

1) The D8 version that we use does not support bytecode version 21, and
   updating to a newer version requires to change JVM target of compiler
   tests to 11. This will be addressed separately when we enable JVM 21
   in tests-different-jdk.
2) Some tests are failing because of KT-60659 and KT-60770:
   - builtinStubMethods/bridgesForStubs/emptyStringListAdd.kt
   - jdk/stream.kt
   - regressions/kt528.kt

 #KT-60662 Fixed
2023-08-03 08:43:22 +00:00
Ilya Goncharov 4c82206d3b [Gradle,JS] Return legacy target to Gradle plugin back 2023-07-28 09:29:03 +00:00
Sebastian Sellmair 7cef7ac639 [Gradle] Restore 'KotlinTargetHierarchyDsl' for easier transition to hierarchy templates
^KT-60596 Verification Pending
2023-07-27 08:07:34 +00:00
Ilya Goncharov 54debac4c5 [Gradle, JS] Remove K/JS legacy support from Gradle plugin 2023-07-25 13:08:23 +00:00
Yahor Berdnikau dc5660d98c [Gradle] Add 'validatePlugins' tasks for Gradle plugin dependencies
Gradle 8 has removed "validate-external-gradle-plugin" plugin which we
used before to run validate task inputs proper annotations.

With this change, every Gradle dependency that is not published as a
Gradle plugin but uses Gradle API types is also running
'validatedPlugins' task registered manually via a build script.

^KT-59827 Fixed
2023-07-19 13:36:03 +00:00
Yahor Berdnikau 7b665e7673 [Gradle] Move UsesKotlinJavaToolchain inheritance into api
Such way it will be visible which tasks are using this feature.

^KT-58858 In Progress
2023-07-13 19:20:19 +00:00
Anton Lakotka 2f7f69ed4f [Gradle] Remove requiresVisibilityOf API and related checks
^KT-58228 Verification Pending
2023-07-12 11:59:27 +00:00
Anton Lakotka 344dbcbd23 [Gradle] Update apiDump after removing relatedConfigurationNames
^KT-58225 Verification Pending
2023-07-06 13:23:16 +00:00
Sebastian Sellmair 772bcb283d [Gradle] Replace KotlinSourceSetTree interface with simpler class
^KT-58676 Verification Pending
2023-06-26 11:36:17 +00:00
Sebastian Sellmair 1cd8089e92 [Gradle] Move KotlinHierarchyTemplate.Templates.default into -api module
^KT-58676 Verification Pending
2023-06-26 11:36:17 +00:00
Sebastian Sellmair b2dd83515c [Gradle] Stabilise Kotlin Hierarchy Template DSL
- Remove 'Target' name from hierarchy components as in
    - KotlinTargetHierarchyBuilder -> KotlinHierarchyBuilder
    - KotlinTargetHierarchyDsl -> KotlinHierarchyDsl

- Rename KotlinTargetHierarchyDescriptor -> KotlinHierarchyTemplate
    To convey a better intuition about the 'template' vs 'layout' separation:
    A 'template' is used to 'layout' the actual 'hierarchy' on a given project.

- Move entities from .mpp.targetHierarchy to .hierarchy package
    As the .targetHierarchy package was using the 'target' term as well

- Rename SourceSetTree to KotlinSourceSetTree

- Rename SourceSetTreeClassifier to KotlinSourceSetTreeClassifier
    (Support external target APIs by introducing a V2 api version)

^KT-58676 In Progress
2023-06-26 11:36:16 +00:00
Pavel Kirpichenkov a7ff0cfc9d Remove deprecated CInteropSettings#getDependencyConfigurationName
KT-55908
2023-06-16 11:00:42 +00:00
Anton Lakotka 67a511544c [Gradle] Remove defaultConfigurationName
^KT-55201 Verification Pending
2023-05-31 15:45:25 +00:00
Sebastian Sellmair ff7e4f7986 [Gradle] Implement SourceSetTreeClassifier API
- This new API will be configurable for 'External Kotlin Targets'
- This change also moves targetHierarchy.android {} into the androidTarget
to avoid potential confusion around the KGP managed AndroidTarget vs
the Google implementation.

KT-58710
2023-05-16 13:19:42 +00:00
Yahor Berdnikau ccbca7a019 [Gradle] Move pm20 interfaces from plugin/api into plugin codebase
^KT-58619 Fixed
2023-05-10 23:27:14 +02:00
Sebastian Sellmair f98765f254 [Gradle] Remove KotlinCompilation.moduleName
^KT-58220 Verification Pending
2023-04-25 17:08:59 +00:00
Sebastian Sellmair bd0f54564d [Gradle] Move KotlinTargetHierarchy/Android configuration from KotlinAndroidTarget to KotlniTargetHierarchyDsl
^KT-58209 Verification Pending
2023-04-25 15:08:29 +00:00
Yahor Berdnikau 50f5fadfd8 Expose task input to control jvm target validation mode
^KT-56971 Fixed
2023-04-25 10:28:29 +00:00
Yahor Berdnikau f7522ec796 Better approach to handle 'moduleName' in project level DSL
Now project level DSL only configures base part of module name, which
latter is enhanced by Kotlin compilation suffix. In this case
'KotlinCompilation.moduleName' is not used.

Additionally,
'KotlinJvmTask.moduleName' usage was deprecated in favor of
'compilerOptions.moduleName'. Though warning is only produced in case
project is using 'org.jetbrains.kotlin.jvm' or
'org.jetbrains.kotlin.android' plugins.

- 'moduleName' is always required to be non-null.

^KT-57688 Fixed
2023-04-12 06:16:36 +00:00
Sebastian Sellmair c5e154a325 [Gradle] KotlinJvmCompilerOptions: Use JvmTarget.DEFAULT as default value for jvmTarget
KTIJ-24976
2023-04-06 16:03:01 +00:00
Sebastian Sellmair a7a689841f [Gradle] Convert KotlinTargetHierarchy.ModuleName to regular class (instead of data)
^KT-56654 Verification Pending
2023-04-03 11:24:19 +00:00
Sebastian Sellmair b5d188d44e [Gradle] Remove suspend functions from KotlinTargetHierarchyBuilder API
^KT-56654 Verification Pending
2023-04-03 11:24:18 +00:00
Sebastian Sellmair 028780ae97 [Gradle] Introduce HasProject and implement HasMutableExtras in public entities
^KT-34662 Verification Pending
2023-04-03 11:24:10 +00:00
Sebastian Sellmair 40603bbda7 [Gradle] Update kotlin-gradle-plugin-api.api
KT-34662
2023-04-03 11:24:08 +00:00
Alexander Udalov 37c776b233 Add JVM target bytecode version 20
#KT-57495 Fixed
2023-03-30 19:05:41 +00:00