@momo-kits/native-kits 0.89.12 → 0.89.14

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.
@@ -28,7 +28,7 @@ android {
28
28
  }
29
29
 
30
30
  composeOptions {
31
- kotlinCompilerExtensionVersion = "1.5.8"
31
+ kotlinCompilerExtensionVersion = "1.5.14"
32
32
  }
33
33
  }
34
34
 
@@ -2,8 +2,12 @@ plugins {
2
2
  kotlin("multiplatform")
3
3
  id("com.android.library")
4
4
  id("org.jetbrains.compose")
5
+ id("maven-publish")
5
6
  }
6
7
 
8
+ val libGroup = "vn.momo.kits"
9
+ val libVersion = "0.0.1"
10
+
7
11
  kotlin {
8
12
  androidTarget {
9
13
  publishLibraryVariants("release")
@@ -33,6 +37,7 @@ kotlin {
33
37
  implementation(libs.ktor.client.core)
34
38
  implementation("com.github.skydoves:landscapist-coil3:2.3.2")
35
39
  implementation(compose.components.resources)
40
+ implementation("org.jetbrains.androidx.navigation:navigation-compose:2.7.0-alpha07")
36
41
 
37
42
  implementation("cafe.adriel.voyager:voyager-navigator:$voyagerVersion")
38
43
  implementation("cafe.adriel.voyager:voyager-screenmodel:$voyagerVersion")
@@ -61,6 +66,25 @@ kotlin {
61
66
  task("testClasses")
62
67
  }
63
68
 
69
+ publishing {
70
+ repositories {
71
+ maven {
72
+ group = libGroup
73
+ version = libVersion
74
+
75
+ name = "GitLab"
76
+ url = uri("https://gitlab.mservice.com.vn/api/v4/projects/2374/packages/maven")
77
+ credentials(PasswordCredentials::class) {
78
+ username = "gitlab+deploy-token-74"
79
+ password = "L3zudJhxiPsQi9hZ1YLX"
80
+ }
81
+ authentication {
82
+ create<BasicAuthentication>("basic")
83
+ }
84
+ }
85
+ }
86
+ }
87
+
64
88
  android {
65
89
  compileSdk = 34
66
90
  namespace = "com.myapplication.common"
@@ -7,12 +7,10 @@ import androidx.compose.ui.text.font.FontFamily
7
7
  import androidx.compose.ui.text.font.FontStyle
8
8
  import androidx.compose.ui.text.font.FontWeight
9
9
  import androidx.compose.ui.unit.sp
10
- import org.jetbrains.compose.resources.ExperimentalResourceApi
11
10
  import org.jetbrains.compose.resources.Font
12
11
  import org.jetbrains.compose.resources.FontResource
13
12
  import org.jetbrains.compose.resources.InternalResourceApi
14
13
  import org.jetbrains.compose.resources.ResourceItem
15
- import vn.momo.kits.utils.getPlatformName
16
14
  import vn.momo.kits.utils.getScreenDimensions
17
15
 
18
16
  const val DEFAULT_SCREEN_SIZE = 375f
@@ -27,12 +25,12 @@ fun scaleSize(size: Float): Float {
27
25
  return size
28
26
  }
29
27
 
30
- @OptIn(ExperimentalResourceApi::class, InternalResourceApi::class)
28
+ @OptIn(InternalResourceApi::class)
31
29
  @Composable
32
30
  fun getFont(font: String): FontFamily {
33
31
  val fontResource = FontResource(
34
32
  "font:${font}",
35
- setOf(ResourceItem(setOf(), "font/${font}.ttf"))
33
+ setOf(ResourceItem(setOf(), "font/${font}.ttf", -1, -1))
36
34
  )
37
35
  return FontFamily(Font(fontResource))
38
36
  }
@@ -40,9 +38,6 @@ fun getFont(font: String): FontFamily {
40
38
  @Composable
41
39
  fun getFontFamily(fontFamily: String, fontWeight: FontWeight? = FontWeight.Normal): FontFamily {
42
40
  val key = "$fontFamily-${fontWeight?.weight}"
43
- if (getPlatformName() == "iOS") {
44
- return FontFamily.Default
45
- }
46
41
  val fontMap = mapOf(
47
42
  "SFProText-100" to getFont("sfprotext_thin"),
48
43
  "SFProText-200" to getFont("sfprotext_ultralight"),
@@ -0,0 +1,15 @@
1
+ package vn.momo.kits.utils
2
+
3
+ import androidx.compose.runtime.Composable
4
+ import org.jetbrains.compose.resources.DrawableResource
5
+ import org.jetbrains.compose.resources.InternalResourceApi
6
+ import org.jetbrains.compose.resources.ResourceItem
7
+
8
+ @OptIn(InternalResourceApi::class)
9
+ @Composable
10
+ fun getResource(name: String): DrawableResource {
11
+ return DrawableResource(
12
+ "drawable:$name",
13
+ setOf(ResourceItem(setOf(), "drawable/$name", -1, -1))
14
+ )
15
+ }
package/gradle.properties CHANGED
@@ -12,8 +12,8 @@ android.compileSdk=34
12
12
  android.targetSdk=34
13
13
  android.minSdk=24
14
14
  #Versions
15
- kotlin.version=1.9.22
15
+ kotlin.version=1.9.24
16
16
  agp.version=8.1.1
17
- compose.version=1.6.0
18
- composeCompilerVersion = 1.5.8
17
+ compose.version=1.6.11
18
+ composeCompilerVersion = 1.5.14
19
19
  maven-publish.version=0.25.3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/native-kits",
3
- "version": "0.89.12",
3
+ "version": "0.89.14",
4
4
  "private": false,
5
5
  "dependencies": {},
6
6
  "devDependencies": {},