-
Notifications
You must be signed in to change notification settings - Fork 56
Configure publishing through convention plugins and migrate to common workflow #1593
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
PR checklist ✅All required conditions are satisfied:
🎉 Great job! This PR is ready for review. |
24ced5e to
3b5b679
Compare
SDK Size Comparison 📏
|
|
WalkthroughThis PR consolidates publishing configuration by extracting it from individual modules to centralized plugins, updates CI workflows to reference the shared stream-build-conventions-android repository, removes hardcoded version constants from Configuration.kt, and delegates version management to gradle.properties and dynamic parsing. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Fix all issues with AI Agents 🤖
In @build.gradle.kts:
- Around line 65-70: The change to moduleArtifactIdOverrides that maps
"stream-video-android-ui-xml" -> "stream-video-android-xml" is a breaking
artifact ID change; either publish a deprecated artifact under the old ID or
document a migration. Fix by (1) restoring a published artifact under the old ID
as a deprecated/shim coordinate (publish a dummy module or add an artifact
alias) so existing consumers resolve, or (2) if publishing a shim is not
possible, update documentation: add a clear breaking-change entry and migration
steps in CHANGELOG.md (under the stream-video-android-xml section), and update
README.md and AGENTS.md to replace references to "stream-video-android-ui-xml"
with the new "stream-video-android-xml" and include upgrade instructions and the
version that introduced the change; ensure the publishing block's
moduleArtifactIdOverrides comment mentions the migration approach chosen.
🧹 Nitpick comments (4)
.github/workflows/publish-new-version.yml (1)
7-14: Optional:required: trueis redundant when a default value is provided.Since the
bumpinput hasdefault: minor, a value will always be present, makingrequired: trueunnecessary. However, this is not incorrect and may serve as explicit documentation of intent.stream-video-android-bom/build.gradle.kts (1)
6-14: Spotless configuration workaround can be improved.The
target("no-files-to-format")approach works but is unconventional. Consider disabling Spotless entirely for this module or using a more explicit pattern.🔎 Alternative approach
If the
stream.java.platformplugin automatically applies Spotless, consider explicitly disabling it:-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") - } -} +// Disable Spotless for BOM module (no source files) +spotless { + java { + targetExclude("**/*") + } + kotlin { + targetExclude("**/*") + } +}Or check if the convention plugin provides a way to skip Spotless for specific modules.
demo-app/build.gradle.kts (1)
47-47: Standardize version string formatting across build.gradle.kts.An inconsistency exists in how
rootProject.versionis formatted:
- Line 47:
rootProject.version.toString()(explicit conversion)- Line 199:
"${rootProject.version} ($playVersionCode)"(string interpolation)Both approaches are equivalent—string templates in Kotlin implicitly call
toString(). If standardizing, either style works equally well; string interpolation is idiomatic Kotlin. The version is properly defined ingradle.properties.stream-video-android-core/build.gradle.kts (1)
64-73:gradle.propertiesis properly configured; consider adding inline documentation for code clarity.The version property in
gradle.propertiesis set to1.18.2, which is a valid semantic version format. The parsing logic at lines 64-73 will work correctly and extract the major, minor, and patch components without issues.For future maintainability, consider adding a brief comment explaining that the logic strips qualifiers (e.g., "-SNAPSHOT") when extracting numeric version components but preserves them in the full version string:
+ // Extract major, minor, patch from version string. + // Qualifiers like "-SNAPSHOT" are excluded from numeric fields + // but preserved in STREAM_VIDEO_VERSION. val versionParts = version.toString() .takeWhile { it.isDigit() || it == '.' } .split(".") .mapNotNull(String::toIntOrNull) .also { require(it.size == 3) { "Unexpected version format: $version" } }
📜 Review details
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (13)
.github/workflows/publish-new-version.ymlbuild.gradle.ktsbuildSrc/src/main/kotlin/io/getstream/video/android/Configuration.ktdemo-app/build.gradle.ktsgradle.propertiesgradle/libs.versions.tomlstream-video-android-bom/build.gradle.ktsstream-video-android-core/build.gradle.ktsstream-video-android-filters-video/build.gradle.ktsstream-video-android-previewdata/build.gradle.ktsstream-video-android-ui-compose/build.gradle.ktsstream-video-android-ui-core/build.gradle.ktsstream-video-android-ui-xml/build.gradle.kts
💤 Files with no reviewable changes (6)
- stream-video-android-previewdata/build.gradle.kts
- stream-video-android-ui-core/build.gradle.kts
- buildSrc/src/main/kotlin/io/getstream/video/android/Configuration.kt
- stream-video-android-filters-video/build.gradle.kts
- stream-video-android-ui-xml/build.gradle.kts
- stream-video-android-ui-compose/build.gradle.kts
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{kt,kts}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{kt,kts}: Use PascalCase for types and Composables (e.g.,StreamCallActivity,ParticipantGrid)
Use camelCase for functions and values
Use UPPER_SNAKE_CASE for constants only when truly constant
Prefer explicit visibility modifiers; limitinternalleakage across modules
Keep critical RTC paths off the main thread; prefer coroutines with structured scopes
Monitor logging verbosity; rely onStreamVideoImpl.developmentModefor guardrails
Use KDoc (/** ... */) for public APIs and complex subsystems; link to Stream docs when relevant
Group large files with// regionjudiciously; keep commentary purposeful
Sanitize logs to avoid dumping JWTs, ICE tokens, or call IDs in verbose logs
Pause/resume capture on lifecycle changes; ensure background audio routing is intentional
Validate orientation, aspect ratio, and dynascale handling for both portrait/landscape phones and tablets
Keep concurrency deterministic—use structured coroutines and avoid global scope
Ensure cleanup/teardown paths handle cancellation and failure (important for sockets, queues, retries)
Files:
demo-app/build.gradle.ktsbuild.gradle.ktsstream-video-android-core/build.gradle.ktsstream-video-android-bom/build.gradle.kts
**/*.{kt,java,kts,gradle.kts}
📄 CodeRabbit inference engine (AGENTS.md)
Follow Spotless formatting; ensure custom license headers are in
spotless/directory
Files:
demo-app/build.gradle.ktsbuild.gradle.ktsstream-video-android-core/build.gradle.ktsstream-video-android-bom/build.gradle.kts
**/build.gradle.kts
📄 CodeRabbit inference engine (AGENTS.md)
Do not modify
minSdkortargetSdkvalues; followgradle.propertiesand modulebuild.gradle.kts
Files:
demo-app/build.gradle.ktsbuild.gradle.ktsstream-video-android-core/build.gradle.ktsstream-video-android-bom/build.gradle.kts
gradle/libs.versions.toml
📄 CodeRabbit inference engine (AGENTS.md)
Add new third-party dependencies through
gradle/libs.versions.tomlwith reviewer buy-in
Files:
gradle/libs.versions.toml
🧠 Learnings (9)
📚 Learning: 2025-12-19T09:15:37.269Z
Learnt from: CR
Repo: GetStream/stream-video-android PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-19T09:15:37.269Z
Learning: Applies to stream-video-android-previewdata/**/*.{kt,kts} : Keep test fixtures in `stream-video-android-previewdata`; avoid duplicating builder logic
Applied to files:
demo-app/build.gradle.ktsbuild.gradle.ktsgradle/libs.versions.tomlstream-video-android-core/build.gradle.ktsstream-video-android-bom/build.gradle.kts
📚 Learning: 2025-12-19T09:15:37.269Z
Learnt from: CR
Repo: GetStream/stream-video-android PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-19T09:15:37.269Z
Learning: Applies to **/build.gradle.kts : Do not modify `minSdk` or `targetSdk` values; follow `gradle.properties` and module `build.gradle.kts`
Applied to files:
demo-app/build.gradle.ktsbuild.gradle.ktsgradle/libs.versions.tomlstream-video-android-core/build.gradle.ktsstream-video-android-bom/build.gradle.kts
📚 Learning: 2025-12-19T09:15:37.269Z
Learnt from: CR
Repo: GetStream/stream-video-android PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-19T09:15:37.269Z
Learning: Prefer Jetpack Compose for UI (`stream-video-android-ui-compose`); XML views supported via `stream-video-android-ui-xml`
Applied to files:
demo-app/build.gradle.ktsbuild.gradle.ktsgradle/libs.versions.tomlstream-video-android-core/build.gradle.ktsstream-video-android-bom/build.gradle.kts
📚 Learning: 2025-12-19T09:15:37.269Z
Learnt from: CR
Repo: GetStream/stream-video-android PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-19T09:15:37.269Z
Learning: Applies to **/*.{kt,java} : Use Kotlin with JVM toolchain 17; Java is legacy-only
Applied to files:
build.gradle.ktsgradle/libs.versions.tomlstream-video-android-core/build.gradle.ktsstream-video-android-bom/build.gradle.kts
📚 Learning: 2025-12-19T09:15:37.269Z
Learnt from: CR
Repo: GetStream/stream-video-android PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-19T09:15:37.269Z
Learning: Applies to **/*.{kt,java} : Avoid wildcard imports
Applied to files:
build.gradle.kts
📚 Learning: 2025-12-19T09:15:37.269Z
Learnt from: CR
Repo: GetStream/stream-video-android PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-19T09:15:37.269Z
Learning: Applies to gradle/libs.versions.toml : Add new third-party dependencies through `gradle/libs.versions.toml` with reviewer buy-in
Applied to files:
gradle/libs.versions.toml
📚 Learning: 2025-12-19T09:15:37.269Z
Learnt from: CR
Repo: GetStream/stream-video-android PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-19T09:15:37.269Z
Learning: Applies to **/*.{kt,java,kts,gradle.kts} : Follow Spotless formatting; ensure custom license headers are in `spotless/` directory
Applied to files:
gradle/libs.versions.tomlstream-video-android-bom/build.gradle.kts
📚 Learning: 2025-12-19T09:15:37.269Z
Learnt from: CR
Repo: GetStream/stream-video-android PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-19T09:15:37.269Z
Learning: Maintain binary compatibility in modules shipped to Maven; prefer additive changes over breaking changes
Applied to files:
stream-video-android-core/build.gradle.kts
📚 Learning: 2025-12-19T09:15:37.269Z
Learnt from: CR
Repo: GetStream/stream-video-android PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-19T09:15:37.269Z
Learning: Applies to **/*.{kt,kts} : Use KDoc (`/** ... */`) for public APIs and complex subsystems; link to Stream docs when relevant
Applied to files:
stream-video-android-bom/build.gradle.kts
🧬 Code graph analysis (1)
stream-video-android-bom/build.gradle.kts (1)
stream-video-android-ui-xml/src/main/kotlin/io/getstream/video/android/xml/initializer/VideoUIInitializer.kt (1)
dependencies(35-35)
🔇 Additional comments (10)
.github/workflows/publish-new-version.yml (4)
16-18: LGTM! Concurrency configuration is appropriate for release workflows.The
cancel-in-progress: falsesetting ensures that in-progress releases complete rather than being canceled by new triggers, which is the correct pattern for publishing workflows.
33-33: No action needed. The external workflow versionv0.5.0exists and the interface is compatible. All required inputs (bump) and secrets (github-token, maven-central-username, maven-central-password, signing-key, signing-key-id, signing-key-password) are correctly passed. The removed inputs (ref, file-path, excluded-modules, use-official-plugin, documentation-tasks) are no longer needed—the external workflow handles branch logic and version management internally.
37-42: Ensure all six repository secrets are configured in GitHub repository settings.The secret parameter names and mappings are correctly aligned with the external workflow's interface. Verify that the following secrets exist in the GitHub repository settings with their corresponding values:
STREAM_PUBLIC_BOT_TOKEN(GitHub token with repo write permissions)OSSRH_USERNAME(Maven Central username)OSSRH_PASSWORD(Maven Central password)SIGNING_KEY(GPG signing key)SIGNING_KEY_ID(GPG signing key ID)SIGNING_PASSWORD(GPG signing key password)
30-31: Verify whether the workflow actually requirescontents: writepermission.The external workflow at
GetStream/stream-build-conventions-android/.github/workflows/release.yml@v0.5.0could not be accessed to confirm its permission requirements. Please verify that the called workflow or other operations inpublish-new-version.ymlactually require thecontents: writepermission before adding it, following the principle of least privilege.gradle.properties (1)
48-49: LGTM! Version centralization aligns with Gradle best practices.Moving the version to
gradle.propertiesenables it to be consumed asproject.versionthroughout the build and allows CLI overrides via-Pversion=X.Y.Z.build.gradle.kts (1)
24-25: New Java plugins support platform-based publishing.The addition of
stream.java.libraryandstream.java.platformplugins completes the migration from direct Maven Publish configuration to the centralized convention plugins (v0.5.0).gradle/libs.versions.toml (2)
249-250: New plugin declarations align with publishing migration.The
stream-java-libraryandstream-java-platformplugins are correctly added to support the new publishing approach.
11-11: Verify that 0.5.0 supports thestream.java.libraryandstream.java.platformplugins.While version 0.5.0 is published on Maven Central (Dec 16, 2025), its release notes do not explicitly document support for these plugins. Additionally, Gradle's java-platform and java-library plugins are documented as mutually exclusive—they cannot be applied to the same project. Confirm that 0.5.0 adds support for these plugins and that their usage in this PR aligns with Gradle's plugin architecture.
stream-video-android-bom/build.gradle.kts (2)
16-25: BOM dependencies correctly use constraints.The
constraintsblock properly declares the modules included in the BOM without creating direct dependencies.
3-3: BOM migration to platform plugin is correct.Using
stream.java.platformfor the BOM module is the appropriate approach for publishing a Gradle platform (BOM) artifact. The plugin is properly aliased toio.getstream.java.platformingradle/libs.versions.toml, and the BOM correctly declares all internal modules as constraints in the dependencies block.



Goal
AND-881: Extract publishing configuration to the plugins
AND-781: Unify CI Across SDKs
We now have publishing configuration in the common plugins and a new release workflow to go with it. This PR migrates to those.
Implementation
Configuration.ktin favor of setting it ingradle.propertiesThis automatically sets the project version and allows us to override it as needed.
project.versionTesting
We'll see when we try to release 🤞
☑️Contributor Checklist
General
developbranchCode & documentation
stream-video-examples)☑️Reviewer Checklist
🎉 GIF
Please provide a suitable gif that describes your work on this pull request
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.