From 37ac290059b3de3dcb4d15bf4df6b9bb452d8c2c Mon Sep 17 00:00:00 2001
From: rvenky125 <venkypaithireddy@gmail.com>
Date: Wed, 17 Apr 2024 07:34:46 +0530
Subject: [PATCH] dependency changes

---
 device-info/build.gradle.kts | 42 ++++++++++++++++++++++++++----------
 1 file changed, 31 insertions(+), 11 deletions(-)

diff --git a/device-info/build.gradle.kts b/device-info/build.gradle.kts
index 2df1bd8..1d027bb 100644
--- a/device-info/build.gradle.kts
+++ b/device-info/build.gradle.kts
@@ -1,8 +1,9 @@
 import com.vanniktech.maven.publish.JavadocJar
 import com.vanniktech.maven.publish.KotlinMultiplatform
 import com.vanniktech.maven.publish.SonatypeHost
+import org.jetbrains.kotlin.gradle.plugin.mpp.pm20.GradleKpmIosX64Variant
 
-val libVersion = "0.0.11-alpha"
+val libVersion = "0.0.12-alpha"
 val artifactId = "kmp-device-info"
 val groupId = "io.github.rvenky125"
 
@@ -23,9 +24,17 @@ kotlin {
             }
         }
     }
-    iosX64()
-    iosArm64()
-    iosSimulatorArm64()
+
+    listOf(
+        iosX64(),
+        iosArm64(),
+        iosSimulatorArm64(),
+    ).forEach { iosTarget ->
+        iosTarget.binaries.framework {
+            baseName = "kmp-device-info"
+            isStatic = true
+        }
+    }
 
     cocoapods {
         summary = "This module provides device info"
@@ -39,16 +48,27 @@ kotlin {
     }
 
     sourceSets {
-        androidMain.dependencies {
-            implementation("androidx.startup:startup-runtime:1.1.1")
+        val commonMain by getting {
+            dependencies {
+            }
         }
-        commonMain.dependencies {
-
+        val androidMain by getting {
+            dependencies {
+                implementation("androidx.startup:startup-runtime:1.1.1")
+            }
         }
-        iosMain.dependencies {
-
+        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)
         }
-        iosTest.dependencies {
+        androidMain.dependencies {
+        }
+        commonMain.dependencies {
 
         }
         commonTest.dependencies {