Skip to content

Commit 55df2e5

Browse files
markstCopilotCursorcursoragent
authored
Migrate to AGP 9.0: split composeApp into androidApp + shared KMP library (#40)
* Plan AGP 9.0 migration: split composeApp into androidApp + shared KMP library Co-authored-by: markst <274318+markst@users.noreply.github.com> * Split composeApp into androidApp + KMP shared library for AGP 9.0 Co-authored-by: markst <274318+markst@users.noreply.github.com> * Bump Kotlin and SQLDelight for AGP 9 DSL compatibility. Kotlin 2.4.0-RC's deprecated android() overload clashes with AGP 9's new android extension, and SQLDelight 2.1.0 breaks the new KMP Android library DSL. Co-authored-by: Cursor <cursoragent@cursor.com> * Expose Koin and radioplayer as api from composeApp. androidApp calls startKoin, androidContext, and PlatformMediaPlayer directly, so those transitive dependencies must be on its compile classpath. Co-authored-by: Cursor <cursoragent@cursor.com> * Update expandable-player-kt for AGP 9 Path A/C migration. Points the submodule at the shared+androidApp restructure and KMP Android library plugin swap. Co-authored-by: Cursor <cursoragent@cursor.com> * Point expandable-player-kt at example/ restructure. Only: expandable is consumed here; the demo shared/androidApp/iosApp modules moved under example/ in the submodule to make that boundary explicit. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: markst <274318+markst@users.noreply.github.com> Co-authored-by: Cursor <cursor@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 958ac09 commit 55df2e5

29 files changed

Lines changed: 75 additions & 41 deletions

‎androidApp/build.gradle.kts‎

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
2+
3+
plugins {
4+
alias(libs.plugins.androidApplication)
5+
alias(libs.plugins.composeCompiler)
6+
}
7+
8+
android {
9+
namespace = "com.weatherdrive"
10+
compileSdk = 37
11+
12+
defaultConfig {
13+
applicationId = "dev.markturnip.weatherdrive"
14+
minSdk = 26
15+
targetSdk = 37
16+
versionCode = 5
17+
versionName = "1.0"
18+
}
19+
20+
packaging {
21+
resources {
22+
excludes += "/META-INF/{AL2.0,LGPL2.1}"
23+
}
24+
}
25+
26+
buildTypes {
27+
getByName("release") {
28+
isMinifyEnabled = false
29+
}
30+
}
31+
32+
buildFeatures {
33+
compose = true
34+
}
35+
36+
compileOptions {
37+
sourceCompatibility = JavaVersion.VERSION_11
38+
targetCompatibility = JavaVersion.VERSION_11
39+
}
40+
41+
kotlin {
42+
compilerOptions {
43+
jvmTarget.set(JvmTarget.JVM_11)
44+
}
45+
}
46+
}
47+
48+
dependencies {
49+
implementation(project(":composeApp"))
50+
implementation(libs.androidx.activity.compose)
51+
}
File renamed without changes.

composeApp/src/androidMain/kotlin/com/weatherdrive/MainActivity.kt renamed to androidApp/src/main/kotlin/com/weatherdrive/MainActivity.kt

File renamed without changes.

composeApp/src/androidMain/kotlin/com/weatherdrive/WeatherdriveApp.kt renamed to androidApp/src/main/kotlin/com/weatherdrive/WeatherdriveApp.kt

File renamed without changes.

composeApp/src/androidMain/res/drawable/ic_launcher_background.xml renamed to androidApp/src/main/res/drawable/ic_launcher_background.xml

File renamed without changes.

composeApp/src/androidMain/res/drawable/ic_launcher_foreground.png renamed to androidApp/src/main/res/drawable/ic_launcher_foreground.png

File renamed without changes.

composeApp/src/androidMain/res/drawable/ic_splash_foreground.png renamed to androidApp/src/main/res/drawable/ic_splash_foreground.png

File renamed without changes.
File renamed without changes.

composeApp/src/androidMain/res/drawable/launch_screen.xml renamed to androidApp/src/main/res/drawable/launch_screen.xml

File renamed without changes.

composeApp/src/androidMain/res/mipmap-anydpi-v26/ic_launcher.xml renamed to androidApp/src/main/res/mipmap-anydpi-v26/ic_launcher.xml

File renamed without changes.

0 commit comments

Comments
 (0)