forked from RunanywhereAI/runanywhere-sdks
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjitpack.yml
More file actions
31 lines (28 loc) · 1.75 KB
/
jitpack.yml
File metadata and controls
31 lines (28 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# JitPack build configuration for RunAnywhere Kotlin SDK
# https://jitpack.io/docs/BUILDING/
#
# The Kotlin SDK is in subdirectory: sdk/runanywhere-kotlin/
# Build all modules (main SDK + LlamaCPP + ONNX backends)
#
# IMPORTANT: For Android libraries with native libs, we must:
# 1. Set up Android SDK (JitPack doesn't have it by default)
# 2. Download native libs FIRST (they're built by our CI/CD)
# 3. Build Android targets explicitly
# 4. Publish to Maven Local
jdk:
- openjdk17
# Install Android SDK and NDK (required for AAR builds)
before_install:
- chmod +x sdk/runanywhere-kotlin/gradlew
- export ANDROID_HOME=$HOME/android-sdk
- mkdir -p $ANDROID_HOME/cmdline-tools
- wget -q https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip -O /tmp/cmdline-tools.zip
- unzip -q /tmp/cmdline-tools.zip -d $ANDROID_HOME/cmdline-tools
- mv $ANDROID_HOME/cmdline-tools/cmdline-tools $ANDROID_HOME/cmdline-tools/latest
- yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses > /dev/null 2>&1 || true
- $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "platforms;android-35" "platforms;android-36" "build-tools;35.0.0" > /dev/null
- echo "ANDROID_HOME=$HOME/android-sdk" >> $HOME/.bashrc
install:
# Chain all commands so environment variables persist
# Use publishToMavenLocal (not publishAllPublicationsToMavenLocal which doesn't exist)
- 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