@momo-kits/native-kits 0.156.6-dialog.1-debug → 0.156.6-newcompose.1-debug

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/compose/build.gradle.kts +1 -4
  2. package/compose/build.gradle.kts.backup +0 -3
  3. package/compose/compose.podspec +11 -5
  4. package/compose/src/androidMain/kotlin/vn/momo/kits/platform/Platform.android.kt +2 -162
  5. package/compose/src/commonMain/kotlin/vn/momo/kits/application/Context.kt +12 -0
  6. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Badge.kt +19 -17
  7. package/compose/src/commonMain/kotlin/vn/momo/kits/components/BaselineView.kt +198 -0
  8. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Button.kt +42 -51
  9. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Icon.kt +23 -10
  10. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Image.kt +15 -12
  11. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Input.kt +14 -13
  12. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputPhoneNumber.kt +6 -7
  13. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Tooltip.kt +576 -0
  14. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Theme.kt +0 -4
  15. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/AutomationId.kt +1 -1
  16. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/BottomSheet.kt +1 -0
  17. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/ModalScreen.kt +1 -0
  18. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/NavigationContainer.kt +1 -49
  19. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigator.kt +152 -48
  20. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/StackScreen.kt +14 -1
  21. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/BottomTabBar.kt +29 -12
  22. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/Header.kt +4 -2
  23. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderTitle.kt +2 -1
  24. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/SnackBar.kt +4 -1
  25. package/compose/src/commonMain/kotlin/vn/momo/kits/platform/Platform.kt +1 -22
  26. package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Tracking.kt +15 -0
  27. package/compose/src/iosMain/kotlin/vn/momo/kits/platform/Platform.ios.kt +2 -178
  28. package/gradle/libs.versions.toml +1 -1
  29. package/gradle.properties +1 -1
  30. package/ios/Application/FloatingButton.swift +1 -1
  31. package/ios/Badge/BadgeRibbon.swift +2 -2
  32. package/ios/Image/Image.swift +5 -1
  33. package/ios/Input/Input.swift +2 -2
  34. package/ios/Input/InputPhoneNumber.swift +7 -3
  35. package/ios/Popup/PopupDisplay.swift +6 -12
  36. package/local.properties +1 -1
  37. package/package.json +1 -1
  38. package/publish.sh +26 -1
  39. package/compose/MoMoComposeKits.podspec +0 -54
@@ -15,33 +15,20 @@ import androidx.compose.ui.Modifier
15
15
  import androidx.compose.ui.graphics.Color
16
16
  import androidx.compose.ui.graphics.NativePaint
17
17
  import androidx.compose.ui.graphics.toArgb
18
+ import androidx.compose.ui.interop.UIKitView
18
19
  import androidx.compose.ui.unit.Dp
19
20
  import androidx.compose.ui.unit.dp
20
21
  import cocoapods.lottie_ios.CompatibleAnimation
21
22
  import cocoapods.lottie_ios.CompatibleAnimationKeypath
22
23
  import cocoapods.lottie_ios.CompatibleAnimationView
23
- import androidx.compose.ui.Alignment
24
- import androidx.compose.ui.ExperimentalComposeUiApi
25
- import androidx.compose.ui.layout.ContentScale
26
- import androidx.compose.ui.viewinterop.UIKitInteropProperties
27
- import androidx.compose.ui.viewinterop.UIKitView
28
- import cocoapods.SDWebImage.sd_setImageWithURL
29
24
  import kotlinx.cinterop.ExperimentalForeignApi
30
25
  import kotlinx.cinterop.get
31
26
  import kotlinx.cinterop.memScoped
32
- import kotlinx.cinterop.useContents
33
27
  import org.jetbrains.skia.FilterBlurMode
34
28
  import org.jetbrains.skia.MaskFilter
35
- import platform.CoreGraphics.CGRectMake
36
29
  import platform.Foundation.NSBundle
37
30
  import platform.UIKit.UIColor
38
- import platform.UIKit.UIImageRenderingMode
39
31
  import platform.UIKit.UIScreen
40
- import platform.Foundation.NSURL
41
- import platform.UIKit.UIImageView
42
- import platform.UIKit.UIViewContentMode
43
- import platform.UIKit.UIView
44
- import vn.momo.kits.components.Options
45
32
 
46
33
  actual fun getPlatformName(): String = "iOS"
47
34
 
@@ -159,167 +146,4 @@ fun Color.toUIColor(): UIColor {
159
146
 
160
147
  actual fun NativePaint.setColor(color: Color){
161
148
  this.color = color.toArgb()
162
- }
163
- /**
164
- * A container UIView that positions an inner UIImageView using the same
165
- * scale + alignment math as the Android Matrix implementation.
166
- */
167
- @OptIn(ExperimentalForeignApi::class)
168
- class ScaledAlignedImageView(
169
- var contentScale: ContentScale,
170
- var alignment: Alignment,
171
- var imageTintColor: UIColor? = null,
172
- ) : UIView(frame = CGRectMake(0.0, 0.0, 0.0, 0.0)) {
173
-
174
- val imageView = UIImageView().apply {
175
- backgroundColor = UIColor.clearColor()
176
- clipsToBounds = false
177
- contentMode = UIViewContentMode.UIViewContentModeScaleToFill
178
- }
179
-
180
- init {
181
- clipsToBounds = true
182
- addSubview(imageView)
183
- }
184
-
185
- fun applyTint() {
186
- val img = imageView.image ?: return
187
- val color = imageTintColor
188
- if (color != null) {
189
- imageView.tintColor = color
190
- imageView.image = img.imageWithRenderingMode(UIImageRenderingMode.UIImageRenderingModeAlwaysTemplate)
191
- } else {
192
- imageView.tintColor = super.tintColor
193
- imageView.image = img.imageWithRenderingMode(UIImageRenderingMode.UIImageRenderingModeAlwaysOriginal)
194
- }
195
- }
196
-
197
- override fun layoutSubviews() {
198
- super.layoutSubviews()
199
- applyImageFrame()
200
- }
201
-
202
- @OptIn(ExperimentalForeignApi::class)
203
- fun applyImageFrame() {
204
- memScoped {
205
- val img = imageView.image ?: return
206
- val rect = this@ScaledAlignedImageView.bounds.ptr[0]
207
- val vw: Double = rect.size.width
208
- val vh: Double = rect.size.height
209
- if (vw <= 0.0 || vh <= 0.0) return
210
-
211
- val imgSize = img.size
212
- val imgScale: Double = img.scale
213
- val deviceScale: Double = UIScreen.mainScreen.scale
214
- // Normalize: UIImage.size is in pts at img.scale, convert to dp-equivalent pts
215
- // (img pixel count = img.size × img.scale → dp = pixels / deviceScale)
216
- val dw: Double = (imgSize.useContents { width } * imgScale / deviceScale).takeIf { it > 0.0 } ?: return
217
- val dh: Double = (imgSize.useContents { height } * imgScale / deviceScale).takeIf { it > 0.0 } ?: return
218
-
219
- val sxFit: Double = vw / dw
220
- val syFit: Double = vh / dh
221
-
222
- val (sx: Double, sy: Double) = when (contentScale) {
223
- ContentScale.Crop -> maxOf(sxFit, syFit).let { it to it }
224
- ContentScale.Fit -> minOf(sxFit, syFit).let { it to it }
225
- ContentScale.FillWidth -> sxFit to sxFit
226
- ContentScale.FillHeight -> syFit to syFit
227
- ContentScale.FillBounds -> sxFit to syFit
228
- ContentScale.Inside -> minOf(1.0, minOf(sxFit, syFit)).let { it to it }
229
- ContentScale.None -> 1.0 to 1.0
230
- else -> maxOf(sxFit, syFit).let { it to it }
231
- }
232
-
233
- val (bx: Double, by: Double) = when (alignment) {
234
- Alignment.TopStart -> -1.0 to -1.0
235
- Alignment.TopCenter -> 0.0 to -1.0
236
- Alignment.TopEnd -> 1.0 to -1.0
237
- Alignment.CenterStart -> -1.0 to 0.0
238
- Alignment.Center -> 0.0 to 0.0
239
- Alignment.CenterEnd -> 1.0 to 0.0
240
- Alignment.BottomStart -> -1.0 to 1.0
241
- Alignment.BottomCenter -> 0.0 to 1.0
242
- Alignment.BottomEnd -> 1.0 to 1.0
243
- else -> 0.0 to 0.0
244
- }
245
-
246
- val scaledW: Double = dw * sx
247
- val scaledH: Double = dh * sy
248
- val tx: Double = (vw - scaledW) * (bx + 1.0) / 2.0
249
- val ty: Double = (vh - scaledH) * (by + 1.0) / 2.0
250
-
251
- imageView.setFrame(CGRectMake(tx, ty, scaledW, scaledH))
252
- }
253
- }
254
- }
255
-
256
- @OptIn(ExperimentalForeignApi::class, ExperimentalComposeUiApi::class)
257
- @Composable
258
- actual fun NativeImage(
259
- source: Any,
260
- options: Options,
261
- loading: Boolean,
262
- onLoading: () -> Unit,
263
- onSuccess: () -> Unit,
264
- onError: () -> Unit,
265
- ) {
266
- UIKitView(
267
- modifier = Modifier.fillMaxSize(),
268
- factory = {
269
- ScaledAlignedImageView(
270
- contentScale = options.contentScale,
271
- alignment = options.alignment,
272
- imageTintColor = options.tintColor?.toUIColor(),
273
- ).apply {
274
- backgroundColor = UIColor.clearColor()
275
- alpha = options.alpha.toDouble().coerceIn(0.0, 1.0)
276
- }
277
- },
278
- update = { container ->
279
- container.contentScale = options.contentScale
280
- container.alignment = options.alignment
281
- container.imageTintColor = options.tintColor?.toUIColor()
282
- container.alpha = options.alpha.toDouble().coerceIn(0.0, 1.0)
283
- container.applyImageFrame()
284
-
285
- val url = (source as? String)?.let { NSURL(string = it) } ?: run {
286
- container.imageView.image = null
287
- onError()
288
- return@UIKitView
289
- }
290
-
291
- try {
292
- onLoading()
293
- container.imageView.sd_setImageWithURL(
294
- url = url,
295
- placeholderImage = null,
296
- options = 0u,
297
- completed = { _, error, _, _ ->
298
- if (error == null) {
299
- container.applyTint()
300
- container.applyImageFrame()
301
- onSuccess()
302
- } else {
303
- onError()
304
- }
305
- }
306
- )
307
- true
308
- } catch (_: Throwable) {
309
- onError()
310
- }
311
- },
312
- properties = UIKitInteropProperties(
313
- placedAsOverlay = true,
314
- // Disable all touch handling on the interop host view so that
315
- // Compose click handlers on parent composables (e.g. Icon, BackButton)
316
- // receive touches correctly on iOS.
317
- interactionMode = null,
318
- )
319
- )
320
- }
321
-
322
- @Composable
323
- actual fun ConfigureDialogWindow(decorFitsSystemWindows: Boolean) {
324
- // iOS: dialogs already render behind system bars — no additional setup needed.
325
- }
149
+ }
@@ -7,7 +7,7 @@ coroutines = "1.8.1"
7
7
  kotlin = "2.3.0"
8
8
  kSerialize = "1.7.1"
9
9
  compose = "1.10.1"
10
- navigation-multiplatform = "2.9.1"
10
+ navigation-multiplatform = "2.9.0-beta02"
11
11
  coil3-multiplatform = "3.0.0-alpha10"
12
12
  androidGradlePlugin = "8.6.0"
13
13
  r8 = "8.13.19"
package/gradle.properties CHANGED
@@ -18,7 +18,7 @@ kotlin.apple.xcodeCompatibility.nowarn=true
18
18
  name="ComposeKits"
19
19
  group=vn.momo.kits
20
20
  artifact.id=kits
21
- version=0.156.6-dialog.1
21
+ version=0.156.6-newcompose.1
22
22
 
23
23
  repo=GitLab
24
24
  url=https://gitlab.mservice.com.vn/api/v4/projects/5400/packages/maven
@@ -154,7 +154,7 @@ public struct FloatingButton: View {
154
154
  Spacer().frame(width: 8)
155
155
  Text(label)
156
156
  .foregroundColor(.white)
157
- .font(.system(size: 16, weight: .bold))
157
+ .font(.system(size: scaleSize(16), weight: .bold))
158
158
  .lineLimit(1)
159
159
  .background(
160
160
  GeometryReader { geo in
@@ -137,7 +137,7 @@ public struct BadgeRibbon: View {
137
137
  private var roundContent: some View {
138
138
  HStack(spacing: 0) {
139
139
  Text(label)
140
- .font(.system(size: 12, weight: .medium))
140
+ .font(.system(size: scaleSize(12), weight: .medium))
141
141
  .foregroundColor(Colors.black01)
142
142
  .lineLimit(1)
143
143
  .rotationEffect(rotation)
@@ -158,7 +158,7 @@ public struct BadgeRibbon: View {
158
158
  private var skewContent: some View {
159
159
  HStack(spacing: 0) {
160
160
  Text(label)
161
- .font(.system(size: 12, weight: .medium))
161
+ .font(.system(size: scaleSize(12), weight: .medium))
162
162
  .foregroundColor(Colors.black01)
163
163
  .lineLimit(1)
164
164
  .rotationEffect(rotation)
@@ -31,7 +31,11 @@ public struct ImageView: View {
31
31
  .placeholder {
32
32
  VStack(alignment: .center, content: {
33
33
  if error {
34
- Image(systemName: "photo.badge.exclamationmark").frame(width: 24, height: 24)
34
+ Image("media_fail")
35
+ .resizable()
36
+ .renderingMode(.template)
37
+ .foregroundColor(Colors.black08)
38
+ .frame(width: 24, height: 24)
35
39
  } else if placeholder != nil {
36
40
  placeholder
37
41
  }
@@ -174,7 +174,7 @@ public struct Input: View {
174
174
  onChangeText?("")
175
175
  }) {
176
176
  Icon(source: "24_navigation_close_circle_full", size: 16, color: Colors.black12)
177
- .padding(.leading, Spacing.S)
177
+ .padding(.leading, Spacing.S).accessibility(identifier: "ic_clear")
178
178
  }
179
179
  }
180
180
 
@@ -194,7 +194,7 @@ public struct Input: View {
194
194
  size: 24,
195
195
  color: rightIconColor
196
196
  )
197
- .padding(.leading, Spacing.S)
197
+ .padding(.leading, Spacing.S).accessibility(identifier: "ic_show_hide")
198
198
  }
199
199
  }
200
200
  } else if !rightIcon.isEmpty {
@@ -21,6 +21,7 @@ public struct InputPhoneNumber: View {
21
21
  public var onFocus: (() -> Void)?
22
22
  public var onBlur: (() -> Void)?
23
23
  public var onRightIconPressed: (() -> Void)?
24
+ public var accessibilityLabel: String?
24
25
 
25
26
  @State private var isFocused: Bool = false
26
27
 
@@ -38,7 +39,8 @@ public struct InputPhoneNumber: View {
38
39
  onChangeText: ((String) -> Void)? = nil,
39
40
  onFocus: (() -> Void)? = nil,
40
41
  onBlur: (() -> Void)? = nil,
41
- onRightIconPressed: (() -> Void)? = nil
42
+ onRightIconPressed: (() -> Void)? = nil,
43
+ accessibilityLabel: String? = nil
42
44
  ) {
43
45
  self._text = text
44
46
  self.placeholder = placeholder
@@ -53,6 +55,7 @@ public struct InputPhoneNumber: View {
53
55
  self.onFocus = onFocus
54
56
  self.onBlur = onBlur
55
57
  self.onRightIconPressed = onRightIconPressed
58
+ self.accessibilityLabel = accessibilityLabel
56
59
  }
57
60
 
58
61
  // MARK: - Body
@@ -86,7 +89,7 @@ public struct InputPhoneNumber: View {
86
89
  MomoText(placeholder, typography: size == .small ? .headerSSemibold : .headerMBold, color: Colors.black12)
87
90
  }
88
91
 
89
- TextField("", text: textBinding, onEditingChanged: { focused in
92
+ TextField(placeholder, text: textBinding, onEditingChanged: { focused in
90
93
  handleFocusChange(focused)
91
94
  })
92
95
  .keyboardType(.numberPad)
@@ -94,6 +97,7 @@ public struct InputPhoneNumber: View {
94
97
  .foregroundColor(Colors.black17)
95
98
  .applyPrimaryCursorColor()
96
99
  .lineLimit(1)
100
+ .accessibility(identifier: accessibilityLabel ?? "")
97
101
  }
98
102
 
99
103
  // Clear button
@@ -103,7 +107,7 @@ public struct InputPhoneNumber: View {
103
107
  onChangeText?("")
104
108
  }) {
105
109
  Icon(source: "24_navigation_close_circle_full", size: 16, color: Colors.black12)
106
- .padding(.leading, Spacing.S)
110
+ .padding(.leading, Spacing.S).accessibility(identifier: "ic_clear")
107
111
  }
108
112
  }
109
113
 
@@ -128,9 +128,7 @@ public struct PopupDisplay: View {
128
128
  .clipped()
129
129
  }
130
130
  VStack(alignment: .leading, spacing: 0) {
131
- Text(title)
132
- .foregroundColor(.black)
133
- .font(.header_default_semibold)
131
+ MomoText(title, typography: .headerDefaultBold)
134
132
  .padding(.top, 24)
135
133
  .padding(.bottom, 8)
136
134
  .lineLimit(2)
@@ -139,9 +137,7 @@ public struct PopupDisplay: View {
139
137
  Group {
140
138
  if isScrollable {
141
139
  ScrollView(showsIndicators: false) {
142
- Text(description)
143
- .font(.body_default_regular)
144
- .foregroundColor(Colors.black17)
140
+ MomoText(description, typography: .bodyDefaultRegular)
145
141
  .multilineTextAlignment(.leading)
146
142
  .background(GeometryReader { geo in
147
143
  Color.clear.onAppear { textHeight = geo.size.height }
@@ -149,13 +145,12 @@ public struct PopupDisplay: View {
149
145
  .measureLineHeights(font: .body_default_regular,
150
146
  oneLine: $oneLineH,
151
147
  twoLines: $twoLineH)
148
+ .accessibility(identifier: "description_popup_permission")
152
149
  }
153
150
  // Cap the visible height to ~8.5 lines
154
151
  .frame(height: min(maxHeight8_5, textHeight))
155
152
  } else {
156
- Text(description)
157
- .font(.body_default_regular)
158
- .foregroundColor(Colors.black17)
153
+ MomoText(description, typography: .bodyDefaultRegular)
159
154
  .multilineTextAlignment(.leading)
160
155
  .background(GeometryReader { geo in
161
156
  Color.clear.onAppear {
@@ -167,14 +162,13 @@ public struct PopupDisplay: View {
167
162
  .measureLineHeights(font: .body_default_regular,
168
163
  oneLine: $oneLineH,
169
164
  twoLines: $twoLineH)
165
+ .accessibility(identifier: "description_popup_permission")
170
166
  }
171
167
  }
172
168
  .padding(.bottom, 8)
173
169
 
174
170
  if(!errorCode.isEmpty) {
175
- Text((errorCodeLabels[language] ?? "Mã lỗi: ") + errorCode)
176
- .foregroundColor(Colors.black12)
177
- .font(.description_xs_regular)
171
+ MomoText((errorCodeLabels[language] ?? "Mã lỗi: ") + errorCode, typography: .descriptionXsRegular, color: Colors.black12)
178
172
  .lineLimit(1)
179
173
  .padding(.bottom, 8)
180
174
  }
package/local.properties CHANGED
@@ -4,5 +4,5 @@
4
4
  # Location of the SDK. This is only used by Gradle.
5
5
  # For customization when using a Version Control System, please read the
6
6
  # header note.
7
- #Thu Oct 02 17:53:13 ICT 2025
7
+ #Mon Dec 22 10:07:29 ICT 2025
8
8
  sdk.dir=/Users/phuc/Library/Android/sdk
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/native-kits",
3
- "version": "0.156.6-dialog.1-debug",
3
+ "version": "0.156.6-newcompose.1-debug",
4
4
  "private": false,
5
5
  "dependencies": {},
6
6
  "devDependencies": {},
package/publish.sh CHANGED
@@ -185,7 +185,32 @@ phase_publish_maven() {
185
185
 
186
186
  ./gradlew :compose:publishAllPublicationsToGitLabPackagesRepository
187
187
 
188
- echo "✅ Maven publishing completed successfully!"
188
+ echo "✅ compose Maven publishing completed successfully!"
189
+
190
+ echo "📦 Publishing sample/shared KMP artifacts to Maven (version ${VERSION})..."
191
+
192
+ # Temporarily remove composeResources and compose { resources { ... } } block
193
+ echo "📦 Backing up sample/shared composeResources and build.gradle.kts..."
194
+ if [ -d "sample/shared/src/commonMain/composeResources" ]; then
195
+ mv sample/shared/src/commonMain/composeResources sample/shared/src/commonMain/composeResources.backup
196
+ fi
197
+ cp sample/shared/build.gradle.kts sample/shared/build.gradle.kts.backup
198
+ if [[ "$OSTYPE" == "darwin"* ]]; then
199
+ sed -i '' '/^compose {$/,/^}$/d' sample/shared/build.gradle.kts
200
+ else
201
+ sed -i '/^compose {$/,/^}$/d' sample/shared/build.gradle.kts
202
+ fi
203
+
204
+ ./gradlew :sample:shared:publishAllPublicationsToGitLabPackagesRepository
205
+
206
+ # Restore composeResources and build.gradle.kts
207
+ echo "📦 Restoring sample/shared composeResources and build.gradle.kts..."
208
+ mv sample/shared/build.gradle.kts.backup sample/shared/build.gradle.kts
209
+ if [ -d "sample/shared/src/commonMain/composeResources.backup" ]; then
210
+ mv sample/shared/src/commonMain/composeResources.backup sample/shared/src/commonMain/composeResources
211
+ fi
212
+
213
+ echo "✅ sample/shared Maven publishing completed successfully!"
189
214
  echo "✅ PHASE 2 COMPLETED"
190
215
  echo ""
191
216
  }
@@ -1,54 +0,0 @@
1
- Pod::Spec.new do |spec|
2
- spec.name = 'MoMoComposeKits'
3
- spec.version = '0.0.1'
4
- spec.homepage = 'MoMoComposeKits'
5
- spec.source = { :http=> ''}
6
- spec.authors = 'M_SERVICE'
7
- spec.license = ''
8
- spec.summary = 'MoMoComposeKits'
9
- spec.vendored_frameworks = 'build/cocoapods/framework/compose.framework'
10
- spec.libraries = 'c++'
11
- spec.ios.deployment_target = '13.0'
12
- spec.dependency 'SDWebImage', '>= 5.19.1'
13
-
14
- if !Dir.exist?('build/cocoapods/framework/compose.framework') || Dir.empty?('build/cocoapods/framework/compose.framework')
15
- raise "
16
-
17
- Kotlin framework 'compose' doesn't exist yet, so a proper Xcode project can't be generated.
18
- 'pod install' should be executed after running ':generateDummyFramework' Gradle task:
19
-
20
- ./gradlew :compose:generateDummyFramework
21
-
22
- Alternatively, proper pod installation is performed during Gradle sync in the IDE (if Podfile location is set)"
23
- end
24
-
25
- spec.xcconfig = {
26
- 'ENABLE_USER_SCRIPT_SANDBOXING' => 'NO',
27
- }
28
-
29
- spec.pod_target_xcconfig = {
30
- 'KOTLIN_PROJECT_PATH' => ':compose',
31
- 'PRODUCT_MODULE_NAME' => 'compose',
32
- }
33
-
34
- spec.script_phases = [
35
- {
36
- :name => 'Build MoMoComposeKits',
37
- :execution_position => :before_compile,
38
- :shell_path => '/bin/sh',
39
- :script => <<-SCRIPT
40
- if [ "YES" = "$OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED" ]; then
41
- echo "Skipping Gradle build task invocation due to OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED environment variable set to \"YES\""
42
- exit 0
43
- fi
44
- set -ev
45
- REPO_ROOT="$PODS_TARGET_SRCROOT"
46
- "$REPO_ROOT/../gradlew" -p "$REPO_ROOT" $KOTLIN_PROJECT_PATH:syncFramework \
47
- -Pkotlin.native.cocoapods.platform=$PLATFORM_NAME \
48
- -Pkotlin.native.cocoapods.archs="$ARCHS" \
49
- -Pkotlin.native.cocoapods.configuration="$CONFIGURATION"
50
- SCRIPT
51
- }
52
- ]
53
- spec.resources = ['build/compose/cocoapods/compose-resources']
54
- end