From 11c872fe287ed105c06bd2671e3acc0ffe4f20ed Mon Sep 17 00:00:00 2001 From: Ugljesa Jovanovic Date: Thu, 28 May 2020 23:53:37 +0200 Subject: [PATCH] remove cinterop when name contains ios --- multiplatform-crypto-delegated/build.gradle.kts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/multiplatform-crypto-delegated/build.gradle.kts b/multiplatform-crypto-delegated/build.gradle.kts index 6a457dc..3adaf4e 100644 --- a/multiplatform-crypto-delegated/build.gradle.kts +++ b/multiplatform-crypto-delegated/build.gradle.kts @@ -193,9 +193,11 @@ kotlin { compilations.getByName("main") { println("Setting cinterop for $name") defaultSourceSet.dependsOn(nativeMain) - val libsodiumCinterop by cinterops.creating { - defFile(project.file("src/nativeInterop/cinterop/libsodium.def")) - compilerOpts.add("-I${project.rootDir}/sodiumWrapper/include/") + if (this@withType.name.contains("ios").not()) { + val libsodiumCinterop by cinterops.creating { + defFile(project.file("src/nativeInterop/cinterop/libsodium.def")) + compilerOpts.add("-I${project.rootDir}/sodiumWrapper/include/") + } } }