Skip to content

Commit 3351926

Browse files
[Kotlin-sdk] Maven Release (RunanywhereAI#286)
* fix(ci): ensure XCFramework ZIPs have correct structure for SPM When creating release ZIPs for iOS XCFrameworks, find the .xcframework directory (which may be nested in dist/) and place it at the root of the ZIP. This fixes SPM binary target resolution which expects the framework at the archive root. Affected packages: RACommons, RABackendLLAMACPP, RABackendONNX * fix(kotlin-sdk): include jni/ directory with librunanywhere_jni.so The JNI bridge library (librunanywhere_jni.so) was being built to dist/android/jni/ but not uploaded as an artifact or copied to jniLibs. This caused the 'dlopen failed: library librunanywhere_jni.so not found' crash. * fix(jitpack): simplify backend modules and fix Android build Issues fixed: 1. Backend modules had wrong download URLs (core-v0.1.4) - Removed module-level downloadJniLibs tasks (main SDK handles all native libs) 2. Android compilation was skipped on JitPack - Added explicit assembleRelease step before publishToMavenLocal - Added android-36 platform and ANDROID_SDK_ROOT env var 3. Race condition with native lib downloads - JitPack now runs downloadJniLibs -> assembleRelease -> publishToMavenLocal - Backend modules are just Kotlin code (no native libs) * fix(jitpack): chain commands and use publishAllPublications - Chain all commands with && so env vars persist - Use publishAllPublicationsToMavenLocal to include Android AAR - Add --info for better debugging * fix(jitpack): use correct task name publishToMavenLocal - publishAllPublicationsToMavenLocal doesn't exist - Split downloadJniLibs and assembleRelease+publish for clarity * feat(kotlin): Add Maven Central publishing support - Configure signing and Maven Central repository for main SDK - Add publishing configuration to LlamaCPP and ONNX modules - Add GitHub Actions workflow for automated publishing - Use io.github.sanchitmonga22 namespace (verified) Artifacts will be published as: - io.github.sanchitmonga22:runanywhere-sdk - io.github.sanchitmonga22:runanywhere-llamacpp - io.github.sanchitmonga22:runanywhere-onnx * feat(kotlin-sdk): Enable Android AAR publishing with native libraries - Add publishLibraryVariants("release") to androidTarget blocks - Add mavenPublication { artifactId = ... } for correct artifact naming - Create KOTLIN_MAVEN_CENTRAL_PUBLISHING.md documentation This enables publishing Android AARs that contain native .so libraries (librunanywhere_jni.so, librac_backend_llamacpp.so, libonnxruntime.so, etc.) to Maven Central alongside the JVM JARs. Artifacts now published: - runanywhere-sdk-android (AAR with native libs) - runanywhere-llamacpp-android (AAR with native libs) - runanywhere-onnx-android (AAR with native libs) - Plus 6 JVM/KMP artifacts * feat(docs): Enhance Documentation with Quick Start Guide and Voice Pipeline Examples - Added a "Quick Start" section to the Documentation.md for easier onboarding. - Updated the Table of Contents to include new sections. - Included detailed examples for initializing the SDK, registering models, and using the voice pipeline. - Expanded usage examples for LLM, STT, and TTS functionalities to match the starter app implementation. - Improved clarity and structure of voice session events and processing flow. * docs: Add Maven Central publishing guide and secrets template - Simplified KOTLIN_MAVEN_CENTRAL_PUBLISHING.md for quick reference - Added secrets.template.properties for team credential sharing - Updated .gitignore to exclude secrets files
2 parents c99df00 + b068537 commit 3351926

File tree

9 files changed

+1057
-54
lines changed

9 files changed

+1057
-54
lines changed

sdk/runanywhere-kotlin/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,7 @@ build/jniLibs/
4242

4343
# Local environment
4444
local.properties
45+
46+
# Secrets (NEVER commit real credentials)
47+
secrets.properties
48+
*.secrets.properties

sdk/runanywhere-kotlin/build.gradle.kts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,14 @@ kotlin {
163163

164164
// Android target
165165
androidTarget {
166+
// Enable publishing Android AAR to Maven
167+
publishLibraryVariants("release")
168+
169+
// Set correct artifact ID for Android publication
170+
mavenPublication {
171+
artifactId = "runanywhere-sdk-android"
172+
}
173+
166174
compilations.all {
167175
compilerOptions.configure {
168176
jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17)

0 commit comments

Comments
 (0)