Remove deprecated ConfigureUtil usages in KotlinAggregatingExecution
^KT-46019 In Progress
This commit is contained in:
+3
-7
@@ -5,8 +5,7 @@
|
||||
|
||||
package org.jetbrains.kotlin.gradle.execution
|
||||
|
||||
import groovy.lang.Closure
|
||||
import org.gradle.util.ConfigureUtil
|
||||
import org.gradle.api.Action
|
||||
import org.jetbrains.kotlin.gradle.plugin.KotlinExecution
|
||||
import org.jetbrains.kotlin.gradle.plugin.KotlinExecution.ExecutionSource
|
||||
|
||||
@@ -35,10 +34,7 @@ interface KotlinAggregatingExecution<
|
||||
*/
|
||||
fun getConfiguredExecutions(): Iterable<AggregatedExecutionType>
|
||||
|
||||
fun configureAllExecutions(configureClosure: Closure<*>) = configureAllExecutions {
|
||||
ConfigureUtil.configureSelf(
|
||||
configureClosure,
|
||||
this
|
||||
)
|
||||
fun configureAllExecutions(configure: Action<AggregatedExecutionType>) = configureAllExecutions {
|
||||
configure.execute(this)
|
||||
}
|
||||
}
|
||||
+2
-1
@@ -19,6 +19,7 @@ import org.jetbrains.kotlin.gradle.targets.js.testing.KotlinJsTest
|
||||
import org.jetbrains.kotlin.gradle.testing.KotlinReportAggregatingTestRun
|
||||
import org.jetbrains.kotlin.gradle.testing.KotlinTaskTestRun
|
||||
import org.jetbrains.kotlin.gradle.testing.requireCompilationOfTarget
|
||||
import javax.inject.Inject
|
||||
import kotlin.properties.Delegates
|
||||
|
||||
class JsCompilationExecutionSource(override val compilation: KotlinJsCompilation) :
|
||||
@@ -51,7 +52,7 @@ class JsAggregatingExecutionSource(private val aggregatingTestRun: KotlinJsRepor
|
||||
get() = aggregatingTestRun.getConfiguredExecutions().map { it.executionSource }
|
||||
}
|
||||
|
||||
open class KotlinJsReportAggregatingTestRun(
|
||||
abstract class KotlinJsReportAggregatingTestRun @Inject constructor(
|
||||
testRunName: String,
|
||||
override val target: KotlinJsSubTargetContainerDsl
|
||||
) : KotlinReportAggregatingTestRun<JsCompilationExecutionSource, JsAggregatingExecutionSource, KotlinJsPlatformTestRun>(testRunName),
|
||||
|
||||
+5
-1
@@ -30,7 +30,11 @@ open class KotlinJsTargetConfigurator :
|
||||
name: String,
|
||||
target: KotlinJsTarget
|
||||
): KotlinJsReportAggregatingTestRun {
|
||||
val result = KotlinJsReportAggregatingTestRun(name, target)
|
||||
val result = target.project.objects.newInstance(
|
||||
KotlinJsReportAggregatingTestRun::class.java,
|
||||
name,
|
||||
target
|
||||
)
|
||||
|
||||
val testTask = target.project.kotlinTestRegistry.getOrCreateAggregatedTestTask(
|
||||
name = result.testTaskName,
|
||||
|
||||
+5
-1
@@ -35,7 +35,11 @@ open class KotlinJsIrTargetConfigurator() :
|
||||
name: String,
|
||||
target: KotlinJsIrTarget
|
||||
): KotlinJsReportAggregatingTestRun {
|
||||
val result = KotlinJsReportAggregatingTestRun(name, target)
|
||||
val result = target.project.objects.newInstance(
|
||||
KotlinJsReportAggregatingTestRun::class.java,
|
||||
name,
|
||||
target
|
||||
)
|
||||
|
||||
val testTask = target.project.kotlinTestRegistry.getOrCreateAggregatedTestTask(
|
||||
name = result.testTaskName,
|
||||
|
||||
-1
@@ -9,7 +9,6 @@ import groovy.lang.Closure
|
||||
import org.gradle.api.tasks.TaskProvider
|
||||
import org.gradle.api.tasks.testing.AbstractTestTask
|
||||
import org.gradle.api.tasks.testing.TestFilter
|
||||
import org.gradle.util.ConfigureUtil
|
||||
import org.jetbrains.kotlin.gradle.execution.KotlinAggregateExecutionSource
|
||||
import org.jetbrains.kotlin.gradle.execution.KotlinAggregatingExecution
|
||||
import org.jetbrains.kotlin.gradle.plugin.*
|
||||
|
||||
Reference in New Issue
Block a user