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:
bash1cd ~/projects2git clone https://github.com/baselinesio/baselines-kmp.git baselines-kmp3./baselines-kmp/baselines_create.sh
The script asks for:
- internal namespace / source package, for example
com.example.myapp - Android application ID / iOS bundle identifier, defaulting to the namespace
- project identifier, for example
MyApp - display name, for example
My App
Non-Interactive Generation
Use flags in automation or when you want a repeatable command:
bash1./baselines-kmp/baselines_create.sh \2 --namespace com.example.myapp \3 --app-id com.example.myapp.mobile \4 --name MyApp \5 --display-name "My App" \6 --output ./MyApp
--namespace controls source packages and internal identifiers; --app-id sets both platform
application identifiers. In non-interactive usage, omitting --app-id uses the namespace.
--package remains an alias for --namespace.
Documentation examples use the template namespace io.baselines.sample. In a generated project,
use your chosen namespace.
What The Generator Does
The generator:
- validates namespace, application ID, and project identifier before writing files
- copies tracked and unignored template files
- skips local build output and machine-specific files
- replaces the template namespace, application IDs, project identifier, and display name
- moves Kotlin package directories to the new package path
- writes
.baselines/template.propertiesfor future migrations - includes
baselines_migrate.shin 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:
bash1cd MyApp2./gradlew projects
Then open the Android and iOS projects:
bash1open -a "Android Studio" .2open ./app/ios/MyApp/MyApp.xcodeproj