Core concepts

Build Stages

Every Lunadeck build goes through a series of stages. Each stage is isolated and produces artifacts consumed by the next.

Stage pipeline

Detect → Web Build → Wrap → Compile → Sign → Deliver

1. Detect

The AI engine analyzes your project and generates a build plan. This stage typically completes in under 5 seconds.

Output: Build configuration JSON

2. Web Build

Your web application is compiled using your framework's build command (e.g., next build, vite build).

Output: Static web assets in the output directory

3. Wrap

The web assets are wrapped in a native shell. For Capacitor projects, this runs cap sync. For Expo, this runs expo prebuild.

Output: A complete Android project with your web assets embedded

4. Compile

Gradle compiles the Android project into an APK or AAB.

Output: Unsigned APK/AAB binary

5. Sign

If a signing certificate is configured in the Certificate Vault, the binary is signed. Otherwise, a debug key is used.

Output: Signed APK/AAB binary

6. Deliver

The signed binary is uploaded to cloud storage and made available for download. If auto-publish is enabled, it's also submitted to the store.

Stage failures

If any stage fails, the build stops and the error is reported with the full stage log. You can re-run from the failed stage without repeating earlier stages.