Skip to content

Commit c73b524

Browse files
docs: update READMEs + example configs to useLocalNatives
Sweep across every doc + config file that referenced the old toggle names so the entire repo is internally consistent with the canonical `useLocalNatives` property name landed in the build files. Files touched: - AGENTS.md, build.gradle.kts, jitpack.yml - docs/building.md, docs/sdks/kotlin-sdk.md - sdk/runanywhere-{swift,kotlin,flutter,react-native}/README.md - sdk/runanywhere-kotlin/docs/KOTLIN_MAVEN_CENTRAL_PUBLISHING.md - sdk/runanywhere-kotlin/modules/runanywhere-core-{llamacpp,onnx}/README.md - examples/android/RunAnywhereAI/README.md - examples/react-native/RunAnywhereAI/android/gradle.properties.example No code changes. `runanywhere.testLocal` (the legacy alias) still works as documented in the build files — these docs just surface the canonical name as primary. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 6a7b013 commit c73b524

12 files changed

Lines changed: 21 additions & 21 deletions

File tree

AGENTS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This is a cross-platform SDK monorepo. On a Linux cloud VM, the buildable servic
88

99
| Component | Build | Test | Lint | Notes |
1010
|-----------|-------|------|------|-------|
11-
| Kotlin SDK (Android target) | `./gradlew :runanywhere-kotlin:compileDebugKotlinAndroid -Prunanywhere.testLocal=false` | Android unit tests require device/emulator | `./gradlew :runanywhere-kotlin:runKtlintCheckOverCommonMainSourceSet` | JVM target has a known issue: `RAGBridge.kt` in `jvmAndroidMain` imports `@Keep` from `androidx.annotation` which is unavailable for JVM compilation |
11+
| Kotlin SDK (Android target) | `./gradlew :runanywhere-kotlin:compileDebugKotlinAndroid -Prunanywhere.useLocalNatives=false` | Android unit tests require device/emulator | `./gradlew :runanywhere-kotlin:runKtlintCheckOverCommonMainSourceSet` | JVM target has a known issue: `RAGBridge.kt` in `jvmAndroidMain` imports `@Keep` from `androidx.annotation` which is unavailable for JVM compilation |
1212
| Web SDK (TypeScript) | `npm run build -w packages/core` (from `sdk/runanywhere-web/`) | N/A | `npm run typecheck -w packages/core` | `llamacpp` package has a pre-existing duplicate index signature TS error |
1313
| Web Example App | `npm run dev` (from `examples/web/RunAnywhereAI/`) | Manual browser testing at `localhost:5173` | N/A | Full Vite app, works in demo mode without WASM |
1414
| C++ Commons (core) | `cmake -B build ... && cmake --build build` (from `sdk/runanywhere-commons/`) | `./build/tests/test_core --run-all` (13 tests, no models needed) | N/A | Must use `gcc`/`g++` via `CC=gcc CXX=g++` (clang lacks C++ stdlib headers). Pass `-DRAC_BUILD_PLATFORM=OFF` on Linux |
@@ -21,7 +21,7 @@ This is a cross-platform SDK monorepo. On a Linux cloud VM, the buildable servic
2121

2222
- **Android SDK**: Installed at `/opt/android-sdk`. `ANDROID_HOME` and `JAVA_HOME` are set in `~/.bashrc`.
2323
- **JDK 17**: Required by Gradle JVM toolchain. Both JDK 17 and JDK 21 are installed.
24-
- **`testLocal` flag**: Set to `true` in `gradle.properties`. Pass `-Prunanywhere.testLocal=false` to Gradle to avoid needing Android NDK (downloads pre-built JNI libs from GitHub releases instead of building locally).
24+
- **`testLocal` flag**: Set to `true` in `gradle.properties`. Pass `-Prunanywhere.useLocalNatives=false` to Gradle to avoid needing Android NDK (downloads pre-built JNI libs from GitHub releases instead of building locally).
2525
- **C++ compiler**: Default clang on this VM lacks `libc++` headers. Use `gcc`/`g++` via `-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++`.
2626
- **`local.properties`**: Auto-created at root, `sdk/runanywhere-kotlin/`, and `examples/android/RunAnywhereAI/` with `sdk.dir=/opt/android-sdk`.
2727
- **pre-commit hooks**: Installed via `pre-commit install`. Requires `git config --unset-all core.hooksPath` first if `core.hooksPath` is set.

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ tasks.register("setup") {
115115

116116
// Check build mode and run native setup if needed
117117
val testLocal = projectDir.resolve("gradle.properties").let { f ->
118-
f.exists() && f.readText().contains("runanywhere.testLocal=true")
118+
f.exists() && f.readText().contains("runanywhere.useLocalNatives=true")
119119
}
120120
println("Build mode: testLocal=$testLocal")
121121

docs/building.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,15 @@ Native libraries can be sourced in two ways, controlled by `gradle.properties`:
8383
Downloads pre-built `.so` files from GitHub releases. No NDK required.
8484

8585
```properties
86-
runanywhere.testLocal=false
86+
runanywhere.useLocalNatives=false
8787
```
8888

8989
### Local mode (for C++ development)
9090

9191
Builds native libraries from `runanywhere-commons` source. Requires NDK.
9292

9393
```properties
94-
runanywhere.testLocal=true
94+
runanywhere.useLocalNatives=true
9595
```
9696

9797
First-time local setup:

docs/sdks/kotlin-sdk.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -519,10 +519,10 @@ Controlled by `gradle.properties`:
519519

520520
```properties
521521
# Local development (build C++ from source)
522-
runanywhere.testLocal=true
522+
runanywhere.useLocalNatives=true
523523

524524
# CI/Release (download pre-built from GitHub releases)
525-
runanywhere.testLocal=false
525+
runanywhere.useLocalNatives=false
526526
runanywhere.nativeLibVersion=0.1.4
527527
```
528528

examples/android/RunAnywhereAI/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ The `build-kotlin.sh --setup` script:
6161
1. Downloads dependencies (Sherpa-ONNX, ~500MB)
6262
2. Builds the native C++ libraries from `runanywhere-commons`
6363
3. Copies JNI `.so` files to `sdk/runanywhere-kotlin/src/androidMain/jniLibs/`
64-
4. Sets `runanywhere.testLocal=true` in `gradle.properties`
64+
4. Sets `runanywhere.useLocalNatives=true` in `gradle.properties`
6565

6666
### After Modifying the SDK
6767

examples/react-native/RunAnywhereAI/android/gradle.properties.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ android.enableJetifier=false
1010
# RunAnywhere SDK - Local Development
1111
# Set to true to use locally built native libraries
1212
# Set to false to download from GitHub releases
13-
runanywhere.testLocal=true
13+
runanywhere.useLocalNatives=true
1414

1515
# Gradle JVM Settings
1616
# Increase memory for React Native builds

jitpack.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ before_install:
2828
install:
2929
# Chain all commands so environment variables persist
3030
# Use publishToMavenLocal (not publishAllPublicationsToMavenLocal which doesn't exist)
31-
- export ANDROID_HOME=$HOME/android-sdk && export ANDROID_SDK_ROOT=$HOME/android-sdk && export PATH=$PATH:$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/platform-tools && cd sdk/runanywhere-kotlin && ./gradlew downloadJniLibs -Prunanywhere.testLocal=false --no-daemon && ./gradlew assembleRelease publishToMavenLocal -Prunanywhere.testLocal=false --no-daemon --info 2>&1 | tail -300
31+
- export ANDROID_HOME=$HOME/android-sdk && export ANDROID_SDK_ROOT=$HOME/android-sdk && export PATH=$PATH:$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/platform-tools && cd sdk/runanywhere-kotlin && ./gradlew downloadJniLibs -Prunanywhere.useLocalNatives=false --no-daemon && ./gradlew assembleRelease publishToMavenLocal -Prunanywhere.useLocalNatives=false --no-daemon --info 2>&1 | tail -300

sdk/runanywhere-kotlin/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -450,16 +450,16 @@ cd runanywhere-sdks/sdk/runanywhere-kotlin
450450
1. Downloads dependencies (Sherpa-ONNX, ~500MB)
451451
2. Builds `runanywhere-commons` for Android (arm64-v8a by default)
452452
3. Copies JNI libraries (`.so` files) to module `jniLibs/` directories
453-
4. Sets `runanywhere.testLocal=true` in `gradle.properties`
453+
4. Sets `runanywhere.useLocalNatives=true` in `gradle.properties`
454454

455455
### Understanding testLocal
456456

457-
The SDK has two modes controlled by `runanywhere.testLocal` in `gradle.properties`:
457+
The SDK has two modes controlled by `runanywhere.useLocalNatives` in `gradle.properties`:
458458

459459
| Mode | Setting | Description |
460460
|------|---------|-------------|
461-
| **Local** | `runanywhere.testLocal=true` | Uses JNI libs from `src/androidMain/jniLibs/` (for development) |
462-
| **Remote** | `runanywhere.testLocal=false` | Downloads JNI libs from GitHub releases (for end users) |
461+
| **Local** | `runanywhere.useLocalNatives=true` | Uses JNI libs from `src/androidMain/jniLibs/` (for development) |
462+
| **Remote** | `runanywhere.useLocalNatives=false` | Downloads JNI libs from GitHub releases (for end users) |
463463

464464
When you run `--setup`, the script automatically sets `testLocal=true`.
465465

sdk/runanywhere-kotlin/docs/KOTLIN_MAVEN_CENTRAL_PUBLISHING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ export MAVEN_CENTRAL_PASSWORD="<PASSWORD>"
110110
export ANDROID_HOME="$HOME/Library/Android/sdk"
111111

112112
./gradlew clean publishAllPublicationsToMavenCentralRepository \
113-
-Prunanywhere.testLocal=false \
113+
-Prunanywhere.useLocalNatives=false \
114114
-Prunanywhere.nativeLibVersion=0.17.5 \
115115
--no-daemon
116116
```
@@ -156,7 +156,7 @@ export MAVEN_CENTRAL_USERNAME="<USERNAME>"
156156
export MAVEN_CENTRAL_PASSWORD="<PASSWORD>"
157157

158158
./gradlew clean publishAllPublicationsToMavenCentralRepository \
159-
-Prunanywhere.testLocal=true \
159+
-Prunanywhere.useLocalNatives=true \
160160
--no-daemon
161161
```
162162

sdk/runanywhere-kotlin/modules/runanywhere-core-llamacpp/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ Native libraries are automatically downloaded from GitHub releases:
179179

180180
```kotlin
181181
// gradle.properties
182-
runanywhere.testLocal=false // Downloads from releases
182+
runanywhere.useLocalNatives=false // Downloads from releases
183183
runanywhere.coreVersion=0.1.4
184184
```
185185

@@ -189,7 +189,7 @@ For developing with local C++ builds:
189189

190190
```kotlin
191191
// gradle.properties
192-
runanywhere.testLocal=true // Uses local jniLibs/
192+
runanywhere.useLocalNatives=true // Uses local jniLibs/
193193
```
194194

195195
Then build the native libraries:

0 commit comments

Comments
 (0)