# Android Packaging (skroogecompanion)

This target is prepared for KDE/Qt Android packaging using `ECMAddAndroidApk`.

## Prerequisites

- Android SDK + NDK
- Qt 6 for Android
- ECM toolchain (`/usr/share/ECM/toolchain/Android.cmake`)

## Configure

```bash
cmake -S . -B build-android \
  -DCMAKE_TOOLCHAIN_FILE=/usr/share/ECM/toolchain/Android.cmake \
  -DCMAKE_BUILD_TYPE=Release
```

If Qt/3rd-party prefixes are outside the default Android sysroot, add:

```bash
-DECM_ADDITIONAL_FIND_ROOT_PATH="/path/to/qt-android;/path/to/other/prefix"
```

## Build APK

```bash
cmake --build build-android --target create-apk-skroogecompanion
```

APK output is generated in:

- `build-android/skroogecompanion_build_apk/` (default), or
- `ANDROID_APK_OUTPUT_DIR` if provided at configure time.

## Signing / Installing

Pass extra arguments to `androiddeployqt` through:

- `-DANDROIDDEPLOYQT_EXTRA_ARGS="--sign /path/to/keystore alias"`
- or generator-specific target args where supported.
