From d3b99b28e93b445c99917c7811fad575c149645f Mon Sep 17 00:00:00 2001 From: Sternbach-Software <60489781+Sternbach-Software@users.noreply.github.com> Date: Tue, 10 Mar 2026 18:42:57 +0000 Subject: [PATCH] Initialize shared Kotlin Multiplatform module - Added `shared` module with `build.gradle.kts` configured for KMP. - Added targets for android, iosX64, iosArm64, iosSimulatorArm64, and jvm (desktop). - Updated `settings.gradle` to include `:shared`. - Updated `app/build.gradle` to depend on the new `:shared` module. - Added `/shared/build` to `.gitignore`. --- .gitignore | 2 ++ app/build.gradle | 2 ++ settings.gradle | 1 + shared/build.gradle.kts | 37 +++++++++++++++++++++++++++++++++++++ 4 files changed, 42 insertions(+) create mode 100644 shared/build.gradle.kts diff --git a/.gitignore b/.gitignore index e758bc3..54e045a 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,5 @@ .externalNativeBuild app/.cxx/ /app/.cxx/ + +/shared/build diff --git a/app/build.gradle b/app/build.gradle index 0f817a5..e42f662 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -77,4 +77,6 @@ dependencies { implementation 'androidx.activity:activity-compose:1.9.0' // Optional - Integration with ViewModels implementation 'androidx.lifecycle:lifecycle-viewmodel-compose:2.6.1' + + implementation project(':shared') } diff --git a/settings.gradle b/settings.gradle index e7b4def..c86de76 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1 +1,2 @@ include ':app' +include ':shared' diff --git a/shared/build.gradle.kts b/shared/build.gradle.kts new file mode 100644 index 0000000..ace02af --- /dev/null +++ b/shared/build.gradle.kts @@ -0,0 +1,37 @@ +plugins { + kotlin("multiplatform") + id("com.android.library") +} + +kotlin { + androidTarget() + + iosX64() + iosArm64() + iosSimulatorArm64() + + jvm("desktop") + + sourceSets { + val commonMain by getting + val androidMain by getting + val iosX64Main by getting + val iosArm64Main by getting + val iosSimulatorArm64Main by getting + val iosMain by creating { + dependsOn(commonMain) + iosX64Main.dependsOn(this) + iosArm64Main.dependsOn(this) + iosSimulatorArm64Main.dependsOn(this) + } + val desktopMain by getting + } +} + +android { + namespace = "io.github.angelsl.wabbitemu.shared" + compileSdk = 36 + defaultConfig { + minSdk = 21 + } +}