zzo.codeowners.kotlin-plugin.2.1.0.source-code.CodeOwnersKotlinDSL.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kotlin-plugin Show documentation
Show all versions of kotlin-plugin Show documentation
CodeOwners Kotlin Gradle Plugin
The newest version!
package org.gradle.kotlin.dsl
import io.github.gmazzo.codeowners.CodeOwnersKotlinSourceSet
import io.github.gmazzo.codeowners.CodeOwnersKotlinTargetExtension
import org.gradle.api.Action
import org.gradle.api.plugins.ExtensionAware
import org.jetbrains.kotlin.gradle.plugin.KotlinCompilation
import org.jetbrains.kotlin.gradle.plugin.KotlinTarget
var KotlinTarget.codeOwners: CodeOwnersKotlinTargetExtension
get() = (this as ExtensionAware).extensions.getByName(KotlinTarget::codeOwners.name)
internal set(value) = (this as ExtensionAware).extensions.add(KotlinTarget::codeOwners.name, value)
var KotlinCompilation<*>.codeOwners: CodeOwnersKotlinSourceSet
get() = (this as ExtensionAware).extensions.getByName(KotlinCompilation<*>::codeOwners.name)
internal set(value) = (this as ExtensionAware).extensions.add(KotlinCompilation<*>::codeOwners.name, value)
operator fun Target.invoke(action: Action) =
action.execute(this)