Skip to content

Commit

Permalink
fix: updating namespace in UDL to correctly map to generated binaries
Browse files Browse the repository at this point in the history
Signed-off-by: Ahmed Moussa <ahmed.moussa@iohk.io>
  • Loading branch information
hamada147 committed Apr 30, 2024
1 parent ff54776 commit ce6d28f
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 42 deletions.
71 changes: 31 additions & 40 deletions apollo/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ fun KotlinNativeTarget.secp256k1CInterop(target: String) {
fun KotlinNativeTarget.ed25519Bip32CInterop(target: String) {
compilations.getByName("main") {
cinterops {
val ed25519_bip32 by creating {
val ed25519_bip32_wrapper by creating {
val crate = this.name
packageName("$crate.cinterop")
header(
Expand Down Expand Up @@ -682,39 +682,6 @@ android {
}
}

afterEvaluate {
tasks.withType<KotlinCompile> {
dependsOn(
":iOSLibs:buildIOHKCryptoKitIphoneos",
":iOSLibs:buildIOHKCryptoKitIphonesimulator",
":iOSLibs:buildIOHKCryptoKitMacosx",
":iOSLibs:buildIOHKSecureRandomGenerationIphoneos",
":iOSLibs:buildIOHKSecureRandomGenerationIphonesimulator",
":iOSLibs:buildIOHKSecureRandomGenerationMacosx"
)
}
tasks.withType<ProcessResources> {
dependsOn(
":iOSLibs:buildIOHKCryptoKitIphoneos",
":iOSLibs:buildIOHKCryptoKitIphonesimulator",
":iOSLibs:buildIOHKCryptoKitMacosx",
":iOSLibs:buildIOHKSecureRandomGenerationIphoneos",
":iOSLibs:buildIOHKSecureRandomGenerationIphonesimulator",
":iOSLibs:buildIOHKSecureRandomGenerationMacosx"
)
}
tasks.withType<CInteropProcess> {
dependsOn(
":iOSLibs:buildIOHKCryptoKitIphoneos",
":iOSLibs:buildIOHKCryptoKitIphonesimulator",
":iOSLibs:buildIOHKCryptoKitMacosx",
":iOSLibs:buildIOHKSecureRandomGenerationIphoneos",
":iOSLibs:buildIOHKSecureRandomGenerationIphonesimulator",
":iOSLibs:buildIOHKSecureRandomGenerationMacosx"
)
}
}

ktlint {
filter {
exclude {
Expand Down Expand Up @@ -804,17 +771,41 @@ npmPublish {

// Workaround for a bug in Gradle
afterEvaluate {
tasks.getByName<Delete>("clean") {
// dependsOn(cleanEd25519Bip32)
tasks.withType<KotlinCompile> {
dependsOn(
":iOSLibs:buildIOHKCryptoKitIphoneos",
":iOSLibs:buildIOHKCryptoKitIphonesimulator",
":iOSLibs:buildIOHKCryptoKitMacosx",
":iOSLibs:buildIOHKSecureRandomGenerationIphoneos",
":iOSLibs:buildIOHKSecureRandomGenerationIphonesimulator",
":iOSLibs:buildIOHKSecureRandomGenerationMacosx",
buildEd25519Bip32Task
)
}
tasks.withType<ProcessResources> {
dependsOn(buildEd25519Bip32Task)
dependsOn(
":iOSLibs:buildIOHKCryptoKitIphoneos",
":iOSLibs:buildIOHKCryptoKitIphonesimulator",
":iOSLibs:buildIOHKCryptoKitMacosx",
":iOSLibs:buildIOHKSecureRandomGenerationIphoneos",
":iOSLibs:buildIOHKSecureRandomGenerationIphonesimulator",
":iOSLibs:buildIOHKSecureRandomGenerationMacosx",
buildEd25519Bip32Task
)
}
tasks.withType<CInteropProcess> {
dependsOn(copyEd25519Bip32GeneratedTask)
dependsOn(
":iOSLibs:buildIOHKCryptoKitIphoneos",
":iOSLibs:buildIOHKCryptoKitIphonesimulator",
":iOSLibs:buildIOHKCryptoKitMacosx",
":iOSLibs:buildIOHKSecureRandomGenerationIphoneos",
":iOSLibs:buildIOHKSecureRandomGenerationIphonesimulator",
":iOSLibs:buildIOHKSecureRandomGenerationMacosx",
copyEd25519Bip32GeneratedTask
)
}
tasks.withType<KotlinCompile> {
dependsOn(buildEd25519Bip32Task)
tasks.getByName<Delete>("clean") {
// dependsOn(cleanEd25519Bip32)
}
tasks.withType<KtLintCheckTask> {
dependsOn(buildEd25519Bip32Task)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.iohk.atala.prism.apollo.derivation

import com.ionspin.kotlin.bignum.integer.toBigInteger
import ed25519_bip32.XPrvWrapper
import ed25519_bip32_wrapper.XPrvWrapper
import io.iohk.atala.prism.apollo.utils.ECConfig

/**
Expand Down
2 changes: 1 addition & 1 deletion rust-ed25519-bip32

0 comments on commit ce6d28f

Please sign in to comment.