Skip to content

Commit 93c1f40

Browse files
chore: Update configurations and versions for RunAnywhere SDK
- Set runanywhere.testLocal to false in gradle.properties for both Android and Kotlin SDKs. - Updated coreVersion to 0.2.4 in multiple build.gradle.kts files to align with the latest release. - Adjusted checksums in Package.swift for updated XCFrameworks. - Enhanced build script to log JNI library copy actions and added warnings for missing libraries.
1 parent ee564f9 commit 93c1f40

File tree

7 files changed

+29
-15
lines changed

7 files changed

+29
-15
lines changed

examples/android/RunAnywhereAI/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,5 @@ kotlin.caching.enabled=true
3535
# RunAnywhere Native Library Configuration
3636
# Use locally built native libraries from runanywhere-core/dist/android/
3737
# To use local native libs: ./gradlew build -Prunanywhere.testLocal=true
38-
runanywhere.testLocal=true
38+
runanywhere.testLocal=false
3939
kotlin.mpp.applyDefaultHierarchyTemplate=false

sdk/runanywhere-commons/scripts/build-rac-commons.sh

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -346,10 +346,15 @@ build_android() {
346346
[ -f "${ABI_BUILD}/librac_commons.so" ] && cp "${ABI_BUILD}/librac_commons.so" "${ABI_DIST}/"
347347

348348
# Copy JNI library if built
349-
if [ -f "${ABI_BUILD}/src/jni/librac_commons_jni.so" ]; then
350-
cp "${ABI_BUILD}/src/jni/librac_commons_jni.so" "${ABI_DIST}/"
351-
elif [ -f "${ABI_BUILD}/librac_commons_jni.so" ]; then
352-
cp "${ABI_BUILD}/librac_commons_jni.so" "${ABI_DIST}/"
349+
# CMakeLists.txt sets OUTPUT_NAME="runanywhere_jni" producing librunanywhere_jni.so
350+
if [ -f "${ABI_BUILD}/src/jni/librunanywhere_jni.so" ]; then
351+
cp "${ABI_BUILD}/src/jni/librunanywhere_jni.so" "${ABI_DIST}/"
352+
log_info "Copied librunanywhere_jni.so"
353+
elif [ -f "${ABI_BUILD}/librunanywhere_jni.so" ]; then
354+
cp "${ABI_BUILD}/librunanywhere_jni.so" "${ABI_DIST}/"
355+
log_info "Copied librunanywhere_jni.so"
356+
else
357+
log_warning "JNI library not found - was RAC_BUILD_JNI=ON set?"
353358
fi
354359

355360
# Copy STL

sdk/runanywhere-kotlin/build.gradle.kts

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,23 @@ version = "0.1.3"
5353
//
5454
// Mirrors Swift SDK's Package.swift testLocal pattern
5555
// =============================================================================
56-
val testLocal: Boolean = project.findProperty("runanywhere.testLocal")?.toString()?.toBoolean() ?: false
56+
// IMPORTANT: Check rootProject first to support composite builds (e.g., when SDK is included from example app)
57+
// This ensures the app's gradle.properties takes precedence over the SDK's default
58+
val testLocal: Boolean = rootProject.findProperty("runanywhere.testLocal")?.toString()?.toBoolean()
59+
?: project.findProperty("runanywhere.testLocal")?.toString()?.toBoolean()
60+
?: false
5761

5862
// Version constants for remote downloads (mirrors Swift's Package.swift)
5963
// These should match the releases at:
6064
// - https://github.com/RunanywhereAI/runanywhere-binaries/releases (Android JNI libs for backends)
6165
// - https://github.com/RunanywhereAI/runanywhere-sdks/releases (Android JNI libs for commons)
62-
val coreVersion: String = project.findProperty("runanywhere.coreVersion")?.toString() ?: "0.2.0"
63-
val commonsVersion: String = project.findProperty("runanywhere.commonsVersion")?.toString() ?: "0.1.1"
66+
// IMPORTANT: Check rootProject first to support composite builds
67+
val coreVersion: String = rootProject.findProperty("runanywhere.coreVersion")?.toString()
68+
?: project.findProperty("runanywhere.coreVersion")?.toString()
69+
?: "0.2.4"
70+
val commonsVersion: String = rootProject.findProperty("runanywhere.commonsVersion")?.toString()
71+
?: project.findProperty("runanywhere.commonsVersion")?.toString()
72+
?: "0.1.1"
6473

6574
// Log the build mode
6675
logger.lifecycle("RunAnywhere SDK: testLocal=$testLocal, coreVersion=$coreVersion")

sdk/runanywhere-kotlin/gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ kotlin.mpp.applyDefaultHierarchyTemplate=false
3131
# ./gradlew -Prunanywhere.testLocal=false assembleDebug # Use remote releases
3232
# ./gradlew assembleDebug # Uses value below
3333
# =============================================================================
34-
runanywhere.testLocal=true
34+
runanywhere.testLocal=false
3535

3636
# Version of runanywhere-core release for JNI downloads (when testLocal=false)
3737
# Must match a GitHub release tag at: https://github.com/RunanywhereAI/runanywhere-binaries/releases
3838
# Contains: RABackendLlamaCPP-android, RABackendONNX-android
3939
# This matches Swift's coreVersion in Package.swift
40-
runanywhere.coreVersion=0.2.0
40+
runanywhere.coreVersion=0.2.4
4141

4242
# Version of runanywhere-commons release for JNI downloads (when testLocal=false)
4343
# Must match a GitHub release tag at: https://github.com/RunanywhereAI/runanywhere-sdks/releases

sdk/runanywhere-kotlin/modules/runanywhere-core-llamacpp/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ val testLocal: Boolean = rootProject.findProperty("runanywhere.testLocal")?.toSt
3232
?: false
3333
val coreVersion: String = rootProject.findProperty("runanywhere.coreVersion")?.toString()
3434
?: project.findProperty("runanywhere.coreVersion")?.toString()
35-
?: "0.2.0"
35+
?: "0.2.4"
3636

3737
logger.lifecycle("LlamaCPP Module: testLocal=$testLocal, coreVersion=$coreVersion")
3838

sdk/runanywhere-kotlin/modules/runanywhere-core-onnx/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ val testLocal: Boolean = rootProject.findProperty("runanywhere.testLocal")?.toSt
3636
?: false
3737
val coreVersion: String = rootProject.findProperty("runanywhere.coreVersion")?.toString()
3838
?: project.findProperty("runanywhere.coreVersion")?.toString()
39-
?: "0.2.0"
39+
?: "0.2.4"
4040

4141
logger.lifecycle("ONNX Module: testLocal=$testLocal, coreVersion=$coreVersion")
4242

sdk/runanywhere-swift/Package.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ let testLocal = false // PRODUCTION: download XCFrameworks from GitHub releases
2626

2727
// Version constants for remote XCFrameworks (must be defined before package)
2828
let commonsVersion = "0.1.1"
29-
let coreVersion = "0.2.3"
29+
let coreVersion = "0.2.4"
3030
// =============================================================================
3131

3232
let package = Package(
@@ -263,7 +263,7 @@ func binaryTargets() -> [Target] {
263263
.binaryTarget(
264264
name: "RABackendLlamaCPPBinary",
265265
url: "https://github.com/RunanywhereAI/runanywhere-binaries/releases/download/core-v\(coreVersion)/RABackendLlamaCPP-ios-v\(coreVersion).zip",
266-
checksum: "3607518a08e307ddf1752a255e480244b51dad9ee1fe428f64c3f75fcb74bcd4"
266+
checksum: "31a8b7e129ad6197e898d538a4c882a9f4717bad8a9694b842e49a676efd6142"
267267
),
268268
// =================================================================
269269
// RABackendONNX - STT/TTS/VAD backend (includes Sherpa-ONNX)
@@ -272,7 +272,7 @@ func binaryTargets() -> [Target] {
272272
.binaryTarget(
273273
name: "RABackendONNXBinary",
274274
url: "https://github.com/RunanywhereAI/runanywhere-binaries/releases/download/core-v\(coreVersion)/RABackendONNX-ios-v\(coreVersion).zip",
275-
checksum: "fa7660bb6b15d0d4aa1685dbe74491afaee1a8a5ec893abe93ded2554c0bc742"
275+
checksum: "a2ada60f35c4a318d852ef04e08a1e5fdfbd646bcaf6058929203ced8ac98815"
276276
),
277277
// =================================================================
278278
// ONNX Runtime - Required by RABackendONNX

0 commit comments

Comments
 (0)