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
These methods are only added to provide more user-friendly error
when user tries to configure JVM toolchain in Kotlin target DSL.
^KT-64629 Verification Pending
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
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
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
Now the multiplatform extension exposes compiler option DSL for common
compiler arguments. This compiler option synced as a convention for
targets compiler option.
In the case of Kotlin source sets which are not used as defaultSourceSet
in compilations - extension compiler options are synced as convention
into those.
^KT-57292 In Progress
Kotlin external target now properly exposes compilerOptions which could
be used by target users to configure target compilations compiler
options.
^KT-57292 In Progress
When the flag is 'on', then publications will include
The 'org.gradle.jvm.environment' Gradle attribute.
We previously did not publish this attribute, as it lead
to problems for 'old' consumers.
We will roll out publications gradually with this feature flag.
The external Android target is expected to opt into this flag
as it is necessary for disambiguating Android from JVM targets
when the external Android target also uses KotlinPlatformType.jvm
This utils are intended to be used external target authors exclusively
and shall help to create sources.jar files using regular
Kotlin Multiplatform conventions.
^KT-58109 Verification Pending
- 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
Those are dependencies that point back to the original project.
This can happen with two projects like
```
// project a
kotlin {
commonMain.get().dependencies {
api(project(":b"))
}
}
// project b
kotlin {
commonTest.get().dependencies {
implementation(project(":a"))
}
}
```
Where b(test) -> a -> b
^KT-59020 Verification Pending
- 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