Skip to main content

Android

Scaffold a native Android application with Kotlin and Jetpack Compose.

Nova owns the complete generated project: Gradle configuration and wrapper, Kotlin and Compose source, resources, tests, and workspace lifecycle scripts. Nova releases update the pinned Android toolchain deliberately, so two developers using the same Nova version receive the same project.

The generated package.json and Gradle versionName share the strategy-aware initial version: 0.0.1 for SemVer or the current UTC YYYY.M.0 period for CalVer. In an existing lock-step project, the app inherits the shared non-freezable version instead. Nova's changelog release flow keeps the two versions synchronized and advances versionCode from its initial value of 1 once for every released changelog entry.

Why Use This Command?

  1. Generates a deterministic native Kotlin and Jetpack Compose application directly from Nova's reviewed template.
  2. Pins the Android Gradle Plugin, Kotlin, Compose, and Gradle versions as one tested scaffold contract.
  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.
  5. Seeds editable Google Play Console metadata and asset directories under the repository's root assets/ folder.
  6. Stores launchpad and accessibility copy in Android string resources so additional locale resource directories can be added without rewriting Compose code.

Requirements

  • Android toolchain — Configure the Java runtime and install the Android SDK required by Gradle. Nova respects ANDROID_HOME or ANDROID_SDK_ROOT and otherwise checks the standard Android Studio SDK directory for macOS, Linux, or Windows.
  • Android CLI for npm run dev — Install Google's Android CLI when you want Nova's development command to build, deploy, and launch the application.
  • 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 the complete Nova-owned project without writing files.
--installInstall dependencies after scaffolding; this is the default.
--no-installSkip dependency installation.
--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, Nova launcher and social assets, manifest, lint configuration, and tests.
app/src/main/res/values/strings.xmlDefault English application, launchpad, and accessibility strings.
gradle/Nova-managed version catalog and pinned Gradle wrapper.
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/Cross-platform adapters that discover the Android SDK, run Gradle, and build, deploy, and launch the app.
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.
assets/google-play-console/{workspace}/Root-owned Google Play metadata, screenshots, and graphic assets.

Localization

The generated Compose interface reads user-visible and accessibility copy through Android's stringResource API. English remains the complete default resource set in res/values/strings.xml, so the app has safe fallbacks before another locale exists.

Add translated strings.xml files under Android's locale-qualified values-* directories when needed. Android selects the matching resources at runtime without an additional translation library.

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 every Nova-owned native and workspace file is written successfully, then adds android and kotlin to the root project.platforms list without removing existing entries. If generation fails, Nova does not record a partially prepared workspace.

Nova does not guess one file artifact for the native workspace because Gradle emits different APK, app-bundle, test, and signed products by task and build variant. Add a named artifact after choosing the exact product that belongs in the root assembly.

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

The scaffold creates an en-US Android listing placeholder plus documented screenshot and graphic-asset directories. Fill only the fields and asset targets you intend to change, then use nova integration google-play-console. Nova does not add /assets/ to the generated .gitignore; store assets remain project-owned and trackable by default.