Skip to content
Merged
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
8 changes: 5 additions & 3 deletions .github/workflows/publish-new-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,20 +58,22 @@ jobs:

publish:
needs: generate_release_notes
uses: GetStream/android-ci-actions/.github/workflows/release-new-version.yml@v0.1
uses: GetStream/android-ci-actions/.github/workflows/release-new-version.yml@main
with:
ref: "release"
bump: ${{ inputs.bump }}
file-path: ./buildSrc/src/main/kotlin/io/getstream/chat/android/Configuration.kt
release-notes: ${{ needs.generate_release_notes.outputs.release_notes }}
excluded-modules: "stream-chat-android-ui-components-sample,stream-chat-android-compose-sample,stream-chat-android-docs"
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 }}
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}
STREAM_PUBLIC_BOT_TOKEN: ${{ secrets.STREAM_PUBLIC_BOT_TOKEN }}

update_develop_changelog:
Expand Down Expand Up @@ -100,4 +102,4 @@ jobs:
with:
github_token: ${{ secrets.STREAM_PUBLIC_BOT_TOKEN }}
branch: develop
force: true
force: true
19 changes: 7 additions & 12 deletions .github/workflows/publish-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,15 @@ jobs:
- name: Check out code
uses: actions/[email protected]
- uses: GetStream/android-ci-actions/actions/setup-java@main
- name: Release build
# assembleRelease for all modules, excluding non-library modules: samples, docs
run: ./gradlew assembleRelease -x :stream-chat-android-ui-components-sample:assembleRelease -x :stream-chat-android-compose-sample:assembleRelease -x :stream-chat-android-docs:assembleRelease
- name: Source jar and dokka
run: ./gradlew androidSourcesJar javadocJar
- name: Publish to MavenCentral
run: ./gradlew publishReleasePublicationToSonatypeRepository
run: ./gradlew publishToMavenCentral
env:
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 }}
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.OSSRH_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.OSSRH_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.SIGNING_KEY_ID }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_RELEASE_SIGNING_ENABLED: true
SNAPSHOT: true
- name: Show snapshot version
run: ./scripts/show-last-snapshot-update.sh
Expand Down
84 changes: 81 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import com.android.build.api.dsl.ApplicationExtension
import com.android.build.gradle.LibraryExtension
import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask
import com.vanniktech.maven.publish.MavenPublishBaseExtension
import io.getstream.chat.android.Configuration
import io.getstream.chat.android.Dependencies
import io.getstream.chat.android.command.changelog.task.ChangelogReleaseSectionTask
import io.getstream.chat.android.command.release.task.ReleaseTask
Expand Down Expand Up @@ -37,9 +39,8 @@ plugins {
id("io.getstream.chat.VersionPrintPlugin")
alias(libs.plugins.gitversioner)
alias(libs.plugins.gradle.versions)
alias(libs.plugins.nexus.publish)
alias(libs.plugins.binary.compatibility.validator)
alias(libs.plugins.dokka)
alias(libs.plugins.maven.publish)
}

buildscript {
Expand Down Expand Up @@ -133,4 +134,81 @@ apiValidation {
)
}

apply(from = "${rootDir}/scripts/publish-root.gradle")
private val isSnapshot = System.getenv("SNAPSHOT")?.toBoolean() == true
version = if (isSnapshot) Configuration.snapshotVersionName else Configuration.versionName

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

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

licenses {
license {
name.set("Stream License")
url.set("https://github.com/GetStream/stream-chat-android/blob/main/LICENSE")
}
}

developers {
developer {
id = "aleksandar-apostolov"
name = "Aleksandar Apostolov"
email = "[email protected]"
}
developer {
id = "VelikovPetar"
name = "Petar Velikov"
email = "[email protected]"
}
developer {
id = "andremion"
name = "André Mion"
email = "[email protected]"
}
developer {
id = "rahul-lohra"
name = "Rahul Kumar Lohra"
email = "[email protected]"
}
developer {
id = "PratimMallick"
name = "Pratim Mallick"
email = "[email protected]"
}
developer {
id = "gpunto"
name = "Gianmarco David"
email = "[email protected]"
}
}

scm {
connection.set("scm:git:github.com/getstream/stream-chat-android.git")
developerConnection.set("scm:git:ssh://github.com/getstream/stream-chat-android.git")
url.set("https://github.com/getstream/stream-chat-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}") }
}
}
}
}
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ firebaseCrashlyticsPlugin = "3.0.2"
firebaseMessaging = "24.1.0"
gitversioner = "0.5.0"
googleServices = "4.4.2"
gradleNexusPublishPlugin = "1.3.0"
gradleVersionsPlugin = "0.51.0"
huaweiPush = "6.11.0.300"
ituDateVersion = "1.10.2"
Expand Down Expand Up @@ -93,6 +92,7 @@ turbine = "1.2.0"
work = "2.9.1"
playServicesLocation = "21.3.0"
kover = "0.9.2"
mavenPublish = "0.34.0"

[libraries]
allure-kotlin-model = { module = "io.qameta.allure:allure-kotlin-model", version.ref = "allureKotlin"}
Expand Down Expand Up @@ -245,7 +245,7 @@ kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin"}
kotlin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = "kotlin"}
kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin"}
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp"}
nexus-publish = { id = "io.github.gradle-nexus.publish-plugin", version.ref = "gradleNexusPublishPlugin"}
maven-publish = { id = "com.vanniktech.maven.publish", version.ref = "mavenPublish"}
shot = { id = "shot", version.ref = "shot"}
sonarqube = { id = "org.sonarqube", version.ref = "sonarqube"}
spotless = { id = "com.diffplug.spotless", version.ref = "spotless"}
Expand Down
121 changes: 0 additions & 121 deletions scripts/publish-module.gradle

This file was deleted.

71 changes: 0 additions & 71 deletions scripts/publish-root.gradle

This file was deleted.

Loading
Loading