@@ -80,50 +80,53 @@ kotlin {
80
80
publishAllLibraryVariants()
81
81
}
82
82
83
- fun nativeTargetConfig (): KotlinNativeTarget .() -> Unit = {
84
- val nativeFrameworkPaths = listOf (
85
- rootProject.project(" firebase-app" ).projectDir.resolve(" src/nativeInterop/cinterop/Carthage/Build/iOS" )
86
- ).plus(
87
- listOf (
88
- " FirebaseAnalytics" ,
89
- " FirebaseCore" ,
90
- " FirebaseCoreDiagnostics" ,
91
- " FirebaseInstallations" ,
92
- " GoogleAppMeasurement" ,
93
- " GoogleDataTransport" ,
94
- " GoogleUtilities" ,
95
- " nanopb" ,
96
- " PromisesObjC"
97
- ).map {
98
- rootProject.project(" firebase-app" ).projectDir.resolve(" src/nativeInterop/cinterop/Carthage/Build/$it .xcframework/${konanTarget.archVariant} " )
99
- }
100
- ).plus(
101
- listOf (
102
- " FirebaseAuth" ,
103
- " GTMSessionFetcher"
104
- ).map {
105
- projectDir.resolve(" src/nativeInterop/cinterop/Carthage/Build/$it .xcframework/${konanTarget.archVariant} " )
83
+ val supportIosTarget = project.property(" skipIosTarget" ) != " true"
84
+ if (supportIosTarget) {
85
+
86
+ fun nativeTargetConfig (): KotlinNativeTarget .() -> Unit = {
87
+ val nativeFrameworkPaths = listOf (
88
+ rootProject.project(" firebase-app" ).projectDir.resolve(" src/nativeInterop/cinterop/Carthage/Build/iOS" )
89
+ ).plus(
90
+ listOf (
91
+ " FirebaseAnalytics" ,
92
+ " FirebaseCore" ,
93
+ " FirebaseCoreDiagnostics" ,
94
+ " FirebaseInstallations" ,
95
+ " GoogleAppMeasurement" ,
96
+ " GoogleDataTransport" ,
97
+ " GoogleUtilities" ,
98
+ " nanopb" ,
99
+ " PromisesObjC"
100
+ ).map {
101
+ rootProject.project(" firebase-app" ).projectDir.resolve(" src/nativeInterop/cinterop/Carthage/Build/$it .xcframework/${konanTarget.archVariant} " )
102
+ }
103
+ ).plus(
104
+ listOf (
105
+ " FirebaseAuth" ,
106
+ " GTMSessionFetcher"
107
+ ).map {
108
+ projectDir.resolve(" src/nativeInterop/cinterop/Carthage/Build/$it .xcframework/${konanTarget.archVariant} " )
109
+ }
110
+ )
111
+ binaries {
112
+ getTest(" DEBUG" ).apply {
113
+ linkerOpts(nativeFrameworkPaths.map { " -F$it " })
114
+ linkerOpts(" -ObjC" )
115
+ }
106
116
}
107
- )
108
117
109
- binaries {
110
- getTest(" DEBUG" ).apply {
111
- linkerOpts(nativeFrameworkPaths.map { " -F$it " })
112
- linkerOpts(" -ObjC" )
118
+ compilations.getByName(" main" ) {
119
+ cinterops.create(" FirebaseAuth" ) {
120
+ compilerOpts(nativeFrameworkPaths.map { " -F$it " })
121
+ extraOpts(" -verbose" )
122
+ }
113
123
}
114
124
}
115
125
116
- compilations.getByName(" main" ) {
117
- cinterops.create(" FirebaseAuth" ) {
118
- compilerOpts(nativeFrameworkPaths.map { " -F$it " })
119
- extraOpts(" -verbose" )
120
- }
121
- }
126
+ ios(configure = nativeTargetConfig())
127
+ iosSimulatorArm64(configure = nativeTargetConfig())
122
128
}
123
129
124
- ios(configure = nativeTargetConfig())
125
- iosSimulatorArm64(configure = nativeTargetConfig())
126
-
127
130
js {
128
131
useCommonJs()
129
132
nodejs {
@@ -165,18 +168,26 @@ kotlin {
165
168
}
166
169
}
167
170
168
- val iosMain by getting
169
- val iosSimulatorArm64Main by getting
170
- iosSimulatorArm64Main.dependsOn(iosMain)
171
+ if (supportIosTarget) {
172
+ val iosMain by getting
173
+ val iosSimulatorArm64Main by getting
174
+ iosSimulatorArm64Main.dependsOn(iosMain)
171
175
172
- val iosTest by sourceSets.getting
173
- val iosSimulatorArm64Test by sourceSets.getting
174
- iosSimulatorArm64Test.dependsOn(iosTest)
176
+ val iosTest by sourceSets.getting
177
+ val iosSimulatorArm64Test by sourceSets.getting
178
+ iosSimulatorArm64Test.dependsOn(iosTest)
179
+ }
175
180
176
181
val jsMain by getting
177
182
}
178
183
}
179
184
185
+ if (project.property(" firebase-auth.skipIosTests" ) == " true" ) {
186
+ tasks.forEach {
187
+ if (it.name.contains(" ios" , true ) && it.name.contains(" test" , true )) { it.enabled = false }
188
+ }
189
+ }
190
+
180
191
signing {
181
192
val signingKey: String? by project
182
193
val signingPassword: String? by project
0 commit comments