Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 15 additions & 13 deletions .github/workflows/publish-new-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,18 @@ on:
workflow_dispatch:
inputs:
bump:
required: true
type: choice
description: "Type of version bump to perform"
options:
- patch
- minor
- major
default: minor

concurrency:
group: release
cancel-in-progress: false

jobs:
pre_release_check:
Expand All @@ -21,20 +27,16 @@ jobs:
id: pre_release_check_step
run: echo "Pre release check"
publish:
permissions:
contents: write
needs: pre_release_check
uses: GetStream/android-ci-actions/.github/workflows/release-new-version.yml@main
uses: GetStream/stream-build-conventions-android/.github/workflows/release.yml@v0.5.0
with:
ref: "develop"
bump: ${{ inputs.bump }}
file-path: ./buildSrc/src/main/kotlin/io/getstream/video/android/Configuration.kt
excluded-modules: "demo-app,tutorials:tutorial-video,tutorials:tutorial-audio"
use-official-plugin: false
# Disable explicit documentation tasks as they are already included while publishing
documentation-tasks: tasks
secrets:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
STREAM_PUBLIC_BOT_TOKEN: ${{ secrets.STREAM_PUBLIC_BOT_TOKEN }}
github-token: ${{ secrets.STREAM_PUBLIC_BOT_TOKEN }}
maven-central-username: ${{ secrets.OSSRH_USERNAME }}
maven-central-password: ${{ secrets.OSSRH_PASSWORD }}
signing-key: ${{ secrets.SIGNING_KEY }}
signing-key-id: ${{ secrets.SIGNING_KEY_ID }}
signing-key-password: ${{ secrets.SIGNING_PASSWORD }}
104 changes: 9 additions & 95 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
import com.vanniktech.maven.publish.MavenPublishBaseExtension
import io.getstream.video.android.Configuration
import java.text.SimpleDateFormat
import java.util.Date
import java.util.TimeZone

apply(from = "${rootDir}/scripts/open-api-code-gen.gradle.kts")

buildscript {
Expand All @@ -27,14 +21,15 @@ plugins {
alias(libs.plugins.stream.android.application) apply false
alias(libs.plugins.stream.android.library) apply false
alias(libs.plugins.stream.android.test) apply false
alias(libs.plugins.stream.java.library) apply false
alias(libs.plugins.stream.java.platform) apply false
alias(libs.plugins.android.application) apply false
alias(libs.plugins.kotlin.android) apply false
// alias(libs.plugins.compose.compiler) apply false -> Enable with Kotlin 2.0+
alias(libs.plugins.kotlin.serialization) apply false
alias(libs.plugins.kotlin.compatibility.validator) apply false
alias(libs.plugins.ksp) apply false
alias(libs.plugins.wire) apply false
alias(libs.plugins.maven.publish)
alias(libs.plugins.google.gms) apply false
alias(libs.plugins.dokka)
alias(libs.plugins.spotless) apply false
Expand Down Expand Up @@ -66,6 +61,13 @@ streamProject {
"io.getstream.video.android.core.model.*"
)
}

publishing {
description = "Stream Video official Android SDK"
moduleArtifactIdOverrides = mapOf(
"stream-video-android-ui-xml" to "stream-video-android-xml"
)
}
}

subprojects {
Expand All @@ -90,94 +92,6 @@ subprojects {
}
}

private val isSnapshot = System.getenv("SNAPSHOT")?.toBoolean() == true

version = if (isSnapshot) {
val timestamp = SimpleDateFormat("yyyyMMddHHmm").run {
timeZone = TimeZone.getTimeZone("UTC")
format(Date())
}
"${Configuration.snapshotBasedVersionName}-${timestamp}-SNAPSHOT"
} else {
Configuration.versionName
}

subprojects {
plugins.withId("com.vanniktech.maven.publish") {
extensions.configure<MavenPublishBaseExtension> {
publishToMavenCentral(automaticRelease = true)

pom {
name.set(project.name)
description.set("Stream Video official Android SDK")
url.set("https://github.com/getstream/stream-video-android")

licenses {
license {
name.set("Stream License")
url.set("https://github.com/GetStream/stream-video-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 = "PratimMallick"
name = "Pratim Mallick"
email = "pratim.mallick@getstream.io"
}
developer {
id = "gpunto"
name = "Gianmarco David"
email = "gianmarco.david@getstream.io"
}
}

scm {
connection.set("scm:git:github.com/getstream/stream-video-android.git")
developerConnection.set("scm:git:ssh://github.com/getstream/stream-video-android.git")
url.set("https://github.com/getstream/stream-video-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<MavenPublication>()
?.forEach { println("${it.groupId}:${it.artifactId}:${it.version}") }
}
}
}
}

//apply(from = teamPropsFile("git-hooks.gradle.kts"))
//
//fun teamPropsFile(propsFile: String): File {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
package io.getstream.video.android

object Configuration {
const val majorVersion = 1
const val minorVersion = 18
const val patchVersion = 3
const val versionName = "$majorVersion.$minorVersion.$patchVersion"
const val versionCode = 57
const val snapshotBasedVersionName = "$majorVersion.$minorVersion.${patchVersion + 1}"
const val snapshotVersionName = "$majorVersion.$minorVersion.${patchVersion + 1}-SNAPSHOT"
const val artifactGroup = "io.getstream"
const val streamVideoCallGooglePlayVersion = versionName
const val streamWebRtcVersionName = "1.3.6"
}
5 changes: 2 additions & 3 deletions demo-app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import com.android.build.api.variant.ResValue
import com.github.triplet.gradle.androidpublisher.ResolutionStrategy
import io.getstream.video.FlavorDimension
import io.getstream.video.VideoDemoFlavor
import io.getstream.video.android.Configuration
import java.io.FileInputStream
import java.util.Properties

Expand All @@ -45,7 +44,7 @@ android {
minSdk = libs.versions.minSdk.get().toInt()
targetSdk = libs.versions.targetSdk.get().toInt()
versionCode = 1
versionName = Configuration.streamVideoCallGooglePlayVersion
versionName = rootProject.version.toString()
testInstrumentationRunner = "io.qameta.allure.android.runners.AllureAndroidJUnitRunner"
testInstrumentationRunnerArguments["clearPackageData"] = "true"
missingDimensionStrategy(FlavorDimension.contentType.name, VideoDemoFlavor.development.name)
Expand Down Expand Up @@ -197,7 +196,7 @@ androidComponents {
applicationVariant.outputs.forEach {
it.versionName.set(
it.versionCode.map { playVersionCode ->
"${Configuration.streamVideoCallGooglePlayVersion} ($playVersionCode)"
"${rootProject.version} ($playVersionCode)"
},
)
}
Expand Down
5 changes: 4 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,7 @@ android.suppressUnsupportedCompileSdk=34

# Build Compose Compiler metrics
enableComposeCompilerMetrics=true
enableComposeCompilerReports=true
enableComposeCompilerReports=true

# Project version
version=1.18.3
6 changes: 3 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ allureKotlin = "2.4.0"
androidGradlePlugin = "8.5.2"
cameraCamera2 = "1.3.4"
spotless = "6.21.0"
streamConventions = "0.4.0"
mavenPublish = "0.34.0"
streamConventions = "0.5.0"
kotlin = "1.9.25"
ksp = "1.9.25-1.0.20"
kotlinSerialization = "1.6.3"
Expand Down Expand Up @@ -247,7 +246,8 @@ stream-project = { id = "io.getstream.project", version.ref = "streamConventions
stream-android-application = { id = "io.getstream.android.application", version.ref = "streamConventions" }
stream-android-library = { id = "io.getstream.android.library", version.ref = "streamConventions" }
stream-android-test = { id = "io.getstream.android.test", version.ref = "streamConventions" }
maven-publish = { id = "com.vanniktech.maven.publish", version.ref = "mavenPublish"}
stream-java-library = { id = "io.getstream.java.library", version.ref = "streamConventions" }
stream-java-platform = { id = "io.getstream.java.platform", version.ref = "streamConventions" }
dokka = { id = "org.jetbrains.dokka", version.ref = "kotlinDokka" }
google-gms = { id = "com.google.gms.google-services", version.ref = "googleService" }
wire = { id = "com.squareup.wire", version.ref = "wire" }
Expand Down
45 changes: 18 additions & 27 deletions stream-video-android-bom/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,34 +1,25 @@
import com.vanniktech.maven.publish.JavadocJar
import com.vanniktech.maven.publish.KotlinJvm
import io.getstream.video.android.Configuration

plugins {
alias(libs.plugins.maven.publish)
alias(libs.plugins.dokka)
kotlin("jvm")
alias(libs.plugins.stream.java.platform)
}

dependencies {
constraints {
api(project(":stream-video-android-core"))
api(project(":stream-video-android-ui-core"))
api(project(":stream-video-android-ui-xml"))
api(project(":stream-video-android-ui-compose"))
api(project(":stream-video-android-filters-video"))
api(project(":stream-video-android-previewdata"))
}
spotless {
// Point to non-existent file pattern because this module has no source files
java {
target("no-files-to-format")
}
kotlin {
target("no-files-to-format")
}
}

mavenPublishing {
coordinates(
groupId = Configuration.artifactGroup,
artifactId = "stream-video-android-bom",
version = rootProject.version.toString(),
)
configure(
KotlinJvm(
javadocJar = JavadocJar.Dokka("dokkaJavadoc"),
sourcesJar = true,
),
)
dependencies {
constraints {
api(project(":stream-video-android-core"))
api(project(":stream-video-android-ui-core"))
api(project(":stream-video-android-ui-xml"))
api(project(":stream-video-android-ui-compose"))
api(project(":stream-video-android-filters-video"))
api(project(":stream-video-android-previewdata"))
}
}
32 changes: 11 additions & 21 deletions stream-video-android-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import com.vanniktech.maven.publish.AndroidSingleVariantLibrary
import io.getstream.video.android.Configuration
import java.io.FileInputStream
import java.util.Properties

plugins {
alias(libs.plugins.maven.publish)
id("io.getstream.video.android.library")
id("io.getstream.video.generateServices")
id(libs.plugins.kotlin.serialization.get().pluginId)
Expand Down Expand Up @@ -62,10 +60,17 @@ android {
minSdk = libs.versions.minSdk.get().toInt()
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles("consumer-proguard-rules.pro")
buildConfigField("String", "STREAM_VIDEO_VERSION", "\"${Configuration.versionName}\"")
buildConfigField("Integer", "STREAM_VIDEO_VERSION_MAJOR", "${Configuration.majorVersion}")
buildConfigField("Integer", "STREAM_VIDEO_VERSION_MINOR", "${Configuration.minorVersion}")
buildConfigField("Integer", "STREAM_VIDEO_VERSION_PATCH", "${Configuration.patchVersion}")

val versionParts =
version.toString()
.takeWhile { it.isDigit() || it == '.' }
.split(".")
.mapNotNull(String::toIntOrNull)
.also { require(it.size == 3) { "Unexpected version format: $version" } }
buildConfigField("String", "STREAM_VIDEO_VERSION", "\"$version\"")
buildConfigField("Integer", "STREAM_VIDEO_VERSION_MAJOR", "${versionParts[0]}")
buildConfigField("Integer", "STREAM_VIDEO_VERSION_MINOR", "${versionParts[1]}")
buildConfigField("Integer", "STREAM_VIDEO_VERSION_PATCH", "${versionParts[2]}")
buildConfigField(
"String",
"STREAM_WEBRTC_VERSION",
Expand Down Expand Up @@ -226,21 +231,6 @@ dependencies {
androidTestImplementation(libs.turbine)
}

mavenPublishing {
coordinates(
groupId = Configuration.artifactGroup,
artifactId = "stream-video-android-core",
version = rootProject.version.toString(),
)
configure(
AndroidSingleVariantLibrary(
variant = "release",
sourcesJar = true,
publishJavadocJar = true,
),
)
}

afterEvaluate {
tasks.named("testDebugUnitTest") {
dependsOn("isolatedTest")
Expand Down
18 changes: 0 additions & 18 deletions stream-video-android-filters-video/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import com.vanniktech.maven.publish.AndroidSingleVariantLibrary
import io.getstream.video.android.Configuration

plugins {
alias(libs.plugins.maven.publish)
id("io.getstream.video.android.library")
}

Expand All @@ -44,18 +41,3 @@ dependencies {
// renderscript-toolkit
implementation(libs.stream.renderscript)
}

mavenPublishing {
coordinates(
groupId = Configuration.artifactGroup,
artifactId = "stream-video-android-filters-video",
version = rootProject.version.toString(),
)
configure(
AndroidSingleVariantLibrary(
variant = "release",
sourcesJar = true,
publishJavadocJar = true,
),
)
}
Loading
Loading