Build package scr for kotlin: aar #43
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Kotlin Bindings Package Distribution
PR Overview
This pr provides Kotlin bindings for the coinswap FFI library, enabling Bitcoin privacy-focused coinswap operations in JVM and Android applications. The bindings are generated using Mozilla's UniFFI framework, which provides a bridge between Rust and Kotlin.
Distribution Strategy
The pr aims to distribute two separate packages via Maven Central, the standard repository for JVM ecosystem dependencies. Maven Central provides reliable, versioned distribution that integrates seamlessly with Gradle and Maven build tools.
Package Types
JVM Package (Desktop/Server)
Target Platforms: Linux, macOS, Windows
Artifact Type: JAR (Java Archive)
Package Name:
org.citadel-tech:coinswap-jvmThe JVM package targets traditional Java Virtual Machine environments including desktop applications, server-side services, and command-line tools. This package bundles native libraries for multiple platforms (
.sofor Linux,.dylibfor macOS,.dllfor Windows) within a single JAR file.Usage Example:
Key Characteristics:
Android Package (Mobile)
Target Platforms: Android 7.0+ (API 24+)
Artifact Type: AAR (Android Archive)
Package Name:
org.citadel-tech:coinswap-androidUsage Example:
Key Characteristics:
Reference Implementation: BDK Android
JVM vs AAR: Technical Differences
JAR (Java Archive)
AAR (Android Archive)
jniLibs/directoryThe fundamental difference is that JAR targets the standard JVM runtime environment with dynamic platform detection, while AAR targets the Android Runtime (ART) with architecture-specific native library packaging.
Current Development Status
The project currently maintains a development environment for testing UniFFI bindings with:
The current setup is not consumable by external projects and requires manual native library setup.
Maven Central Publishing Requirements
Publishing to Maven Central requires several prerequisites and artifacts:
Prerequisites
citadel-tech.orgor use GitHub-based groupIdPublishing Process
Resources