Interface KotlinTargetHierarchyBuilder.Root
-
- All Implemented Interfaces:
-
org.jetbrains.kotlin.gradle.plugin.KotlinTargetHierarchyBuilder
public interface KotlinTargetHierarchyBuilder.Root implements KotlinTargetHierarchyBuilder
-
-
Method Summary
Modifier and Type Method Description abstract Unit
sourceSetTrees(KotlinTargetHierarchy.SourceSetTree tree)
Defines the trees that the described hierarchy is applied to. abstract Unit
withSourceSetTree(KotlinTargetHierarchy.SourceSetTree tree)
Will add the given trees into for this descriptor. abstract Unit
excludeSourceSetTree(KotlinTargetHierarchy.SourceSetTree tree)
Will remove the given trees from this descriptor -
Methods inherited from class org.jetbrains.kotlin.gradle.plugin.KotlinTargetHierarchyBuilder
common, excludeCompilations, filterCompilations, group, withAndroid, withAndroidNative, withAndroidNativeArm32, withAndroidNativeArm64, withAndroidNativeX64, withAndroidNativeX86, withAndroidTarget, withApple, withCompilations, withIos, withIosArm32, withIosArm64, withIosSimulatorArm64, withIosX64, withJs, withJvm, withLinux, withLinuxArm32Hfp, withLinuxArm64, withLinuxMips32, withLinuxMipsel32, withLinuxX64, withMacos, withMacosArm64, withMacosX64, withMingw, withMingwX64, withMingwX86, withNative, withTvos, withTvosArm64, withTvosSimulatorArm64, withTvosX64, withWasm, withWasm32, withWatchos, withWatchosArm32, withWatchosArm64, withWatchosDeviceArm64, withWatchosSimulatorArm64, withWatchosX64, withWatchosX86, withoutCompilations
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
sourceSetTrees
abstract Unit sourceSetTrees(KotlinTargetHierarchy.SourceSetTree tree)
Defines the trees that the described hierarchy is applied to.
targetHierarchy.custom { sourceSetTrees(SourceSetTree.main, SourceSetTree.test) common { withJvm() group("ios") { withIos() } } }
Will create the following trees given an iosX64(), iosArm64() and jvm() target:
"main" "test" commonMain commonTest | | +----+-----+ +----+-----+ | | | | iosMain jvmMain iosTest jvmTest | | +---+----+ +---+----+ | | | | iosX64Main iosArm64Main iosX64Test iosArm64Test
Using a different hierarchy for "main" and "test"
targetHierarchy.custom { sourceSetTrees(SourceSetTree.main) // ! <- only applied to the "main" tree common { withJvm() group("ios") { withIos() } } } targetHierarchy.custom { sourceSetTrees(SourceSetTree.test) // ! <- only applied to the "test" tree common { withJvm() withIos() } }
Will create the following trees given an iosX64(), iosArm64() and jvm() target:
"main" "test" commonMain commonTest | | +----+-----+ +-----------+-----------+ | | | | | iosMain jvmMain iosX64Test iosArm64Test jvmTest | +---+----+ | | iosX64Main iosArm64Main
-
withSourceSetTree
abstract Unit withSourceSetTree(KotlinTargetHierarchy.SourceSetTree tree)
Will add the given trees into for this descriptor.
-
excludeSourceSetTree
abstract Unit excludeSourceSetTree(KotlinTargetHierarchy.SourceSetTree tree)
Will remove the given trees from this descriptor
-
-
-
-