Skip to content

Commit 33e0e16

Browse files
committed
Support exclude jvm option
1 parent ca58f2e commit 33e0e16

File tree

1 file changed

+7
-0
lines changed
  • gradle-conventions/src/main/kotlin/util/targets

1 file changed

+7
-0
lines changed

gradle-conventions/src/main/kotlin/util/targets/jvm.kt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,15 @@ import org.gradle.kotlin.dsl.attributes
1010
import org.gradle.kotlin.dsl.getByName
1111
import util.other.files
1212
import util.other.libs
13+
import util.other.optionalProperty
1314

1415
fun Project.configureJvm(isKmp: Boolean) {
16+
val excludeJvm by optionalProperty("exclude")
17+
18+
if (isKmp && excludeJvm) {
19+
return
20+
}
21+
1522
tasks.getByName<Jar>(if (isKmp) "jvmJar" else "jar").apply {
1623
manifest {
1724
attributes(

0 commit comments

Comments
 (0)