From 525768f9c54e7cc9df1396825cf8b496862c6c83 Mon Sep 17 00:00:00 2001 From: Gian <47775302+gpunto@users.noreply.github.com> Date: Mon, 1 Dec 2025 11:43:31 +0100 Subject: [PATCH] Add missing publishing configuration --- build.gradle.kts | 72 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/build.gradle.kts b/build.gradle.kts index 35bbde5..4e9e7aa 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,6 @@ import com.android.build.api.dsl.ApplicationExtension import com.android.build.api.dsl.LibraryExtension +import com.vanniktech.maven.publish.MavenPublishBaseExtension import io.getstream.core.Configuration plugins { @@ -62,3 +63,74 @@ subprojects { } } } + +subprojects { + plugins.withId("com.vanniktech.maven.publish") { + extensions.configure { + publishToMavenCentral(automaticRelease = true) + + pom { + name.set("Stream Android Core") + description.set("Stream Core official Android SDK") + url.set("https://github.com/getstream/stream-core-android") + + licenses { + license { + name.set("Stream License") + url.set("https://github.com/GetStream/stream-core-android/blob/main/LICENSE") + } + } + + developers { + developer { + id = "aleksandar-apostolov" + name = "Aleksandar Apostolov" + email = "aleksandar.apostolov@getstream.io" + } + developer { + id = "VelikovPetar" + name = "Petar Velikov" + email = "petar.velikov@getstream.io" + } + developer { + id = "andremion" + name = "André Mion" + email = "andre.rego@getstream.io" + } + developer { + id = "rahul-lohra" + name = "Rahul Kumar Lohra" + email = "rahul.lohra@getstream.io" + } + developer { + id = "gpunto" + name = "Gianmarco David" + email = "gianmarco.david@getstream.io" + } + } + + scm { + connection.set("scm:git:github.com/getstream/stream-core-android.git") + developerConnection.set("scm:git:ssh://github.com/getstream/stream-core-android.git") + url.set("https://github.com/getstream/stream-core-android/tree/main") + } + } + } + } +} + +tasks.register("printAllArtifacts") { + group = "publishing" + description = "Prints all artifacts that will be published" + + doLast { + subprojects.forEach { subproject -> + subproject.plugins.withId("com.vanniktech.maven.publish") { + subproject.extensions.findByType(PublishingExtension::class.java) + ?.publications + ?.filterIsInstance() + ?.forEach { println("${it.groupId}:${it.artifactId}:${it.version}") } + } + } + } +}