it.unibo.protelis2kotlin.KotlinPluginUtils.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of protelisdoc Show documentation
Show all versions of protelisdoc Show documentation
A translator from documented Protelis code to compiling Kotlin interfaces
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) }