From da97779edf520f76bce1591a4e84bf009698fdd1 Mon Sep 17 00:00:00 2001 From: naftalmm Date: Mon, 15 Jul 2019 17:12:52 +0300 Subject: [PATCH 1/2] Update KotlinFrontendExtension.kt It seems there is a typo in "bundle" method declaration. It is declared with generic parameter "C" which is not used in method signature. This makes impossible to configure bundles using Kotlin DSL in Gradle script --- .../kotlin/gradle/frontend/KotlinFrontendExtension.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kotlin-frontend/src/main/kotlin/org/jetbrains/kotlin/gradle/frontend/KotlinFrontendExtension.kt b/kotlin-frontend/src/main/kotlin/org/jetbrains/kotlin/gradle/frontend/KotlinFrontendExtension.kt index 2f93663..6333f7b 100644 --- a/kotlin-frontend/src/main/kotlin/org/jetbrains/kotlin/gradle/frontend/KotlinFrontendExtension.kt +++ b/kotlin-frontend/src/main/kotlin/org/jetbrains/kotlin/gradle/frontend/KotlinFrontendExtension.kt @@ -76,7 +76,7 @@ open class KotlinFrontendExtension(val project: Project) : GroovyObjectSupport() } } - fun bundle(id: String, configure: BundleConfig.() -> Unit) { + fun bundle(id: String, configure: C.() -> Unit) { bundleBuilders += Pair(id, configure) } @@ -125,4 +125,4 @@ open class KotlinFrontendExtension(val project: Project) : GroovyObjectSupport() throw MissingMethodException(name, KotlinFrontendExtension::class.java, args as? Array<*> ?: arrayOf(args)) } -} \ No newline at end of file +} From 32dacefa479711e638517f00a336fa3ae075957c Mon Sep 17 00:00:00 2001 From: naftalmm Date: Tue, 16 Jul 2019 13:01:05 +0300 Subject: [PATCH 2/2] fix --- .../kotlin/gradle/frontend/KotlinFrontendExtension.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kotlin-frontend/src/main/kotlin/org/jetbrains/kotlin/gradle/frontend/KotlinFrontendExtension.kt b/kotlin-frontend/src/main/kotlin/org/jetbrains/kotlin/gradle/frontend/KotlinFrontendExtension.kt index 6333f7b..8bd1c60 100644 --- a/kotlin-frontend/src/main/kotlin/org/jetbrains/kotlin/gradle/frontend/KotlinFrontendExtension.kt +++ b/kotlin-frontend/src/main/kotlin/org/jetbrains/kotlin/gradle/frontend/KotlinFrontendExtension.kt @@ -77,7 +77,8 @@ open class KotlinFrontendExtension(val project: Project) : GroovyObjectSupport() } fun bundle(id: String, configure: C.() -> Unit) { - bundleBuilders += Pair(id, configure) + @Suppress("UNCHECKED_CAST") + bundleBuilders += Pair(id, configure as BundleConfig.() -> Unit) } fun bundle(id: String, closure: Closure<*>) { @@ -125,4 +126,4 @@ open class KotlinFrontendExtension(val project: Project) : GroovyObjectSupport() throw MissingMethodException(name, KotlinFrontendExtension::class.java, args as? Array<*> ?: arrayOf(args)) } -} +} \ No newline at end of file