Skip to content

Add starter templates: Android-only and Kotlin Multiplatform - #29

Closed
PiotrPrus wants to merge 2 commits into
mainfrom
feat/starter-templates
Closed

PiotrPrus wants to merge 2 commits into
mainfrom
feat/starter-templates

Conversation

@PiotrPrus

Copy link
Copy Markdown
Owner

Closes #28.

Adds two self-contained starter projects under templates/, each pre-wired with the published io.github.piotrprus:particle-emitter:1.1.0 from Maven Central and showing the simplest possible scene: one CanvasParticleEmitter centered on screen.

Template 1 — templates/android-only

A minimal single-module Android app with its own Gradle wrapper and version catalog.

  • MainActivity renders one centered CanvasParticleEmitter (gentle upward burst).
  • Run: ./gradlew :app:installDebug
  • ✅ Builds standalone and runs on an emulator (verified live).

Template 2 — templates/kmp

A Compose Multiplatform starter for Android, iOS, Desktop (JVM), macOS (native), and Web (Wasm). The shared UI lives in shared/src/commonMain/.../App.kt; every platform renders it from that single source.

Because AGP 9 no longer allows com.android.application + kotlin.multiplatform in one module, the layout mirrors the repo's split: a shared KMP library plus per-platform launchers (androidApp, desktopApp, webApp, macosApp) and an Xcode iosApp that embeds the shared framework.

Run commands (also in the template README):

Target Command
Android ./gradlew :androidApp:installDebug
Desktop ./gradlew :desktopApp:run
Web (Wasm) ./gradlew :webApp:wasmJsBrowserDevelopmentRun
macOS (native) ./gradlew :macosApp:runDebugExecutableMacosArm64
iOS open iosApp/iosApp.xcodeproj and run in Xcode

Verification

  • Android (both templates) — installed and ran on a Pixel 9a emulator; centered particle burst confirmed.
  • Desktop — :desktopApp:compileKotlin
  • Web — :webApp:compileKotlinWasmJs
  • macOS native — :macosApp:linkDebugExecutableMacosArm64 (executable linked)
  • iOS — :shared:linkDebugFrameworkIosSimulatorArm64 (framework linked); Xcode project retargeted to the Shared framework with the correct Gradle path.

iOS and macOS were compiled/linked but not launched in a simulator/window here; Android was run live.

Also adds templates/README.md and a pointer from the main README.

🤖 Generated with Claude Code

PiotrPrus and others added 2 commits July 3, 2026 11:01
A standalone single-module Android app (templates/android-only) with the
published ParticleEmitter library already wired in. MainActivity shows the
simplest possible use: one CanvasParticleEmitter centered on screen with a
gentle upward burst. Ships its own Gradle wrapper and version catalog and
runs with `./gradlew :app:installDebug`.

Part of #28

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
A standalone Compose Multiplatform starter (templates/kmp) with the
published ParticleEmitter library wired in, running on Android, iOS,
Desktop (JVM), macOS (native), and Web (Wasm). The shared App composable
shows the simplest possible use — one CanvasParticleEmitter centered on
screen — and every platform renders it from that single source.

Structure mirrors the repo's AGP-9-compatible split: a `shared` KMP
library plus per-platform launchers (androidApp, desktopApp, webApp,
macosApp) and an Xcode iosApp that embeds the shared framework. Each
target has a documented one-line run command in the template README.

Also adds templates/README.md and a pointer from the main README.

Part of #28

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@PiotrPrus PiotrPrus closed this Jul 3, 2026
@PiotrPrus
PiotrPrus deleted the feat/starter-templates branch July 3, 2026 11:26
@PiotrPrus

Copy link
Copy Markdown
Owner Author

@-

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add starter templates: Android-only and Kotlin Multiplatform

1 participant