Skip to content

Commit 30f9340

Browse files
committed
Improve Gradle plugin sourceSets' dependencies config
1 parent 572bcdc commit 30f9340

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

plugins/suspend-transform-plugin-gradle/src/main/kotlin/love/forte/plugin/suspendtrans/gradle/SuspendTransformGradlePlugin.kt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,14 @@ private enum class DependencyConfigurationName {
151151
}
152152

153153
fun Project.configureMultiplatformDependency(conf: SuspendTransformGradleExtension) {
154+
if (!conf.enabled) {
155+
logger.info(
156+
"The `SuspendTransformGradleExtension.enable` in project {} for multiplatform is `false`, skip config.",
157+
this,
158+
)
159+
return
160+
}
161+
154162
// 时间久远,已经忘记为什么要做这个判断了,也忘记这段是在哪儿参考来的了💀
155163
if (rootProject.getBooleanProperty("kotlin.mpp.enableGranularSourceSetsMetadata")) {
156164
val multiplatformExtensions = project.extensions.getByType(KotlinMultiplatformExtension::class.java)

0 commit comments

Comments
 (0)