@momo-kits/native-kits 0.155.1-hello.5-debug → 0.155.1-hello.6-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/compose/build.gradle.kts +42 -42
- package/compose/build.gradle.kts.backup +180 -0
- package/gradle.properties +1 -1
- package/package.json +1 -1
- package/publish_release.sh +28 -0
package/compose/build.gradle.kts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import com.vanniktech.maven.publish.JavadocJar
|
|
2
|
-
import com.vanniktech.maven.publish.KotlinMultiplatform
|
|
1
|
+
// import com.vanniktech.maven.publish.JavadocJar
|
|
2
|
+
// import com.vanniktech.maven.publish.KotlinMultiplatform
|
|
3
3
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
|
4
4
|
|
|
5
5
|
plugins {
|
|
@@ -7,7 +7,7 @@ plugins {
|
|
|
7
7
|
alias(libs.plugins.android.library)
|
|
8
8
|
alias(libs.plugins.compose)
|
|
9
9
|
alias(libs.plugins.kotlin.compose.compiler)
|
|
10
|
-
|
|
10
|
+
// alias(libs.plugins.vanniktech.mavenPublish)
|
|
11
11
|
id(libs.plugins.jetbrains.kotlin.cocoapods.get().pluginId)
|
|
12
12
|
kotlin("plugin.serialization")
|
|
13
13
|
}
|
|
@@ -138,43 +138,43 @@ publishing {
|
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
-
mavenPublishing {
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
}
|
|
141
|
+
// mavenPublishing {
|
|
142
|
+
// configure(
|
|
143
|
+
// KotlinMultiplatform(
|
|
144
|
+
// javadocJar = JavadocJar.Empty(),
|
|
145
|
+
// sourcesJar = true,
|
|
146
|
+
// androidVariantsToPublish = listOf("release")
|
|
147
|
+
// )
|
|
148
|
+
// )
|
|
149
|
+
//
|
|
150
|
+
// repositories {
|
|
151
|
+
// maven {
|
|
152
|
+
// name = "${gitlabRepo}Packages"
|
|
153
|
+
// credentials { username = gitlabUser; password = gitlabKey }
|
|
154
|
+
// url = uri("$gitlabUrl")
|
|
155
|
+
// }
|
|
156
|
+
// }
|
|
157
|
+
//
|
|
158
|
+
// coordinates(gitlabGroup.toString(), gitlabArtifactId, gitlabVersion.toString())
|
|
159
|
+
//
|
|
160
|
+
// pom {
|
|
161
|
+
// name = "$gitlabName Klib"
|
|
162
|
+
// description = "$gitlabName"
|
|
163
|
+
// url = "https://gitlab.mservice.com.vn"
|
|
164
|
+
// licenses {
|
|
165
|
+
// license {
|
|
166
|
+
// name = "The Apache License, Version 2.0"
|
|
167
|
+
// url = "https://www.apache.org/licenses/LICENSE-2.0.txt"
|
|
168
|
+
// distribution = "https://www.apache.org/licenses/LICENSE-2.0.txt"
|
|
169
|
+
// }
|
|
170
|
+
// }
|
|
171
|
+
// developers {
|
|
172
|
+
// developer {
|
|
173
|
+
// id = "kotlin-hands-on"
|
|
174
|
+
// name = "Kotlin Developer Advocate"
|
|
175
|
+
// url = "https://github.com/kotlin-hands-on/"
|
|
176
|
+
// }
|
|
177
|
+
// }
|
|
178
|
+
// }
|
|
179
|
+
// }
|
|
180
180
|
|
|
@@ -0,0 +1,180 @@
|
|
|
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
|
+
}
|
|
59
|
+
|
|
60
|
+
sourceSets {
|
|
61
|
+
commonMain.dependencies {
|
|
62
|
+
implementation(compose.runtime)
|
|
63
|
+
implementation(compose.material)
|
|
64
|
+
implementation(compose.material3)
|
|
65
|
+
implementation(compose.components.resources)
|
|
66
|
+
implementation(libs.ktor.client.core)
|
|
67
|
+
implementation(libs.jetbrains.coroutines.core)
|
|
68
|
+
implementation(libs.navigation.multiplatform)
|
|
69
|
+
implementation(libs.coil.multiplatform.compose)
|
|
70
|
+
implementation(libs.coil.multiplatform.core)
|
|
71
|
+
implementation(libs.coil.multiplatform.network.ktor)
|
|
72
|
+
implementation(libs.jetbrains.serialization.json)
|
|
73
|
+
implementation(libs.kotlinx.datetime)
|
|
74
|
+
api(libs.native.max.api)
|
|
75
|
+
}
|
|
76
|
+
androidMain.dependencies {
|
|
77
|
+
implementation(libs.ktor.client.okhttp)
|
|
78
|
+
implementation(libs.airbnb.lottie)
|
|
79
|
+
}
|
|
80
|
+
iosMain.dependencies {
|
|
81
|
+
implementation(libs.ktor.client.darwin)
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
android {
|
|
87
|
+
namespace = "$gitlabGroup.$gitlabArtifactId"
|
|
88
|
+
compileSdk = libs.versions.android.compileSdk.get().toInt()
|
|
89
|
+
compileOptions {
|
|
90
|
+
sourceCompatibility = JavaVersion.VERSION_17
|
|
91
|
+
targetCompatibility = JavaVersion.VERSION_17
|
|
92
|
+
}
|
|
93
|
+
defaultConfig {
|
|
94
|
+
minSdk = libs.versions.android.minSdk.get().toInt()
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
dependencies {
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
repositories {
|
|
102
|
+
google {
|
|
103
|
+
mavenContent {
|
|
104
|
+
includeGroupAndSubgroups("androidx")
|
|
105
|
+
includeGroupAndSubgroups("com.android")
|
|
106
|
+
includeGroupAndSubgroups("com.google")
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
mavenCentral()
|
|
110
|
+
maven {
|
|
111
|
+
url = uri("https://gitlab.mservice.com.vn/api/v4/projects/5400/packages/maven")
|
|
112
|
+
credentials {username = "download_packages"; password = "gldt-bjDqLpU_sPcHDuXau2ws" }
|
|
113
|
+
}
|
|
114
|
+
maven {
|
|
115
|
+
url = uri("http://nexus.mservice.com.vn:8081/repository/maven-public/")
|
|
116
|
+
isAllowInsecureProtocol = true
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
compose {
|
|
121
|
+
resources {
|
|
122
|
+
publicResClass = true
|
|
123
|
+
packageOfResClass = "vn.momo.uikits.resources"
|
|
124
|
+
generateResClass = always
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
publishing {
|
|
129
|
+
repositories {
|
|
130
|
+
maven {
|
|
131
|
+
name = "${gitlabRepo}Packages"
|
|
132
|
+
credentials {
|
|
133
|
+
username = gitlabUser
|
|
134
|
+
password = gitlabKey
|
|
135
|
+
}
|
|
136
|
+
url = uri("$gitlabUrl")
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
mavenPublishing {
|
|
142
|
+
configure(
|
|
143
|
+
KotlinMultiplatform(
|
|
144
|
+
javadocJar = JavadocJar.Empty(),
|
|
145
|
+
sourcesJar = true,
|
|
146
|
+
androidVariantsToPublish = listOf("release")
|
|
147
|
+
)
|
|
148
|
+
)
|
|
149
|
+
|
|
150
|
+
repositories {
|
|
151
|
+
maven {
|
|
152
|
+
name = "${gitlabRepo}Packages"
|
|
153
|
+
credentials { username = gitlabUser; password = gitlabKey }
|
|
154
|
+
url = uri("$gitlabUrl")
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
coordinates(gitlabGroup.toString(), gitlabArtifactId, gitlabVersion.toString())
|
|
159
|
+
|
|
160
|
+
pom {
|
|
161
|
+
name = "$gitlabName Klib"
|
|
162
|
+
description = "$gitlabName"
|
|
163
|
+
url = "https://gitlab.mservice.com.vn"
|
|
164
|
+
licenses {
|
|
165
|
+
license {
|
|
166
|
+
name = "The Apache License, Version 2.0"
|
|
167
|
+
url = "https://www.apache.org/licenses/LICENSE-2.0.txt"
|
|
168
|
+
distribution = "https://www.apache.org/licenses/LICENSE-2.0.txt"
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
developers {
|
|
172
|
+
developer {
|
|
173
|
+
id = "kotlin-hands-on"
|
|
174
|
+
name = "Kotlin Developer Advocate"
|
|
175
|
+
url = "https://github.com/kotlin-hands-on/"
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
package/gradle.properties
CHANGED
package/package.json
CHANGED
package/publish_release.sh
CHANGED
|
@@ -62,6 +62,30 @@ else
|
|
|
62
62
|
sed -i "s/\"version\": \"$VERSION\"/\"version\": \"$DEBUG_VERSION\"/" package.json
|
|
63
63
|
fi
|
|
64
64
|
|
|
65
|
+
# Backup compose/build.gradle.kts
|
|
66
|
+
echo "� Backing up compose/build.gradle.kts..."
|
|
67
|
+
cp compose/build.gradle.kts compose/build.gradle.kts.backup
|
|
68
|
+
|
|
69
|
+
# Comment out maven publish in compose/build.gradle.kts
|
|
70
|
+
echo "💬 Commenting out maven publish in compose/build.gradle.kts..."
|
|
71
|
+
if [[ "$OSTYPE" == "darwin"* ]]; then
|
|
72
|
+
# macOS - Comment out imports
|
|
73
|
+
sed -i '' 's/^import com\.vanniktech\.maven\.publish\.JavadocJar$/\/\/ &/' compose/build.gradle.kts
|
|
74
|
+
sed -i '' 's/^import com\.vanniktech\.maven\.publish\.KotlinMultiplatform$/\/\/ &/' compose/build.gradle.kts
|
|
75
|
+
# Comment out plugin
|
|
76
|
+
sed -i '' 's/^ alias(libs\.plugins\.vanniktech\.mavenPublish)$/\/\/ &/' compose/build.gradle.kts
|
|
77
|
+
# Comment out entire mavenPublishing block (lines starting from mavenPublishing { to its closing })
|
|
78
|
+
sed -i '' '/^mavenPublishing {$/,/^}$/s/^/\/\/ /' compose/build.gradle.kts
|
|
79
|
+
else
|
|
80
|
+
# Linux - Comment out imports
|
|
81
|
+
sed -i 's/^import com\.vanniktech\.maven\.publish\.JavadocJar$/\/\/ &/' compose/build.gradle.kts
|
|
82
|
+
sed -i 's/^import com\.vanniktech\.maven\.publish\.KotlinMultiplatform$/\/\/ &/' compose/build.gradle.kts
|
|
83
|
+
# Comment out plugin
|
|
84
|
+
sed -i 's/^ alias(libs\.plugins\.vanniktech\.mavenPublish)$/\/\/ &/' compose/build.gradle.kts
|
|
85
|
+
# Comment out entire mavenPublishing block
|
|
86
|
+
sed -i '/^mavenPublishing {$/,/^}$/s/^/\/\/ /' compose/build.gradle.kts
|
|
87
|
+
fi
|
|
88
|
+
|
|
65
89
|
# Backup .npmignore
|
|
66
90
|
cp .npmignore .npmignore.backup
|
|
67
91
|
|
|
@@ -88,6 +112,10 @@ npm publish --tag beta --access=public
|
|
|
88
112
|
mv .npmignore.backup .npmignore
|
|
89
113
|
echo "✅ .npmignore restored"
|
|
90
114
|
|
|
115
|
+
# Restore compose/build.gradle.kts
|
|
116
|
+
mv compose/build.gradle.kts.backup compose/build.gradle.kts
|
|
117
|
+
echo "✅ compose/build.gradle.kts restored"
|
|
118
|
+
|
|
91
119
|
# Restore package.json version to original
|
|
92
120
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
|
93
121
|
# macOS
|