Make withJava() safe to call repeatedlt on same target
This commit is contained in:
+3
@@ -31,6 +31,9 @@ class KotlinJvmTarget(
|
||||
|
||||
@Suppress("unused") // user DSL
|
||||
fun withJava() {
|
||||
if (withJavaEnabled)
|
||||
return
|
||||
|
||||
project.multiplatformExtension.targets.find { it is KotlinJvmTarget && it.withJavaEnabled }
|
||||
?.let { existingJavaTarget ->
|
||||
throw InvalidUserCodeException(
|
||||
|
||||
Reference in New Issue
Block a user