File tree Expand file tree Collapse file tree 7 files changed +81
-1
lines changed Expand file tree Collapse file tree 7 files changed +81
-1
lines changed Original file line number Diff line number Diff line change 1
1
plugins {
2
- kotlin(" multiplatform" ) version " 1.3.50 " apply false
2
+ kotlin(" multiplatform" ) version " 1.3.61 " apply false
3
3
}
4
4
5
5
buildscript {
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import org.apache.tools.ant.taskdefs.condition.Os
3
3
plugins {
4
4
id(" com.android.library" )
5
5
kotlin(" multiplatform" )
6
+ kotlin(" native.cocoapods" )
6
7
`maven- publish`
7
8
}
8
9
repositories {
@@ -35,6 +36,14 @@ kotlin {
35
36
android {
36
37
publishLibraryVariants(" release" , " debug" )
37
38
}
39
+ val buildForDevice = project.findProperty(" kotlin.native.cocoapods.target" ) == " ios_arm"
40
+ val iosMain by sourceSets.creating
41
+ if (buildForDevice) {
42
+ iosArm64(" ios64" )
43
+ sourceSets[" ios64Main" ].dependsOn(iosMain)
44
+ } else {
45
+ iosX64(" ios" )
46
+ }
38
47
jvm {
39
48
val main by compilations.getting {
40
49
kotlinOptions {
@@ -57,6 +66,10 @@ kotlin {
57
66
val jvmMain by getting {
58
67
kotlin.srcDir(" src/androidMain/kotlin" )
59
68
}
69
+ val iosMain by getting {
70
+ dependencies {
71
+ }
72
+ }
60
73
}
61
74
}
62
75
Original file line number Diff line number Diff line change @@ -32,6 +32,14 @@ kotlin {
32
32
android {
33
33
publishLibraryVariants(" release" , " debug" )
34
34
}
35
+ val buildForDevice = project.findProperty(" kotlin.native.cocoapods.target" ) == " ios_arm"
36
+ val iosMain by sourceSets.creating
37
+ if (buildForDevice) {
38
+ iosArm64(" ios64" )
39
+ sourceSets[" ios64Main" ].dependsOn(iosMain)
40
+ } else {
41
+ iosX64(" ios" )
42
+ }
35
43
jvm {
36
44
val main by compilations.getting {
37
45
kotlinOptions {
@@ -52,6 +60,10 @@ kotlin {
52
60
api(" com.google.firebase:firebase-auth:17.0.0" )
53
61
}
54
62
}
63
+ val iosMain by getting {
64
+ dependencies {
65
+ }
66
+ }
55
67
val jvmMain by getting {
56
68
kotlin.srcDir(" src/androidMain/kotlin" )
57
69
}
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import org.apache.tools.ant.taskdefs.condition.Os
3
3
plugins {
4
4
id(" com.android.library" )
5
5
kotlin(" multiplatform" )
6
+ kotlin(" native.cocoapods" )
6
7
`maven- publish`
7
8
}
8
9
repositories {
@@ -35,6 +36,10 @@ kotlin {
35
36
android {
36
37
publishLibraryVariants(" release" , " debug" )
37
38
}
39
+
40
+ val iosArm64 = iosArm64()
41
+ val iosX64 = iosX64()
42
+
38
43
jvm {
39
44
val main by compilations.getting {
40
45
kotlinOptions {
@@ -57,6 +62,28 @@ kotlin {
57
62
val jvmMain by getting {
58
63
kotlin.srcDir(" src/androidMain/kotlin" )
59
64
}
65
+ val iosMain by creating {
66
+ dependencies {
67
+ }
68
+ }
69
+
70
+ configure(listOf (iosArm64, iosX64)) {
71
+ compilations.getByName(" main" ) {
72
+ source(sourceSets.get(" iosMain" ))
73
+ val firebasecore by cinterops.creating {
74
+ packageName(" cocoapods.FirebaseCore" )
75
+ defFile(file(" $projectDir /src/iosMain/c_interop/FirebaseCore.def" ))
76
+ // includeDirs("$projectDir/../native/Avalon/Pods/FirebaseCore/Firebase/Core/Public")
77
+ compilerOpts(" -F$projectDir /src/iosMain/c_interop/modules/FirebaseCore-6.0.2" )
78
+ }
79
+ }
80
+ }
81
+
82
+ cocoapods {
83
+ summary = " Firebase Core for iOS (plus community support for macOS and tvOS)"
84
+ homepage = " https://github.com/TeamHubApp/firebase-kotlin-multiplatform-sdk"
85
+ // pod("FirebaseCore", "~> 6.3.1")
86
+ }
60
87
}
61
88
}
62
89
Original file line number Diff line number Diff line change
1
+ language = Objective-C
2
+ modules = FirebaseCore
3
+ compilerOpts = -framework FirebaseCore
4
+ linkerOpts = -framework FirebaseCore
Original file line number Diff line number Diff line change @@ -32,6 +32,14 @@ kotlin {
32
32
android {
33
33
publishLibraryVariants(" release" , " debug" )
34
34
}
35
+ val buildForDevice = project.findProperty(" kotlin.native.cocoapods.target" ) == " ios_arm"
36
+ val iosMain by sourceSets.creating
37
+ if (buildForDevice) {
38
+ iosArm64(" ios64" )
39
+ sourceSets[" ios64Main" ].dependsOn(iosMain)
40
+ } else {
41
+ iosX64(" ios" )
42
+ }
35
43
jvm {
36
44
val main by compilations.getting {
37
45
kotlinOptions {
@@ -52,6 +60,10 @@ kotlin {
52
60
api(" com.google.firebase:firebase-firestore:19.0.2" )
53
61
}
54
62
}
63
+ val iosMain by getting {
64
+ dependencies {
65
+ }
66
+ }
55
67
val jvmMain by getting {
56
68
kotlin.srcDir(" src/androidMain/kotlin" )
57
69
}
Original file line number Diff line number Diff line change @@ -32,6 +32,14 @@ kotlin {
32
32
android {
33
33
publishLibraryVariants(" release" , " debug" )
34
34
}
35
+ val buildForDevice = project.findProperty(" kotlin.native.cocoapods.target" ) == " ios_arm"
36
+ val iosMain by sourceSets.creating
37
+ if (buildForDevice) {
38
+ iosArm64(" ios64" )
39
+ sourceSets[" ios64Main" ].dependsOn(iosMain)
40
+ } else {
41
+ iosX64(" ios" )
42
+ }
35
43
jvm {
36
44
val main by compilations.getting {
37
45
kotlinOptions {
@@ -53,6 +61,10 @@ kotlin {
53
61
implementation(" com.google.code.gson:gson:2.7" )
54
62
}
55
63
}
64
+ val iosMain by getting {
65
+ dependencies {
66
+ }
67
+ }
56
68
val jvmMain by getting {
57
69
kotlin.srcDir(" src/androidMain/kotlin" )
58
70
dependencies {
You can’t perform that action at this time.
0 commit comments