Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions buildSrc/src/main/kotlin/ConfigureMultiplatform.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion icure-sdk/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
@@ -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