Skip to content

Group F: Android SDK (opt-in, heavy) #31

Description

@thompsonson

Standalone. Opt-in only — Android SDK is ~3 GiB and only relevant on machines doing Android or Tauri-mobile work. install_android=false by default everywhere.

Changes

.chezmoi.toml.tmpl — new data flag

[data]
install_android = false

Default off on every platform. Flip manually on machines that need it.

$macosSpecific

Under {{ if .install_android }}:

android-commandlinetools   # brew cask — minimum footprint, not Android Studio

Linux: new run_once_after_install-android-sdk.sh.tmpl

Gated on {{ if .install_android }}. Idempotent:

  • Download commandlinetools-linux-*.zip into ~/Android/Sdk/cmdline-tools/latest/ if not already present.
  • Accept licenses: yes | sdkmanager --licenses.
  • Install core packages: sdkmanager "platform-tools" "platforms;android-35" "build-tools;35.0.0".
  • Honor ANDROID_SDK_ROOT if set.

Pick Android API level 35 (matches recent Play Store requirements). Bump in a follow-up if needed.

dot_zshrc

Guarded by [ -d "$HOME/Android/Sdk" ] so no-SDK machines don't see stale env vars:

if [ -d "$HOME/Android/Sdk" ]; then
  export ANDROID_HOME="$HOME/Android/Sdk"
  export ANDROID_SDK_ROOT="$HOME/Android/Sdk"
  export PATH="$PATH:$ANDROID_HOME/platform-tools:$ANDROID_HOME/cmdline-tools/latest/bin"
fi

dot_local/bin/executable_sysup — doctor entries

  • tools_lang (or tools_dev): add adb, sdkmanager.
  • Guard both entries so the doctor doesn't flag them as missing when install_android=false — check presence of $HOME/Android/Sdk before expecting them, or just report "not installed (opt-in)" for the opt-in tools.
  • get_version(): cases for adb --version | head -1, sdkmanager --version.

Verification checklist

  • chezmoi execute-template renders cleanly with install_android=true and =false.
  • Default (install_android=false): rendered output has no Android references.
  • install_android=true on Linux: adb --version works after apply.
  • install_android=true on macOS: brew list --cask android-commandlinetools shows installed; adb on PATH after shell restart.
  • No-SDK machine: zsh startup doesn't export ANDROID_HOME (guard works).
  • sysup doctor is honest — does not warn about missing adb/sdkmanager when flag is off.

Explicit non-goals

  • No Android Studio install. android-commandlinetools is the honest minimum; install Studio manually where needed.
  • No emulator images — they are tens of GiB and developer-picked. Install via sdkmanager per project.
  • No Java/Kotlin toolchain here. If a future group needs them, separate issue.

Related

  • None — standalone.
  • Loosely related to Group D (Tauri): Tauri-mobile targets Android, so users who enable D may also want F. Kept separate so F remains opt-in.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions