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

it.unibo.protelis2kotlin.KotlinPluginUtils.kt Maven / Gradle / Ivy

The newest version!
package it.unibo.protelis2kotlin

import org.gradle.api.Project
import org.gradle.api.provider.Property
import org.gradle.api.provider.Provider

internal inline fun  Project.propertyWithDefault(default: T): Property =
    objects.property(T::class.java).apply { convention(default) }

internal inline fun  Project.propertyWithDefault(noinline default: () -> T): Property =
    objects.property(T::class.java).apply { convention(default()) }

internal inline fun  Project.propertyWithDefault(default: Provider): Property =
    objects.property(T::class.java).apply { set(default) }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy