Use receiver syntax for lambda execution (#2508)
This commit is contained in:
committed by
Sergey Igushkin
parent
ddc5a62e4a
commit
45ab07654e
+1
-1
@@ -55,7 +55,7 @@ interface KotlinCompilation<out T : KotlinCommonOptions> : Named, HasAttributes,
|
|||||||
fun kotlinOptions(configure: T.() -> Unit)
|
fun kotlinOptions(configure: T.() -> Unit)
|
||||||
fun kotlinOptions(configure: Closure<*>) = kotlinOptions { ConfigureUtil.configure(configure, this) }
|
fun kotlinOptions(configure: Closure<*>) = kotlinOptions { ConfigureUtil.configure(configure, this) }
|
||||||
|
|
||||||
fun attributes(configure: AttributeContainer.() -> Unit) = configure(attributes)
|
fun attributes(configure: AttributeContainer.() -> Unit) = attributes.configure()
|
||||||
fun attributes(configure: Closure<*>) = attributes { ConfigureUtil.configure(configure, this) }
|
fun attributes(configure: Closure<*>) = attributes { ConfigureUtil.configure(configure, this) }
|
||||||
|
|
||||||
val compileAllTaskName: String
|
val compileAllTaskName: String
|
||||||
|
|||||||
+1
-1
@@ -48,7 +48,7 @@ interface KotlinTarget : Named, HasAttributes {
|
|||||||
fun mavenPublication(action: Closure<Unit>)
|
fun mavenPublication(action: Closure<Unit>)
|
||||||
fun mavenPublication(action: Action<MavenPublication>)
|
fun mavenPublication(action: Action<MavenPublication>)
|
||||||
|
|
||||||
fun attributes(configure: AttributeContainer.() -> Unit) = configure(attributes)
|
fun attributes(configure: AttributeContainer.() -> Unit) = attributes.configure()
|
||||||
fun attributes(configure: Closure<*>) = attributes { ConfigureUtil.configure(configure, this) }
|
fun attributes(configure: Closure<*>) = attributes { ConfigureUtil.configure(configure, this) }
|
||||||
|
|
||||||
val preset: KotlinTargetPreset<out KotlinTarget>?
|
val preset: KotlinTargetPreset<out KotlinTarget>?
|
||||||
|
|||||||
+1
-2
@@ -73,8 +73,7 @@ abstract class AbstractKotlinCompilation<T : KotlinCommonOptions>(
|
|||||||
override val defaultSourceSet: KotlinSourceSet
|
override val defaultSourceSet: KotlinSourceSet
|
||||||
get() = target.project.kotlinExtension.sourceSets.getByName(defaultSourceSetName)
|
get() = target.project.kotlinExtension.sourceSets.getByName(defaultSourceSetName)
|
||||||
|
|
||||||
override fun defaultSourceSet(configure: KotlinSourceSet.() -> Unit) =
|
override fun defaultSourceSet(configure: KotlinSourceSet.() -> Unit) = defaultSourceSet.configure()
|
||||||
configure(defaultSourceSet)
|
|
||||||
|
|
||||||
override val output: KotlinCompilationOutput by lazy {
|
override val output: KotlinCompilationOutput by lazy {
|
||||||
DefaultKotlinCompilationOutput(
|
DefaultKotlinCompilationOutput(
|
||||||
|
|||||||
Reference in New Issue
Block a user