@momo-kits/native-kits 0.156.6-beta.4 → 0.156.6-dialog.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 (128) hide show
  1. package/build.gradle.kts +11 -0
  2. package/compose/MoMoComposeKits.podspec +54 -0
  3. package/compose/build.gradle.kts +183 -0
  4. package/compose/build.gradle.kts.backup +183 -0
  5. package/compose/compose.podspec +48 -0
  6. package/compose/src/androidMain/kotlin/vn/momo/kits/platform/Platform.android.kt +270 -0
  7. package/compose/src/commonMain/composeResources/font/momosignature.otf +0 -0
  8. package/compose/src/commonMain/composeResources/font/momotrustdisplay.otf +0 -0
  9. package/compose/src/commonMain/composeResources/font/sfprotext_black.otf +0 -0
  10. package/compose/src/commonMain/composeResources/font/sfprotext_black.ttf +0 -0
  11. package/compose/src/commonMain/composeResources/font/sfprotext_bold.ttf +0 -0
  12. package/compose/src/commonMain/composeResources/font/sfprotext_heavy.ttf +0 -0
  13. package/compose/src/commonMain/composeResources/font/sfprotext_light.ttf +0 -0
  14. package/compose/src/commonMain/composeResources/font/sfprotext_medium.ttf +0 -0
  15. package/compose/src/commonMain/composeResources/font/sfprotext_regular.ttf +0 -0
  16. package/compose/src/commonMain/composeResources/font/sfprotext_semibold.ttf +0 -0
  17. package/compose/src/commonMain/composeResources/font/sfprotext_thin.otf +0 -0
  18. package/compose/src/commonMain/composeResources/font/sfprotext_thin.ttf +0 -0
  19. package/compose/src/commonMain/composeResources/font/sfprotext_ultralight.otf +0 -0
  20. package/compose/src/commonMain/composeResources/font/sfprotext_ultralight.ttf +0 -0
  21. package/compose/src/commonMain/kotlin/vn/momo/kits/application/AnimationSearchInput.kt +57 -0
  22. package/compose/src/commonMain/kotlin/vn/momo/kits/application/Context.kt +95 -0
  23. package/compose/src/commonMain/kotlin/vn/momo/kits/application/FloatingButton.kt +201 -0
  24. package/compose/src/commonMain/kotlin/vn/momo/kits/application/Header.kt +222 -0
  25. package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderAnimated.kt +48 -0
  26. package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderBackground.kt +86 -0
  27. package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderDefault.kt +76 -0
  28. package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderExtended.kt +76 -0
  29. package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderRight.kt +305 -0
  30. package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderTitle.kt +33 -0
  31. package/compose/src/commonMain/kotlin/vn/momo/kits/application/LiteScreen.kt +720 -0
  32. package/compose/src/commonMain/kotlin/vn/momo/kits/application/NavigationContainer.kt +121 -0
  33. package/compose/src/commonMain/kotlin/vn/momo/kits/application/Screen.kt +405 -0
  34. package/compose/src/commonMain/kotlin/vn/momo/kits/application/useHeaderSearchAnimation.kt +69 -0
  35. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Badge.kt +83 -0
  36. package/compose/src/commonMain/kotlin/vn/momo/kits/components/BadgeDot.kt +32 -0
  37. package/compose/src/commonMain/kotlin/vn/momo/kits/components/BadgeRibbon.kt +340 -0
  38. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Button.kt +348 -0
  39. package/compose/src/commonMain/kotlin/vn/momo/kits/components/CheckBox.kt +94 -0
  40. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Chip.kt +136 -0
  41. package/compose/src/commonMain/kotlin/vn/momo/kits/components/CupertinoOverscroll.kt +543 -0
  42. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Divider.kt +23 -0
  43. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Icon.kt +63 -0
  44. package/compose/src/commonMain/kotlin/vn/momo/kits/components/IconButton.kt +148 -0
  45. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Image.kt +185 -0
  46. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Information.kt +116 -0
  47. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Input.kt +447 -0
  48. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputDropDown.kt +172 -0
  49. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputMoney.kt +255 -0
  50. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputOTP.kt +231 -0
  51. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputPhoneNumber.kt +234 -0
  52. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputSearch.kt +254 -0
  53. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputTextArea.kt +241 -0
  54. package/compose/src/commonMain/kotlin/vn/momo/kits/components/LazyColumnWithBouncing.kt +364 -0
  55. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationDot.kt +56 -0
  56. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationNumber.kt +41 -0
  57. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationScroll.kt +92 -0
  58. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationWhiteDot.kt +40 -0
  59. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PopupNotify.kt +352 -0
  60. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PopupPromotion.kt +103 -0
  61. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Radio.kt +70 -0
  62. package/compose/src/commonMain/kotlin/vn/momo/kits/components/ScaleSizeScope.kt +17 -0
  63. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Skeleton.kt +96 -0
  64. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Switch.kt +96 -0
  65. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Tag.kt +92 -0
  66. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Text.kt +130 -0
  67. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Title.kt +214 -0
  68. package/compose/src/commonMain/kotlin/vn/momo/kits/components/TrustBanner.kt +177 -0
  69. package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePicker.kt +205 -0
  70. package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePickerTypes.kt +29 -0
  71. package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePickerUtils.kt +239 -0
  72. package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/WheelPicker.kt +191 -0
  73. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Colors.kt +306 -0
  74. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Radius.kt +12 -0
  75. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Spacing.kt +13 -0
  76. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Theme.kt +189 -0
  77. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Typography.kt +285 -0
  78. package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Card.kt +2 -0
  79. package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Item.kt +35 -0
  80. package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Section.kt +2 -0
  81. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/AutomationId.kt +59 -0
  82. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Clickable.kt +68 -0
  83. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Conditional.kt +11 -0
  84. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/DeprecatedModifier.kt +14 -0
  85. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Shadow.kt +50 -0
  86. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Size.kt +51 -0
  87. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/BottomSheet.kt +238 -0
  88. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/ModalScreen.kt +118 -0
  89. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigation.kt +98 -0
  90. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/NavigationContainer.kt +209 -0
  91. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigator.kt +227 -0
  92. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/StackScreen.kt +484 -0
  93. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/BottomTab.kt +162 -0
  94. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/BottomTabBar.kt +226 -0
  95. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/CurvedContainer.kt +86 -0
  96. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/FloatingButton.kt +187 -0
  97. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/Header.kt +277 -0
  98. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderBackground.kt +80 -0
  99. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderRight.kt +306 -0
  100. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderTitle.kt +31 -0
  101. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderUser.kt +370 -0
  102. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/SnackBar.kt +129 -0
  103. package/compose/src/commonMain/kotlin/vn/momo/kits/platform/Platform.kt +63 -0
  104. package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Icons.kt +1329 -0
  105. package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Resources.kt +62 -0
  106. package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Utils.kt +88 -0
  107. package/compose/src/iosMain/kotlin/vn/momo/kits/platform/Platform.ios.kt +325 -0
  108. package/gradle/libs.versions.toml +57 -0
  109. package/gradle/wrapper/gradle-wrapper.jar +0 -0
  110. package/gradle/wrapper/gradle-wrapper.properties +8 -0
  111. package/gradle.properties +26 -0
  112. package/gradlew +252 -0
  113. package/gradlew.bat +94 -0
  114. package/ios/Image/Image.swift +1 -5
  115. package/local.properties +8 -0
  116. package/package.json +1 -1
  117. package/settings.gradle.kts +52 -0
  118. package/example/ios/Example.xcodeproj/xcuserdata/sophia.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
  119. package/example/ios/Example.xcworkspace/xcuserdata/sophia.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  120. package/example/ios/Example.xcworkspace/xcuserdata/sophia.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +0 -6
  121. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sophia.xcuserdatad/xcschemes/MoMoUIKits.xcscheme +0 -58
  122. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sophia.xcuserdatad/xcschemes/Pods-Example.xcscheme +0 -58
  123. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sophia.xcuserdatad/xcschemes/SDWebImage.xcscheme +0 -58
  124. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sophia.xcuserdatad/xcschemes/SDWebImageSwiftUI.xcscheme +0 -58
  125. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sophia.xcuserdatad/xcschemes/SkeletonUI.xcscheme +0 -58
  126. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sophia.xcuserdatad/xcschemes/lottie-ios-LottiePrivacyInfo.xcscheme +0 -58
  127. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sophia.xcuserdatad/xcschemes/lottie-ios.xcscheme +0 -58
  128. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sophia.xcuserdatad/xcschemes/xcschememanagement.plist +0 -46
@@ -0,0 +1,11 @@
1
+ plugins {
2
+ // this is necessary to avoid the plugins to be loaded multiple times
3
+ // in each subproject's classloader
4
+ alias(libs.plugins.android.application) apply false
5
+ alias(libs.plugins.android.library) apply false
6
+ alias(libs.plugins.compose) apply false
7
+ alias(libs.plugins.kotlin.compose.compiler) apply false
8
+ alias(libs.plugins.jetbrains.kotlin.multiplatform) apply false
9
+ alias(libs.plugins.jetbrains.kotlin.serialization) apply false
10
+ alias(libs.plugins.vanniktech.mavenPublish) apply false
11
+ }
@@ -0,0 +1,54 @@
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
@@ -0,0 +1,183 @@
1
+ // import com.vanniktech.maven.publish.JavadocJar
2
+ // import com.vanniktech.maven.publish.KotlinMultiplatform
3
+ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
4
+
5
+ plugins {
6
+ alias(libs.plugins.jetbrains.kotlin.multiplatform)
7
+ alias(libs.plugins.android.library)
8
+ alias(libs.plugins.compose)
9
+ alias(libs.plugins.kotlin.compose.compiler)
10
+ // alias(libs.plugins.vanniktech.mavenPublish)
11
+ id(libs.plugins.jetbrains.kotlin.cocoapods.get().pluginId)
12
+ kotlin("plugin.serialization")
13
+ }
14
+
15
+ val gitlabName: String? = findProperty("name") as String? ?: ""
16
+ val gitlabRepo: String? = findProperty("repo") as String? ?: ""
17
+ val gitlabUrl: String? = findProperty("url") as String? ?: ""
18
+ val gitlabGroup: String? = findProperty("group") as String? ?: ""
19
+ val gitlabArtifactId: String = findProperty("artifact.id") as String? ?: ""
20
+ val gitlabVersion: String? = findProperty("version") as String? ?: ""
21
+ val gitlabUser: String? = findProperty("gitlab.user") as String? ?: ""
22
+ val gitlabKey: String? = findProperty("gitlab.password") as String? ?: ""
23
+
24
+ kotlin {
25
+ androidTarget {
26
+ compilerOptions {
27
+ jvmTarget.set(JvmTarget.JVM_17)
28
+ }
29
+ publishLibraryVariants("release")
30
+ }
31
+
32
+ val fwName = gitlabArtifactId
33
+ val iosTargets = listOf(iosX64(), iosArm64(), iosSimulatorArm64())
34
+ iosTargets.forEach {
35
+ it.binaries.framework {
36
+ baseName = fwName
37
+ binaryOption("bundleId", "$gitlabGroup.$fwName")
38
+ isStatic = true
39
+ }
40
+ }
41
+
42
+ cocoapods {
43
+ version = "0.156.6-dialog.1-debug"
44
+ summary = "IOS Shared module"
45
+ homepage = "https://momo.vn"
46
+ ios.deploymentTarget = "15.0"
47
+
48
+ framework {
49
+ baseName = fwName
50
+ isStatic = true
51
+ }
52
+
53
+ pod("lottie-ios") {
54
+ moduleName = "Lottie"
55
+ version = "4.4.3"
56
+ extraOpts += listOf("-compiler-option", "-fmodules")
57
+ }
58
+ pod("SDWebImage") {
59
+ version = ">= 5.19.1"
60
+ }
61
+ }
62
+
63
+ sourceSets {
64
+ commonMain.dependencies {
65
+ implementation(compose.runtime)
66
+ implementation(compose.material)
67
+ implementation(compose.material3)
68
+ implementation(compose.components.resources)
69
+ implementation(libs.ktor.client.core)
70
+ implementation(libs.jetbrains.coroutines.core)
71
+ implementation(libs.navigation.multiplatform)
72
+ implementation(libs.coil.multiplatform.compose)
73
+ implementation(libs.coil.multiplatform.core)
74
+ implementation(libs.coil.multiplatform.network.ktor)
75
+ implementation(libs.jetbrains.serialization.json)
76
+ implementation(libs.kotlinx.datetime)
77
+ api(libs.native.max.api)
78
+ }
79
+ androidMain.dependencies {
80
+ implementation(libs.ktor.client.okhttp)
81
+ implementation(libs.airbnb.lottie)
82
+ }
83
+ iosMain.dependencies {
84
+ implementation(libs.ktor.client.darwin)
85
+ }
86
+ }
87
+ }
88
+
89
+ android {
90
+ namespace = "vn.momo.kits.kits"
91
+ compileSdk = 35
92
+ compileOptions {
93
+ sourceCompatibility = JavaVersion.VERSION_17
94
+ targetCompatibility = JavaVersion.VERSION_17
95
+ }
96
+ defaultConfig {
97
+ minSdk = 24
98
+ }
99
+ }
100
+
101
+ dependencies {
102
+ }
103
+
104
+ repositories {
105
+ google {
106
+ mavenContent {
107
+ includeGroupAndSubgroups("androidx")
108
+ includeGroupAndSubgroups("com.android")
109
+ includeGroupAndSubgroups("com.google")
110
+ }
111
+ }
112
+ mavenCentral()
113
+ maven {
114
+ url = uri("https://gitlab.mservice.com.vn/api/v4/projects/5400/packages/maven")
115
+ credentials {username = "download_packages"; password = "gldt-bjDqLpU_sPcHDuXau2ws" }
116
+ }
117
+ maven {
118
+ url = uri("http://nexus.mservice.com.vn:8081/repository/maven-public/")
119
+ isAllowInsecureProtocol = true
120
+ }
121
+ }
122
+
123
+ compose {
124
+ resources {
125
+ publicResClass = true
126
+ packageOfResClass = "vn.momo.uikits.resources"
127
+ generateResClass = always
128
+ }
129
+ }
130
+
131
+ // publishing {
132
+ // repositories {
133
+ // maven {
134
+ // name = "${gitlabRepo}Packages"
135
+ // credentials {
136
+ // username = gitlabUser
137
+ // password = gitlabKey
138
+ // }
139
+ // url = uri("$gitlabUrl")
140
+ // }
141
+ // }
142
+ // }
143
+
144
+ // mavenPublishing {
145
+ // configure(
146
+ // KotlinMultiplatform(
147
+ // javadocJar = JavadocJar.Empty(),
148
+ // sourcesJar = true,
149
+ // androidVariantsToPublish = listOf("release")
150
+ // )
151
+ // )
152
+ //
153
+ // repositories {
154
+ // maven {
155
+ // name = "${gitlabRepo}Packages"
156
+ // credentials { username = gitlabUser; password = gitlabKey }
157
+ // url = uri("$gitlabUrl")
158
+ // }
159
+ // }
160
+ //
161
+ // coordinates(gitlabGroup.toString(), gitlabArtifactId, gitlabVersion.toString())
162
+ //
163
+ // pom {
164
+ // name = "$gitlabName Klib"
165
+ // description = "$gitlabName"
166
+ // url = "https://gitlab.mservice.com.vn"
167
+ // licenses {
168
+ // license {
169
+ // name = "The Apache License, Version 2.0"
170
+ // url = "https://www.apache.org/licenses/LICENSE-2.0.txt"
171
+ // distribution = "https://www.apache.org/licenses/LICENSE-2.0.txt"
172
+ // }
173
+ // }
174
+ // developers {
175
+ // developer {
176
+ // id = "kotlin-hands-on"
177
+ // name = "Kotlin Developer Advocate"
178
+ // url = "https://github.com/kotlin-hands-on/"
179
+ // }
180
+ // }
181
+ // }
182
+ // }
183
+
@@ -0,0 +1,183 @@
1
+ import com.vanniktech.maven.publish.JavadocJar
2
+ import com.vanniktech.maven.publish.KotlinMultiplatform
3
+ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
4
+
5
+ plugins {
6
+ alias(libs.plugins.jetbrains.kotlin.multiplatform)
7
+ alias(libs.plugins.android.library)
8
+ alias(libs.plugins.compose)
9
+ alias(libs.plugins.kotlin.compose.compiler)
10
+ alias(libs.plugins.vanniktech.mavenPublish)
11
+ id(libs.plugins.jetbrains.kotlin.cocoapods.get().pluginId)
12
+ kotlin("plugin.serialization")
13
+ }
14
+
15
+ val gitlabName: String? = findProperty("name") as String? ?: ""
16
+ val gitlabRepo: String? = findProperty("repo") as String? ?: ""
17
+ val gitlabUrl: String? = findProperty("url") as String? ?: ""
18
+ val gitlabGroup: String? = findProperty("group") as String? ?: ""
19
+ val gitlabArtifactId: String = findProperty("artifact.id") as String? ?: ""
20
+ val gitlabVersion: String? = findProperty("version") as String? ?: ""
21
+ val gitlabUser: String? = findProperty("gitlab.user") as String? ?: ""
22
+ val gitlabKey: String? = findProperty("gitlab.password") as String? ?: ""
23
+
24
+ kotlin {
25
+ androidTarget {
26
+ compilerOptions {
27
+ jvmTarget.set(JvmTarget.JVM_17)
28
+ }
29
+ publishLibraryVariants("release")
30
+ }
31
+
32
+ val fwName = gitlabArtifactId
33
+ val iosTargets = listOf(iosX64(), iosArm64(), iosSimulatorArm64())
34
+ iosTargets.forEach {
35
+ it.binaries.framework {
36
+ baseName = fwName
37
+ binaryOption("bundleId", "$gitlabGroup.$fwName")
38
+ isStatic = true
39
+ }
40
+ }
41
+
42
+ cocoapods {
43
+ version = gitlabVersion
44
+ summary = "IOS Shared module"
45
+ homepage = "https://momo.vn"
46
+ ios.deploymentTarget = "15.0"
47
+
48
+ framework {
49
+ baseName = fwName
50
+ isStatic = true
51
+ }
52
+
53
+ pod("lottie-ios") {
54
+ moduleName = "Lottie"
55
+ version = "4.4.3"
56
+ extraOpts += listOf("-compiler-option", "-fmodules")
57
+ }
58
+ pod("SDWebImage") {
59
+ version = ">= 5.19.1"
60
+ }
61
+ }
62
+
63
+ sourceSets {
64
+ commonMain.dependencies {
65
+ implementation(compose.runtime)
66
+ implementation(compose.material)
67
+ implementation(compose.material3)
68
+ implementation(compose.components.resources)
69
+ implementation(libs.ktor.client.core)
70
+ implementation(libs.jetbrains.coroutines.core)
71
+ implementation(libs.navigation.multiplatform)
72
+ implementation(libs.coil.multiplatform.compose)
73
+ implementation(libs.coil.multiplatform.core)
74
+ implementation(libs.coil.multiplatform.network.ktor)
75
+ implementation(libs.jetbrains.serialization.json)
76
+ implementation(libs.kotlinx.datetime)
77
+ api(libs.native.max.api)
78
+ }
79
+ androidMain.dependencies {
80
+ implementation(libs.ktor.client.okhttp)
81
+ implementation(libs.airbnb.lottie)
82
+ }
83
+ iosMain.dependencies {
84
+ implementation(libs.ktor.client.darwin)
85
+ }
86
+ }
87
+ }
88
+
89
+ android {
90
+ namespace = "$gitlabGroup.$gitlabArtifactId"
91
+ compileSdk = libs.versions.android.compileSdk.get().toInt()
92
+ compileOptions {
93
+ sourceCompatibility = JavaVersion.VERSION_17
94
+ targetCompatibility = JavaVersion.VERSION_17
95
+ }
96
+ defaultConfig {
97
+ minSdk = libs.versions.android.minSdk.get().toInt()
98
+ }
99
+ }
100
+
101
+ dependencies {
102
+ }
103
+
104
+ repositories {
105
+ google {
106
+ mavenContent {
107
+ includeGroupAndSubgroups("androidx")
108
+ includeGroupAndSubgroups("com.android")
109
+ includeGroupAndSubgroups("com.google")
110
+ }
111
+ }
112
+ mavenCentral()
113
+ maven {
114
+ url = uri("https://gitlab.mservice.com.vn/api/v4/projects/5400/packages/maven")
115
+ credentials {username = "download_packages"; password = "gldt-bjDqLpU_sPcHDuXau2ws" }
116
+ }
117
+ maven {
118
+ url = uri("http://nexus.mservice.com.vn:8081/repository/maven-public/")
119
+ isAllowInsecureProtocol = true
120
+ }
121
+ }
122
+
123
+ compose {
124
+ resources {
125
+ publicResClass = true
126
+ packageOfResClass = "vn.momo.uikits.resources"
127
+ generateResClass = always
128
+ }
129
+ }
130
+
131
+ publishing {
132
+ repositories {
133
+ maven {
134
+ name = "${gitlabRepo}Packages"
135
+ credentials {
136
+ username = gitlabUser
137
+ password = gitlabKey
138
+ }
139
+ url = uri("$gitlabUrl")
140
+ }
141
+ }
142
+ }
143
+
144
+ mavenPublishing {
145
+ configure(
146
+ KotlinMultiplatform(
147
+ javadocJar = JavadocJar.Empty(),
148
+ sourcesJar = true,
149
+ androidVariantsToPublish = listOf("release")
150
+ )
151
+ )
152
+
153
+ repositories {
154
+ maven {
155
+ name = "${gitlabRepo}Packages"
156
+ credentials { username = gitlabUser; password = gitlabKey }
157
+ url = uri("$gitlabUrl")
158
+ }
159
+ }
160
+
161
+ coordinates(gitlabGroup.toString(), gitlabArtifactId, gitlabVersion.toString())
162
+
163
+ pom {
164
+ name = "$gitlabName Klib"
165
+ description = "$gitlabName"
166
+ url = "https://gitlab.mservice.com.vn"
167
+ licenses {
168
+ license {
169
+ name = "The Apache License, Version 2.0"
170
+ url = "https://www.apache.org/licenses/LICENSE-2.0.txt"
171
+ distribution = "https://www.apache.org/licenses/LICENSE-2.0.txt"
172
+ }
173
+ }
174
+ developers {
175
+ developer {
176
+ id = "kotlin-hands-on"
177
+ name = "Kotlin Developer Advocate"
178
+ url = "https://github.com/kotlin-hands-on/"
179
+ }
180
+ }
181
+ }
182
+ }
183
+
@@ -0,0 +1,48 @@
1
+ Pod::Spec.new do |spec|
2
+ spec.name = 'compose'
3
+ spec.version = '0.156.1-test.6'
4
+ spec.homepage = 'https://momo.vn'
5
+ spec.source = { :http=> ''}
6
+ spec.authors = ''
7
+ spec.license = ''
8
+ spec.summary = 'IOS Shared module'
9
+ spec.vendored_frameworks = 'build/cocoapods/framework/kits.framework'
10
+ spec.libraries = 'c++'
11
+ spec.ios.deployment_target = '15.0'
12
+ spec.dependency 'SDWebImage', '>= 5.19.1'
13
+ spec.dependency 'lottie-ios', '4.4.3'
14
+ if !Dir.exist?('build/cocoapods/framework/kits.framework') || Dir.empty?('build/cocoapods/framework/kits.framework')
15
+ raise "
16
+ Kotlin framework 'kits' doesn't exist yet, so a proper Xcode project can't be generated.
17
+ 'pod install' should be executed after running ':generateDummyFramework' Gradle task:
18
+ ./gradlew :compose:generateDummyFramework
19
+ Alternatively, proper pod installation is performed during Gradle sync in the IDE (if Podfile location is set)"
20
+ end
21
+ spec.xcconfig = {
22
+ 'ENABLE_USER_SCRIPT_SANDBOXING' => 'NO',
23
+ }
24
+ spec.pod_target_xcconfig = {
25
+ 'KOTLIN_PROJECT_PATH' => ':compose',
26
+ 'PRODUCT_MODULE_NAME' => 'kits',
27
+ }
28
+ spec.script_phases = [
29
+ {
30
+ :name => 'Build compose',
31
+ :execution_position => :before_compile,
32
+ :shell_path => '/bin/sh',
33
+ :script => <<-SCRIPT
34
+ if [ "YES" = "$OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED" ]; then
35
+ echo "Skipping Gradle build task invocation due to OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED environment variable set to \"YES\""
36
+ exit 0
37
+ fi
38
+ set -ev
39
+ REPO_ROOT="$PODS_TARGET_SRCROOT"
40
+ "$REPO_ROOT/../gradlew" -p "$REPO_ROOT" $KOTLIN_PROJECT_PATH:syncFramework \
41
+ -Pkotlin.native.cocoapods.platform=$PLATFORM_NAME \
42
+ -Pkotlin.native.cocoapods.archs="$ARCHS" \
43
+ -Pkotlin.native.cocoapods.configuration="$CONFIGURATION"
44
+ SCRIPT
45
+ }
46
+ ]
47
+ spec.resources = ['build/compose/cocoapods/compose-resources']
48
+ end