1- import com.vanniktech.maven.publish.MavenPublishBaseExtension
2- import io.getstream.video.android.Configuration
3- import java.text.SimpleDateFormat
4- import java.util.Date
5- import java.util.TimeZone
6-
71apply (from = " ${rootDir} /scripts/open-api-code-gen.gradle.kts" )
82
93buildscript {
@@ -27,14 +21,15 @@ plugins {
2721 alias(libs.plugins.stream.android.application) apply false
2822 alias(libs.plugins.stream.android.library) apply false
2923 alias(libs.plugins.stream.android.test) apply false
24+ alias(libs.plugins.stream.java.library) apply false
25+ alias(libs.plugins.stream.java.platform) apply false
3026 alias(libs.plugins.android.application) apply false
3127 alias(libs.plugins.kotlin.android) apply false
3228 // alias(libs.plugins.compose.compiler) apply false -> Enable with Kotlin 2.0+
3329 alias(libs.plugins.kotlin.serialization) apply false
3430 alias(libs.plugins.kotlin.compatibility.validator) apply false
3531 alias(libs.plugins.ksp) apply false
3632 alias(libs.plugins.wire) apply false
37- alias(libs.plugins.maven.publish)
3833 alias(libs.plugins.google.gms) apply false
3934 alias(libs.plugins.dokka)
4035 alias(libs.plugins.spotless) apply false
@@ -66,6 +61,13 @@ streamProject {
6661 " io.getstream.video.android.core.model.*"
6762 )
6863 }
64+
65+ publishing {
66+ description = " Stream Video official Android SDK"
67+ moduleArtifactIdOverrides = mapOf (
68+ " stream-video-android-ui-xml" to " stream-video-android-xml"
69+ )
70+ }
6971}
7072
7173subprojects {
@@ -90,94 +92,6 @@ subprojects {
9092 }
9193}
9294
93- private val isSnapshot = System .getenv(" SNAPSHOT" )?.toBoolean() == true
94-
95- version = if (isSnapshot) {
96- val timestamp = SimpleDateFormat (" yyyyMMddHHmm" ).run {
97- timeZone = TimeZone .getTimeZone(" UTC" )
98- format(Date ())
99- }
100- " ${Configuration .snapshotBasedVersionName} -${timestamp} -SNAPSHOT"
101- } else {
102- Configuration .versionName
103- }
104-
105- subprojects {
106- plugins.withId(" com.vanniktech.maven.publish" ) {
107- extensions.configure<MavenPublishBaseExtension > {
108- publishToMavenCentral(automaticRelease = true )
109-
110- pom {
111- name.set(project.name)
112- description.set(" Stream Video official Android SDK" )
113- url.set(" https://github.com/getstream/stream-video-android" )
114-
115- licenses {
116- license {
117- name.set(" Stream License" )
118- url.set(" https://github.com/GetStream/stream-video-android/blob/main/LICENSE" )
119- }
120- }
121-
122- developers {
123- developer {
124- id = " aleksandar-apostolov"
125- name = " Aleksandar Apostolov"
126- 127- }
128- developer {
129- id = " VelikovPetar"
130- name = " Petar Velikov"
131- 132- }
133- developer {
134- id = " andremion"
135- name = " André Mion"
136- 137- }
138- developer {
139- id = " rahul-lohra"
140- name = " Rahul Kumar Lohra"
141- 142- }
143- developer {
144- id = " PratimMallick"
145- name = " Pratim Mallick"
146- 147- }
148- developer {
149- id = " gpunto"
150- name = " Gianmarco David"
151- 152- }
153- }
154-
155- scm {
156- connection.set(" scm:git:github.com/getstream/stream-video-android.git" )
157- developerConnection.set(" scm:git:ssh://github.com/getstream/stream-video-android.git" )
158- url.set(" https://github.com/getstream/stream-video-android/tree/main" )
159- }
160- }
161- }
162- }
163- }
164-
165- tasks.register(" printAllArtifacts" ) {
166- group = " publishing"
167- description = " Prints all artifacts that will be published"
168-
169- doLast {
170- subprojects.forEach { subproject ->
171- subproject.plugins.withId(" com.vanniktech.maven.publish" ) {
172- subproject.extensions.findByType(PublishingExtension ::class .java)
173- ?.publications
174- ?.filterIsInstance<MavenPublication >()
175- ?.forEach { println (" ${it.groupId} :${it.artifactId} :${it.version} " ) }
176- }
177- }
178- }
179- }
180-
18195// apply(from = teamPropsFile("git-hooks.gradle.kts"))
18296//
18397// fun teamPropsFile(propsFile: String): File {
0 commit comments