diff --git a/buildSrc/src/main/kotlin/ConfigureMultiplatform.kt b/buildSrc/src/main/kotlin/ConfigureMultiplatform.kt index c6acab9f1..dcd5d0e79 100644 --- a/buildSrc/src/main/kotlin/ConfigureMultiplatform.kt +++ b/buildSrc/src/main/kotlin/ConfigureMultiplatform.kt @@ -53,10 +53,11 @@ fun Project.configureKotlinLinux( * Configures targets and source sets for multiplatform modules. */ fun Project.configureMultiplatform( - kotlinMultiplatformExtension: KotlinMultiplatformExtension + kotlinMultiplatformExtension: KotlinMultiplatformExtension, + xcFrameworkName: String? = null ) = with(kotlinMultiplatformExtension) { val localProperties = getLocalProperties() - val frameworkName = project.name.replaceFirstChar { it.uppercase() } + val frameworkName = xcFrameworkName ?: project.name.replaceFirstChar { it.uppercase() } val xcf = XCFramework(frameworkName) jvm { compilations.all { diff --git a/icure-sdk/build.gradle.kts b/icure-sdk/build.gradle.kts index 004ec6b80..8c2c630b4 100644 --- a/icure-sdk/build.gradle.kts +++ b/icure-sdk/build.gradle.kts @@ -17,7 +17,7 @@ val version: String? by project project.version = version ?: "0.0.0-snapshot" kotlin { - configureMultiplatform(this) + configureMultiplatform(this, null) sourceSets { val commonMain by getting { diff --git a/icure-sdk/src/appleMain/kotlin/com/icure/sdk/utils/DefaultCryptoService.kt b/icure-sdk/src/appleMain/kotlin/com/icure/sdk/utils/DefaultCryptoService.kt new file mode 100644 index 000000000..e970d5224 --- /dev/null +++ b/icure-sdk/src/appleMain/kotlin/com/icure/sdk/utils/DefaultCryptoService.kt @@ -0,0 +1,12 @@ +package com.icure.sdk.utils + +import com.icure.kryptom.crypto.RsaAlgorithm + +/** + * This is a default crypto service that is used by the SDK. + * The sole purpose of this variable is to make the Kotlin Multiplatform to generate the correct code for the XcFramework. + */ +val defaultCryptoService = com.icure.kryptom.crypto.defaultCryptoService + +val rsaEncryptionAlgorithmOaepWithSha1 = RsaAlgorithm.RsaEncryptionAlgorithm.OaepWithSha1 +val rsaEncryptionAlgorithmOaepWithSha256 = RsaAlgorithm.RsaEncryptionAlgorithm.OaepWithSha256