Skip to content

Commit d03479d

Browse files
committed
refactor(kmp/ed25519): rename modules + mnemonic Kotlin rewrite
- Rename :libs:encryption:ed25519-kmp → :libs:encryption:ed25519 (KMP module takes the clean name; no -kmp suffix exposed to consumers) - Rename :libs:encryption:ed25519 → :libs:encryption:ed25519-native (JNI/CMake module becomes an internal impl detail; androidMain delegates to it) - Update cinterop path in ed25519.def and C source reference in build.gradle.kts - Update kmpUnitTestModules and settings.gradle.kts registrations - Update :kmp:shared-core api/export references - Convert MnemonicCode and MnemonicException from Java to Kotlin (cherry-picked from origin/fix/kmp-consumer-compile)
1 parent 53cffca commit d03479d

56 files changed

Lines changed: 417 additions & 465 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎kmp/shared-core/build.gradle.kts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ kotlin {
2424
export(project(":libs:encryption:sha256"))
2525
export(project(":libs:encryption:sha512"))
2626
export(project(":libs:encryption:hmac"))
27-
export(project(":libs:encryption:ed25519-kmp"))
27+
export(project(":libs:encryption:ed25519"))
2828
}
2929
}
3030

@@ -35,7 +35,7 @@ kotlin {
3535
api(project(":libs:encryption:sha256"))
3636
api(project(":libs:encryption:sha512"))
3737
api(project(":libs:encryption:hmac"))
38-
api(project(":libs:encryption:ed25519-kmp"))
38+
api(project(":libs:encryption:ed25519"))
3939
}
4040
}
4141
}

‎libs/encryption/ed25519-kmp/build.gradle.kts‎

Lines changed: 0 additions & 121 deletions
This file was deleted.

‎libs/encryption/ed25519-kmp/cinterop/ed25519.def‎

Lines changed: 0 additions & 2 deletions
This file was deleted.
File renamed without changes.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
plugins {
2+
alias(libs.plugins.flipcash.android.library)
3+
}
4+
5+
android {
6+
namespace = "${Gradle.codeNamespace}.ed25519"
7+
ndkVersion = "29.0.14206865"
8+
defaultConfig {
9+
externalNativeBuild {
10+
cmake {
11+
cppFlags += "-std=c++11"
12+
}
13+
}
14+
}
15+
16+
externalNativeBuild {
17+
cmake {
18+
path = file("CMakeLists.txt")
19+
}
20+
}
21+
}
22+
23+
dependencies {
24+
implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar"))))
25+
implementation(libs.bundles.kotlinx.serialization)
26+
27+
// Cross-platform test-vector gate (instrumented: JNI + android.util.Base64 need a device).
28+
androidTestImplementation(libs.androidx.junit)
29+
androidTestImplementation(libs.androidx.test.runner)
30+
}

libs/encryption/ed25519/libs/base64/CMakeLists.txt renamed to libs/encryption/ed25519-native/libs/base64/CMakeLists.txt

File renamed without changes.
File renamed without changes.
File renamed without changes.

libs/encryption/ed25519/libs/ed25519/CMakeLists.txt renamed to libs/encryption/ed25519-native/libs/ed25519/CMakeLists.txt

File renamed without changes.

0 commit comments

Comments
 (0)