@momo-kits/native-kits 0.157.0 → 0.157.1-beta.10-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.
- package/build.gradle.kts +11 -0
- package/compose/build.gradle.kts +180 -0
- package/compose/build.gradle.kts.backup +180 -0
- package/compose/compose.podspec +54 -0
- package/compose/src/androidMain/kotlin/vn/momo/kits/platform/Platform.android.kt +110 -0
- package/compose/src/commonMain/composeResources/font/momosignature.otf +0 -0
- package/compose/src/commonMain/composeResources/font/momotrustdisplay.otf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_black.otf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_black.ttf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_bold.ttf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_heavy.ttf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_light.ttf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_medium.ttf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_regular.ttf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_semibold.ttf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_thin.otf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_thin.ttf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_ultralight.otf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_ultralight.ttf +0 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/AnimationSearchInput.kt +57 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/Context.kt +107 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/FloatingButton.kt +201 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/Header.kt +222 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderAnimated.kt +48 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderBackground.kt +86 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderDefault.kt +76 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderExtended.kt +76 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderRight.kt +305 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderTitle.kt +33 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/LiteScreen.kt +720 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/NavigationContainer.kt +121 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/Screen.kt +405 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/useHeaderSearchAnimation.kt +69 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Badge.kt +85 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/BadgeDot.kt +32 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/BadgeRibbon.kt +340 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/BaselineView.kt +198 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Button.kt +357 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/CheckBox.kt +94 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Chip.kt +136 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/CupertinoOverscroll.kt +543 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Divider.kt +23 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Icon.kt +76 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/IconButton.kt +148 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Image.kt +188 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Information.kt +116 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Input.kt +448 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputDropDown.kt +172 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputMoney.kt +255 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputOTP.kt +231 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputPhoneNumber.kt +233 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputSearch.kt +254 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputTextArea.kt +241 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/LazyColumnWithBouncing.kt +364 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationDot.kt +56 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationNumber.kt +41 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationScroll.kt +92 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationWhiteDot.kt +40 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PopupNotify.kt +352 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PopupPromotion.kt +103 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Radio.kt +70 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/ScaleSizeScope.kt +17 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Skeleton.kt +96 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Switch.kt +96 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Tag.kt +92 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Text.kt +130 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Title.kt +214 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Tooltip.kt +576 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/TrustBanner.kt +177 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePicker.kt +205 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePickerTypes.kt +29 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePickerUtils.kt +239 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/WheelPicker.kt +191 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Colors.kt +306 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Radius.kt +12 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Spacing.kt +13 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Theme.kt +185 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Typography.kt +285 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Card.kt +2 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Item.kt +35 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Section.kt +2 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/AutomationId.kt +59 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Clickable.kt +68 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Conditional.kt +11 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/DeprecatedModifier.kt +14 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Shadow.kt +50 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Size.kt +51 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/BottomSheet.kt +239 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/ModalScreen.kt +119 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigation.kt +98 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/NavigationContainer.kt +161 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigator.kt +331 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/StackScreen.kt +497 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/BottomTab.kt +162 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/BottomTabBar.kt +243 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/CurvedContainer.kt +86 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/FloatingButton.kt +187 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/Header.kt +279 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderBackground.kt +80 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderRight.kt +306 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderTitle.kt +32 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderUser.kt +370 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/SnackBar.kt +132 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/platform/Platform.kt +42 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Icons.kt +1329 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Resources.kt +62 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Tracking.kt +15 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Utils.kt +88 -0
- package/compose/src/iosMain/kotlin/vn/momo/kits/platform/Platform.ios.kt +149 -0
- package/example/ios/Example.xcodeproj/xcuserdata/sophia.xcuserdatad/xcschemes/xcschememanagement.plist +14 -0
- package/example/ios/Example.xcworkspace/xcuserdata/sophia.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/example/ios/Example.xcworkspace/xcuserdata/sophia.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +6 -0
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sophia.xcuserdatad/xcschemes/MoMoUIKits.xcscheme +58 -0
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sophia.xcuserdatad/xcschemes/Pods-Example.xcscheme +58 -0
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sophia.xcuserdatad/xcschemes/SDWebImage.xcscheme +58 -0
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sophia.xcuserdatad/xcschemes/SDWebImageSwiftUI.xcscheme +58 -0
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sophia.xcuserdatad/xcschemes/SkeletonUI.xcscheme +58 -0
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sophia.xcuserdatad/xcschemes/lottie-ios-LottiePrivacyInfo.xcscheme +58 -0
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sophia.xcuserdatad/xcschemes/lottie-ios.xcscheme +58 -0
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sophia.xcuserdatad/xcschemes/xcschememanagement.plist +46 -0
- package/gradle/libs.versions.toml +57 -0
- package/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/gradle/wrapper/gradle-wrapper.properties +8 -0
- package/gradle.properties +26 -0
- package/gradlew +252 -0
- package/gradlew.bat +94 -0
- package/ios/Input/Input.swift +108 -50
- package/ios/Input/InputPhoneNumber.swift +2 -1
- package/local.properties +8 -0
- package/package.json +1 -1
- package/publish.sh +26 -1
- package/settings.gradle.kts +52 -0
package/ios/Input/Input.swift
CHANGED
|
@@ -32,7 +32,6 @@ public struct Input: View {
|
|
|
32
32
|
|
|
33
33
|
@State private var isFocused: Bool = false
|
|
34
34
|
@State private var isPasswordHidden: Bool = true
|
|
35
|
-
@State private var lastTextValue: String = ""
|
|
36
35
|
|
|
37
36
|
public init(
|
|
38
37
|
text: Binding<String>,
|
|
@@ -93,14 +92,6 @@ public struct Input: View {
|
|
|
93
92
|
let textBinding = Binding<String>(
|
|
94
93
|
get: { self.text },
|
|
95
94
|
set: { newValue in
|
|
96
|
-
// For SecureField, infer focus when text changes
|
|
97
|
-
if self.secureTextEntry && !self.isFocused && newValue != self.lastTextValue {
|
|
98
|
-
DispatchQueue.main.async {
|
|
99
|
-
self.isFocused = true
|
|
100
|
-
self.onFocus?()
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
self.lastTextValue = newValue
|
|
104
95
|
self.text = newValue
|
|
105
96
|
self.onChangeText?(newValue)
|
|
106
97
|
}
|
|
@@ -144,17 +135,18 @@ public struct Input: View {
|
|
|
144
135
|
}
|
|
145
136
|
|
|
146
137
|
if secureTextEntry && isPasswordHidden {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
138
|
+
SecureInputField(
|
|
139
|
+
text: $text,
|
|
140
|
+
keyboardType: keyboardType,
|
|
141
|
+
fontSize: scaleSize(14),
|
|
142
|
+
fontWeight: fontWeight == .bold ? .bold : .regular,
|
|
143
|
+
textColor: UIColor(getTextColor()),
|
|
144
|
+
isDisabled: disabled || readOnly,
|
|
145
|
+
onFocusChange: { focused in
|
|
146
|
+
handleFocusChange(focused)
|
|
147
|
+
},
|
|
148
|
+
onChangeText: onChangeText
|
|
149
|
+
)
|
|
158
150
|
} else {
|
|
159
151
|
TextField("", text: textBinding, onEditingChanged: { focused in
|
|
160
152
|
handleFocusChange(focused)
|
|
@@ -223,26 +215,10 @@ public struct Input: View {
|
|
|
223
215
|
hintText: hintText
|
|
224
216
|
)
|
|
225
217
|
}
|
|
226
|
-
.onAppear {
|
|
227
|
-
lastTextValue = text
|
|
228
|
-
}
|
|
229
218
|
.onReceive(NotificationCenter.default.publisher(for: UIResponder.keyboardWillHideNotification)) { _ in
|
|
230
|
-
|
|
231
|
-
if isFocused {
|
|
232
|
-
DispatchQueue.main.async {
|
|
233
|
-
if secureTextEntry {
|
|
234
|
-
handleSecureFieldBlur()
|
|
235
|
-
} else {
|
|
236
|
-
handleFocusChange(false)
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
.onReceive(NotificationCenter.default.publisher(for: UITextField.textDidEndEditingNotification)) { _ in
|
|
242
|
-
// Reset focus when any text field ends editing
|
|
243
|
-
if isFocused && secureTextEntry {
|
|
219
|
+
if isFocused && !secureTextEntry {
|
|
244
220
|
DispatchQueue.main.async {
|
|
245
|
-
|
|
221
|
+
handleFocusChange(false)
|
|
246
222
|
}
|
|
247
223
|
}
|
|
248
224
|
}
|
|
@@ -259,18 +235,6 @@ public struct Input: View {
|
|
|
259
235
|
}
|
|
260
236
|
}
|
|
261
237
|
|
|
262
|
-
private func handleSecureFieldFocus() {
|
|
263
|
-
if !isFocused {
|
|
264
|
-
isFocused = true
|
|
265
|
-
onFocus?()
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
private func handleSecureFieldBlur() {
|
|
270
|
-
isFocused = false
|
|
271
|
-
onBlur?()
|
|
272
|
-
}
|
|
273
|
-
|
|
274
238
|
private func togglePasswordVisibility() {
|
|
275
239
|
isPasswordHidden.toggle()
|
|
276
240
|
onRightIconPressed?()
|
|
@@ -307,6 +271,100 @@ public struct Input: View {
|
|
|
307
271
|
}
|
|
308
272
|
|
|
309
273
|
|
|
274
|
+
// MARK: - Secure Input Field (UIViewRepresentable)
|
|
275
|
+
private struct SecureInputField: UIViewRepresentable {
|
|
276
|
+
@Binding var text: String
|
|
277
|
+
var keyboardType: UIKeyboardType
|
|
278
|
+
var fontSize: CGFloat
|
|
279
|
+
var fontWeight: UIFont.Weight
|
|
280
|
+
var textColor: UIColor
|
|
281
|
+
var isDisabled: Bool
|
|
282
|
+
var onFocusChange: (Bool) -> Void
|
|
283
|
+
var onChangeText: ((String) -> Void)?
|
|
284
|
+
|
|
285
|
+
func makeCoordinator() -> Coordinator {
|
|
286
|
+
Coordinator(self)
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
func makeUIView(context: Context) -> UITextField {
|
|
290
|
+
let textField = UITextField()
|
|
291
|
+
textField.isSecureTextEntry = true
|
|
292
|
+
textField.delegate = context.coordinator
|
|
293
|
+
textField.keyboardType = keyboardType
|
|
294
|
+
textField.font = UIFont.systemFont(ofSize: fontSize, weight: fontWeight)
|
|
295
|
+
textField.textColor = textColor
|
|
296
|
+
textField.isEnabled = !isDisabled
|
|
297
|
+
textField.setContentHuggingPriority(.defaultLow, for: .horizontal)
|
|
298
|
+
textField.setContentCompressionResistancePriority(.defaultLow, for: .horizontal)
|
|
299
|
+
textField.text = text
|
|
300
|
+
textField.tintColor = UIColor(Colors.primary)
|
|
301
|
+
textField.addTarget(
|
|
302
|
+
context.coordinator,
|
|
303
|
+
action: #selector(Coordinator.textFieldDidChange(_:)),
|
|
304
|
+
for: .editingChanged
|
|
305
|
+
)
|
|
306
|
+
return textField
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
func updateUIView(_ textField: UITextField, context: Context) {
|
|
310
|
+
if textField.text != text {
|
|
311
|
+
textField.text = text
|
|
312
|
+
}
|
|
313
|
+
textField.isEnabled = !isDisabled
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
class Coordinator: NSObject, UITextFieldDelegate {
|
|
317
|
+
var parent: SecureInputField
|
|
318
|
+
private var isResettingText = false
|
|
319
|
+
|
|
320
|
+
init(_ parent: SecureInputField) {
|
|
321
|
+
self.parent = parent
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
func textFieldDidBeginEditing(_ textField: UITextField) {
|
|
325
|
+
let existingText = textField.text ?? ""
|
|
326
|
+
if !existingText.isEmpty {
|
|
327
|
+
// When a secure text field regains focus, iOS marks the
|
|
328
|
+
// existing text as "committed". The next keystroke would
|
|
329
|
+
// replace ALL committed text with the new character.
|
|
330
|
+
// Prevent this by clearing and re-inserting via insertText(),
|
|
331
|
+
// which puts the text into an "active editing" state.
|
|
332
|
+
isResettingText = true
|
|
333
|
+
textField.text = ""
|
|
334
|
+
textField.insertText(existingText)
|
|
335
|
+
isResettingText = false
|
|
336
|
+
}
|
|
337
|
+
parent.onFocusChange(true)
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
func textFieldDidEndEditing(_ textField: UITextField) {
|
|
341
|
+
parent.text = textField.text ?? ""
|
|
342
|
+
parent.onFocusChange(false)
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
func textField(
|
|
346
|
+
_ textField: UITextField,
|
|
347
|
+
shouldChangeCharactersIn range: NSRange,
|
|
348
|
+
replacementString string: String
|
|
349
|
+
) -> Bool {
|
|
350
|
+
if isResettingText { return true }
|
|
351
|
+
return true
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
@objc func textFieldDidChange(_ textField: UITextField) {
|
|
355
|
+
if isResettingText { return }
|
|
356
|
+
let newText = textField.text ?? ""
|
|
357
|
+
parent.text = newText
|
|
358
|
+
parent.onChangeText?(newText)
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
func textFieldShouldReturn(_ textField: UITextField) -> Bool {
|
|
362
|
+
textField.resignFirstResponder()
|
|
363
|
+
return true
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
|
|
310
368
|
// MARK: - Helper Extension
|
|
311
369
|
private extension View {
|
|
312
370
|
func applyPrimaryCursorColor() -> some View {
|
|
@@ -89,7 +89,7 @@ public struct InputPhoneNumber: View {
|
|
|
89
89
|
MomoText(placeholder, typography: size == .small ? .headerSSemibold : .headerMBold, color: Colors.black12)
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
TextField(
|
|
92
|
+
TextField("", text: textBinding, onEditingChanged: { focused in
|
|
93
93
|
handleFocusChange(focused)
|
|
94
94
|
})
|
|
95
95
|
.keyboardType(.numberPad)
|
|
@@ -98,6 +98,7 @@ public struct InputPhoneNumber: View {
|
|
|
98
98
|
.applyPrimaryCursorColor()
|
|
99
99
|
.lineLimit(1)
|
|
100
100
|
.accessibility(identifier: accessibilityLabel ?? "")
|
|
101
|
+
.accessibilityValue(textBinding.wrappedValue.isEmpty ? placeholder : textBinding.wrappedValue)
|
|
101
102
|
}
|
|
102
103
|
|
|
103
104
|
// Clear button
|
package/local.properties
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
## This file must *NOT* be checked into Version Control Systems,
|
|
2
|
+
# as it contains information specific to your local configuration.
|
|
3
|
+
#
|
|
4
|
+
# Location of the SDK. This is only used by Gradle.
|
|
5
|
+
# For customization when using a Version Control System, please read the
|
|
6
|
+
# header note.
|
|
7
|
+
#Thu Jan 09 10:43:10 ICT 2025
|
|
8
|
+
sdk.dir=/Users/sophia/Library/Android/sdk
|
package/package.json
CHANGED
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
|
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import org.gradle.kotlin.dsl.maven
|
|
2
|
+
|
|
3
|
+
rootProject.name = "momo-native-kits"
|
|
4
|
+
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
|
|
5
|
+
|
|
6
|
+
pluginManagement {
|
|
7
|
+
repositories {
|
|
8
|
+
google {
|
|
9
|
+
mavenContent {
|
|
10
|
+
includeGroupAndSubgroups("androidx")
|
|
11
|
+
includeGroupAndSubgroups("com.android")
|
|
12
|
+
includeGroupAndSubgroups("com.google")
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
mavenCentral()
|
|
16
|
+
gradlePluginPortal()
|
|
17
|
+
maven {
|
|
18
|
+
url = uri("https://gitlab.mservice.com.vn/api/v4/projects/5400/packages/maven")
|
|
19
|
+
credentials {username = "download_packages"; password = "gldt-bjDqLpU_sPcHDuXau2ws" }
|
|
20
|
+
}
|
|
21
|
+
maven {
|
|
22
|
+
url = uri("http://nexus.mservice.com.vn:8081/repository/maven-public/")
|
|
23
|
+
isAllowInsecureProtocol = true
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
dependencyResolutionManagement {
|
|
29
|
+
repositories {
|
|
30
|
+
google {
|
|
31
|
+
mavenContent {
|
|
32
|
+
includeGroupAndSubgroups("androidx")
|
|
33
|
+
includeGroupAndSubgroups("com.android")
|
|
34
|
+
includeGroupAndSubgroups("com.google")
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
mavenCentral()
|
|
38
|
+
maven {
|
|
39
|
+
url = uri("https://gitlab.mservice.com.vn/api/v4/projects/5400/packages/maven")
|
|
40
|
+
credentials {username = "download_packages"; password = "gldt-bjDqLpU_sPcHDuXau2ws" }
|
|
41
|
+
}
|
|
42
|
+
maven {
|
|
43
|
+
url = uri("http://nexus.mservice.com.vn:8081/repository/maven-public/")
|
|
44
|
+
isAllowInsecureProtocol = true
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
include(":compose")
|
|
50
|
+
|
|
51
|
+
include(":sample:androidApp")
|
|
52
|
+
include(":sample:shared")
|