Skip to content

Commit

Permalink
Merge pull request #799 from ivanpagac/main
Browse files Browse the repository at this point in the history
[iOS] add iOS target to waltid-dif-definitions-parser, walt-id-verification-policies, waltid-verifiable-credentials
  • Loading branch information
dinkar-jain authored Oct 15, 2024
2 parents 43df5b7 + a9c96bf commit 37eaf8b
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ repositories {
kotlin {
jvmToolchain(17)

fun getSetting(name: String) = providers.gradleProperty(name).orNull.toBoolean()
val enableAndroidBuild = getSetting("enableAndroidBuild")
val enableIosBuild = getSetting("enableIosBuild")

jvm {
@OptIn(ExperimentalKotlinGradlePluginApi::class)
compilerOptions {
Expand All @@ -38,6 +42,11 @@ kotlin {
binaries.library()
}

if (enableIosBuild) {
iosArm64()
iosSimulatorArm64()
}

sourceSets {
val commonMain by getting {
dependencies {
Expand Down Expand Up @@ -66,6 +75,26 @@ kotlin {
implementation("org.slf4j:slf4j-simple:2.0.16")
}
}

if (enableIosBuild) {
val iosArm64Main by getting
val iosSimulatorArm64Main by getting

val iosMain by creating {
dependsOn(commonMain)
iosArm64Main.dependsOn(this)
iosSimulatorArm64Main.dependsOn(this)
}

val iosArm64Test by getting
val iosSimulatorArm64Test by getting

val iosTest by creating {
dependsOn(commonTest)
iosArm64Test.dependsOn(this)
iosSimulatorArm64Test.dependsOn(this)
}
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ suspendTransform {
}

kotlin {

fun getSetting(name: String) = providers.gradleProperty(name).orNull.toBoolean()
val enableAndroidBuild = getSetting("enableAndroidBuild")
val enableIosBuild = getSetting("enableIosBuild")

jvmToolchain(17)

jvm {
Expand All @@ -50,6 +55,12 @@ kotlin {
}
binaries.library()
}

if (enableIosBuild) {
iosArm64()
iosSimulatorArm64()
}

val ktor_version = "2.3.12"
sourceSets {
val commonMain by getting {
Expand Down Expand Up @@ -97,6 +108,26 @@ kotlin {
implementation("org.junit.jupiter:junit-jupiter-params:5.11.0-M2")
}
}

if (enableIosBuild) {
val iosArm64Main by getting
val iosSimulatorArm64Main by getting

val iosMain by creating {
dependsOn(commonMain)
iosArm64Main.dependsOn(this)
iosSimulatorArm64Main.dependsOn(this)
}

val iosArm64Test by getting
val iosSimulatorArm64Test by getting

val iosTest by creating {
dependsOn(commonTest)
iosArm64Test.dependsOn(this)
iosSimulatorArm64Test.dependsOn(this)
}
}
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package id.walt.credentials.verification.policies
package id.walt.policies.policies

import kotlinx.serialization.Serializable
import kotlinx.serialization.json.JsonObject
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package id.walt.policies.policies

import id.walt.crypto.keys.Key
import id.walt.sdjwt.JWTCryptoProvider

actual object JWTCryptoProviderManager {
actual fun getDefaultJWTCryptoProvider(keys: Map<String, Key>): JWTCryptoProvider {
TODO("Not yet implemented")
}
}

0 comments on commit 37eaf8b

Please sign in to comment.