# Multi-Machine Dev Setup for Unspooled

## Java Paths

The project needs JDK 21 for AGP 8.13+ / Kotlin 2.1.0 (compileOptions VERSION_21).

**Debian server (project host):**
```properties
# gradle.properties
org.gradle.java.home=/usr/lib/jvm/java-21-openjdk-amd64
```

**CachyOS / Arch workstation (when accessing via Samba):**
```properties
# gradle.properties
org.gradle.java.home=/usr/lib/jvm/java-21-openjdk
```

Switch JDK default on Arch:
```bash
sudo archlinux-java set java-21-openjdk
java -version   # verify 21.x
```

## SDK Paths

**Debian server:** `/home/rurouni/Android` (in `local.properties`)
**CachyOS:** `/home/raymond/Android/Sdk` (edit `local.properties` over Samba)

The `local.properties` file is NOT checked into version control — edit it on whichever machine you're building from.

## Credentials / API Keys

`gradle.properties` has empty API key placeholders. The Debian `local.properties` has working keys (`TRAKT_CLIENT_ID`, `TMDB_API_KEY`, `NEXSTREAM_SCRAPER_URL`). When developing from CachyOS via the Samba mount or rsync, copy those key lines to the CachyOS-local `local.properties`.

## Project Transfer Methods

**Preferred: rsync (no root needed, no daemon)**
```bash
# From Debian server, push to CachyOS (exclude build artifacts)
rsync -av --exclude='build/' --exclude='.gradle/' --exclude='.git/' \
  --exclude='*.iml' --exclude='.idea/' \
  /home/rurouni/Unspooled/ raymond@192.168.1.111:~/Unspooled/
```
Then fix `local.properties` SDK path on CachyOS:
```bash
ssh raymond@192.168.1.111 "sed -i 's|sdk.dir=.*|sdk.dir=/home/raymond/Android/Sdk|g' ~/Unspooled/local.properties"
```

**Alternative: Samba mount** — see `android-project-build` skill → `references/samba-multi-machine-dev.md`.

## AI Plugin: Continue.dev for Local Models

To use your local LLMs (via llama-swap on the Debian server) as an AI coding assistant in Android Studio:

1. Install **Continue** plugin from **Settings → Plugins → Marketplace**
2. Write config to `~/.continue/config.json`:
```json
{
  "models": [
    {
      "title": "Gemma 26B",
      "provider": "openai",
      "model": "gemma-26b-200k",
      "apiBase": "http://192.168.1.50:9292/v1",
      "apiKey": "not-needed"
    }
  ],
  "tabAutocompleteModel": {
    "title": "Gemma 12B",
    "provider": "openai",
    "model": "gemma-12b",
    "apiBase": "http://192.168.1.50:9292/v1",
    "apiKey": "not-needed"
  }
}
```
3. Restart Android Studio — models appear in the Continue sidebar

Available models on the server: `gemma-12b`, `gemma-26b-200k`, `qwen36-35b-mtp`, `nemotron-term-14b`, `nemotron-3-nano-30b`, `qwen3-coder-next`, `glm-4.7-flash-reap`.

## Full Multi-Machine Pattern

See `android-project-build` skill → `references/samba-multi-machine-dev.md` for the complete cross-machine Android dev setup guide (Samba mount flags, Gradle cache cleanup, ANDROID_HOME, .gitignore rules).
