[Gradle, JS] Remove redundant delegation
This commit is contained in:
-9
@@ -60,29 +60,20 @@ open class KotlinBrowserJs @Inject constructor(target: KotlinJsTarget) :
|
|||||||
|
|
||||||
override fun runTask(body: KotlinWebpack.() -> Unit) {
|
override fun runTask(body: KotlinWebpack.() -> Unit) {
|
||||||
commonRunConfigurations.add(body)
|
commonRunConfigurations.add(body)
|
||||||
irBrowser?.runTask(body)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ExperimentalDistributionDsl
|
@ExperimentalDistributionDsl
|
||||||
override fun distribution(body: Distribution.() -> Unit) {
|
override fun distribution(body: Distribution.() -> Unit) {
|
||||||
distribution.body()
|
distribution.body()
|
||||||
target.irTarget?.browser?.distribution(body)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun webpackTask(body: KotlinWebpack.() -> Unit) {
|
override fun webpackTask(body: KotlinWebpack.() -> Unit) {
|
||||||
commonWebpackConfigurations.add(body)
|
commonWebpackConfigurations.add(body)
|
||||||
irBrowser?.webpackTask(body)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ExperimentalDceDsl
|
@ExperimentalDceDsl
|
||||||
override fun dceTask(body: KotlinJsDce.() -> Unit) {
|
override fun dceTask(body: KotlinJsDce.() -> Unit) {
|
||||||
dceConfigurations.add(body)
|
dceConfigurations.add(body)
|
||||||
irBrowser?.dceTask(body)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun testTask(body: KotlinJsTest.() -> Unit) {
|
|
||||||
super<KotlinJsSubTarget>.testTask(body)
|
|
||||||
irBrowser?.testTask(body)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun configureMain(compilation: KotlinJsCompilation) {
|
override fun configureMain(compilation: KotlinJsCompilation) {
|
||||||
|
|||||||
-2
@@ -31,12 +31,10 @@ open class KotlinNodeJs @Inject constructor(target: KotlinJsTarget) :
|
|||||||
|
|
||||||
override fun runTask(body: NodeJsExec.() -> Unit) {
|
override fun runTask(body: NodeJsExec.() -> Unit) {
|
||||||
(project.tasks.getByName(runTaskName) as NodeJsExec).body()
|
(project.tasks.getByName(runTaskName) as NodeJsExec).body()
|
||||||
irNodejs?.runTask(body)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun testTask(body: KotlinJsTest.() -> Unit) {
|
override fun testTask(body: KotlinJsTest.() -> Unit) {
|
||||||
super<KotlinJsSubTarget>.testTask(body)
|
super<KotlinJsSubTarget>.testTask(body)
|
||||||
irNodejs?.testTask(body)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun configureDefaultTestFramework(testTask: KotlinJsTest) {
|
override fun configureDefaultTestFramework(testTask: KotlinJsTest) {
|
||||||
|
|||||||
Reference in New Issue
Block a user