This repository was archived by the owner on Sep 23, 2024. It is now read-only.
File tree 1 file changed +12
-8
lines changed
paperweight-mpp/src/main/kotlin/dev/racci/paperweight/mpp
1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -40,8 +40,10 @@ import org.gradle.kotlin.dsl.registerIfAbsent
40
40
import org.gradle.kotlin.dsl.repositories
41
41
import org.gradle.util.internal.NameMatcher
42
42
import org.gradle.workers.WorkerExecutor
43
+ import org.jetbrains.kotlin.gradle.dsl.kotlinExtension
43
44
import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSet
44
45
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinJvmCompilation
46
+ import org.jetbrains.kotlin.gradle.plugin.mpp.pm20.util.targets
45
47
import org.jetbrains.kotlin.gradle.targets.jvm.KotlinJvmTarget
46
48
import org.slf4j.LoggerFactory
47
49
import javax.inject.Inject
@@ -65,15 +67,17 @@ public abstract class PaperweightMppPlugin : Plugin<Project> {
65
67
66
68
createRootTasks(project)
67
69
68
- project.kotlinMPP().targets.all {
69
- if (this !is KotlinJvmTarget ) {
70
- logger.info(" Skipping non-JVM target $name " )
71
- return @all
72
- } else {
73
- logger.info(" Configuring target $name for PaperweightMPP" )
74
- }
70
+ project.afterEvaluate {
71
+ kotlinExtension.targets.forEach { target ->
72
+ if (target !is KotlinJvmTarget ) {
73
+ logger.info(" Skipping non-JVM target $name " )
74
+ return @forEach
75
+ } else {
76
+ logger.info(" Configuring target ${target.name} for PaperweightMPP" )
77
+ }
75
78
76
- configureTasks()
79
+ target.configureTasks()
80
+ }
77
81
}
78
82
}
79
83
You can’t perform that action at this time.
0 commit comments