Skip to content

Use new KMP project structure on generated projects#13

Merged
alexstyl merged 9 commits into
mainfrom
codex/fix-generated-agp-gradle
Jun 23, 2026
Merged

Use new KMP project structure on generated projects#13
alexstyl merged 9 commits into
mainfrom
codex/fix-generated-agp-gradle

Conversation

@alexstyl

@alexstyl alexstyl commented Jun 23, 2026

Copy link
Copy Markdown
Member

Summary

  • migrate generated projects to the JetBrains-style module layout with shared, androidApp, iosApp, desktopApp, and webApp
  • keep web generation wasm-only and move the launcher/build wiring into webApp
  • update target-add flows so JVM, iOS, and Wasm align with the split module structure instead of mutating the shared module into an app module
  • simplify template rendering in Cli.kt by centralizing shared placeholder expansion and Wasm preload task generation
  • migrate generated previews to androidx.compose.ui.tooling.preview.Preview with org.jetbrains.compose.ui:ui-tooling-preview
  • replace deprecated generated Android KMP and Compose web wiring with android {} plus direct version-catalog Compose UI dependencies
  • stop forcing compileIosMainKotlinMetadata during project creation so generation stays clean even when upstream native dependency metadata emits duplicate-KLIB warnings

Verification

  • ./gradlew test spotlessCheck
  • ./gradlew run --args='create-app /tmp/composables-cli-preview4 --package=com.example.preview --app-name=Preview --targets=jvm,android,ios,wasm --overwrite'
  • generated project: ./gradlew :androidApp:assembleDebug
  • generated project: ./gradlew :webApp:wasmJsBrowserDistribution

Notes

  • The generated shared module now uses androidx.compose.ui.tooling.preview.Preview, org.jetbrains.compose.ui:ui-tooling-preview, androidRuntimeClasspath(org.jetbrains.compose.ui:ui-tooling), and the new android {} Kotlin Multiplatform Android DSL.
  • Manual compileIosMainKotlinMetadata still reports duplicate KLIB unique_name warnings from the native metadata dependency graph behind com.composables:ui; the generator no longer triggers that task during creation.
  • The Wasm distribution task is clean from generator-owned deprecations; the remaining output is upstream tooling noise such as Gradle configuration-time npm resolution warnings and Node's url.parse() deprecation warning during npm install.

@alexstyl alexstyl changed the title [codex] Fix generated Android Gradle compatibility [codex] Upgrade generated Android projects to AGP 9.2.1 Jun 23, 2026
@alexstyl alexstyl changed the title [codex] Upgrade generated Android projects to AGP 9.2.1 [codex] Migrate generated Android projects to Android KMP Jun 23, 2026
@alexstyl alexstyl changed the title [codex] Migrate generated Android projects to Android KMP Use shared/androidApp/iosApp/desktopApp/webApp generated structure Jun 23, 2026
@alexstyl alexstyl changed the title Use shared/androidApp/iosApp/desktopApp/webApp generated structure Use new KMP project structure on generated projects Jun 23, 2026
@alexstyl alexstyl merged commit dd6f588 into main Jun 23, 2026
1 check passed
@alexstyl alexstyl deleted the codex/fix-generated-agp-gradle branch June 23, 2026 06:05
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.

1 participant