All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtensionTargetFromPresets.kt Maven / Gradle / Ivy

There is a newer version: 2.1.0-RC
Show newest version
/*
 * Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
 * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
 */

package org.jetbrains.kotlin.gradle.dsl

import org.gradle.api.Action
import org.jetbrains.kotlin.gradle.plugin.KotlinTarget
import org.jetbrains.kotlin.gradle.plugin.KotlinTargetPreset
import org.jetbrains.kotlin.gradle.targets.android.internal.internal

internal fun  KotlinMultiplatformExtension.targetFromPresetInternal(
    preset: KotlinTargetPreset,
    name: String = preset.name,
    configure: T.() -> Unit = { },
): T = configureOrCreate(name, preset.internal, configure)

internal fun  KotlinMultiplatformExtension.targetFromPresetInternal(
    preset: KotlinTargetPreset,
    name: String,
    configure: Action,
) = targetFromPresetInternal(preset, name) { configure.execute(this) }

internal fun  KotlinMultiplatformExtension.targetFromPresetInternal(preset: KotlinTargetPreset) =
    targetFromPresetInternal(preset, preset.name) { }

internal fun  KotlinMultiplatformExtension.targetFromPresetInternal(preset: KotlinTargetPreset, name: String) =
    targetFromPresetInternal(preset, name) { }

internal fun  KotlinMultiplatformExtension.targetFromPresetInternal(preset: KotlinTargetPreset, configure: Action) =
    targetFromPresetInternal(preset, preset.name, configure)




© 2015 - 2024 Weber Informatics LLC | Privacy Policy