Skip to main content

Android

Scaffold a native Android application with Kotlin and Jetpack Compose.

Nova supplies the workspace registration and lifecycle scripts. Google's official Android CLI supplies the current Android Gradle Plugin, Kotlin, Compose, SDK, Gradle wrapper, source, and test files, so Nova does not freeze an aging copy of the native project template.

Why Use This Command?

  1. Generates a native Kotlin and Jetpack Compose application from Google's current empty-activity template.
  2. Keeps the Android project current through the installed Android CLI while preserving Nova's standard workspace and script structure.
  3. Includes Android linting, native unit tests, debug builds, and a development command that builds, deploys, and launches the app.
  4. Lints and type-checks Nova's Node.js Gradle adapter separately and includes a Vitest suite for generated helper tooling.

Requirements

  • Android CLI — Install Google's Android CLI and make android available on your PATH.
  • Android toolchain — Configure the Java runtime and Android SDK required by the Android CLI.
  • Empty directory or monorepo root — Nova auto-detects whether to create a project or add a workspace.

Usage

Options

FlagDescription
--application-id <id>Android application ID and namespace; defaults to com.example.{normalizedWorkspaceName}.
-d, --dry-runValidate and preview paths without invoking the Android CLI or writing files.
--name <name>Project slug when creating a new monorepo; omit at an existing root.
--non-interactiveRequire every answer as a flag and do not open prompts.
--workspace-name <name>Workspace directory name and source for the generated application title and default identifier.
--output <dir>Output directory.

Output Files

PathDescription
app/Native Android source, resources, manifest, lint configuration, and tests.
gradle/Version catalog and Gradle wrapper generated by the Android CLI.
build.gradle.ktsRoot Android build configuration.
settings.gradle.ktsGenerated Gradle project and repository configuration.
gradlew, gradlew.batCross-platform Gradle wrapper scripts.
package.jsonNova-managed development, check, build, and clean script groups.
scripts/run-gradle.mjsCross-platform adapter that selects the correct generated Gradle wrapper script.
tests/project.test.tsVitest smoke suite for Nova-managed Node.js helper tooling.
tsconfig.*.jsonSeparate strict TypeScript contracts for helper scripts and tests.
vitest.config.mtsTest discovery scoped to Nova-managed helper tests.

Non-Interactive Mode

bash
nova scaffold app android --non-interactive --name my-mobile-app --workspace-name mobile --application-id com.example.mobile --output ./my-mobile-app
nova scaffold app android --non-interactive --workspace-name mobile --application-id com.example.mobile --output ./apps/mobile

Registration and Failure Safety

Nova registers the workspace with the app role and trackable policy only after the Android CLI project generator succeeds. If native generation fails, the files remain available for inspection, but Nova does not record a partially prepared workspace.

The package name follows {projectSlug}-app-{workspaceName}. The Android application ID defaults to com.example.{normalizedWorkspaceName} unless you provide --application-id.