Create A Project

Baselines projects are created with baselines_create.sh.

The generator is a shell script. It does not require Python or any project-specific generator tooling.

Requirements

You need:

  • Android Studio
  • Xcode
  • Git
  • A standard macOS/Linux shell with common Unix tools

Interactive Generation

From a workspace directory:

bash
1cd ~/projects
2git clone https://github.com/baselinesio/baselines-kmp.git baselines-kmp
3./baselines-kmp/baselines_create.sh

The script asks for:

  • package/application id, for example com.example.myapp
  • app identifier, for example MyApp
  • display name, for example My App

Non-Interactive Generation

Use flags in automation or when you want a repeatable command:

bash
1./baselines-kmp/baselines_create.sh \
2 --package com.example.myapp \
3 --name MyApp \
4 --display-name "My App" \
5 --output ./MyApp

What The Generator Does

The generator:

  • validates package and app identifiers before writing files
  • copies tracked and unignored template files
  • skips local build output and machine-specific files
  • replaces template package, app identifier, and display name
  • moves Kotlin package directories to the new package path
  • writes .baselines/template.properties for future migrations
  • includes baselines_migrate.sh in the generated project

Generation happens in a staging directory first. The final project directory is moved into place only after generation succeeds.

Validation

After generation:

bash
1cd MyApp
2./gradlew projects

Then open the Android and iOS projects:

bash
1open -a "Android Studio" .
2open ./app/ios/MyApp/MyApp.xcodeproj