feat(plugin_interfaces): update Maven publishing configuration and add GitHub Actions workflow

This commit is contained in:
Kingkor Roy Tirtho 2026-07-22 23:07:38 +06:00
parent cfaea59e2f
commit b67a4a22b5
3 changed files with 66 additions and 3 deletions

26
.github/workflows/maven-publish.yml vendored Normal file
View File

@ -0,0 +1,26 @@
# .github/workflows/publish.yml
name: Maven Publish
on:
workflow_dispatch:
jobs:
publish:
name: Release build and publish
runs-on: macOS-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 21
- name: Publish to MavenCentral
run: ./gradlew publishToMavenCentral --no-configuration-cache
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.MAVEN_SIGNING_KEY_ID }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.MAVEN_SIGNING_KEY_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.MAVEN_GPG_KEY_CONTENTS }}

View File

@ -72,6 +72,7 @@ spotube-gradle = "0.1.0"
cryptography = "0.6.0"
reorderable = "3.1.0"
vlcjBundler = "0.1.0"
vanniktechMavenPublish = "0.37.0"
uniffi = "0.3.7"
kotlinx-atomicfu = "0.33.0"
mokkery = "3.3.0"
@ -181,4 +182,5 @@ vlcjBundler = { id = "dev.krtirtho.vlcj-bundler.gradle-plugin", version.ref = "v
kotlinxAtomicFu = { id = "org.jetbrains.kotlinx.atomicfu", version.ref = "kotlinx-atomicfu" }
uniffi = { id = "dev.gobley.uniffi", version.ref = "uniffi" }
cargo = { id = "dev.gobley.cargo", version.ref = "uniffi" }
mokkery = { id = "dev.mokkery", version.ref = "mokkery" }
mokkery = { id = "dev.mokkery", version.ref = "mokkery" }
vanniktechMavenPublish = { id = "com.vanniktech.maven.publish", version.ref = "vanniktechMavenPublish" }

View File

@ -16,7 +16,7 @@
*/
plugins {
alias(libs.plugins.mavenPublish)
alias(libs.plugins.vanniktechMavenPublish)
alias(libs.plugins.kotlinMultiplatform)
alias(libs.plugins.androidKotlinMultiplatformLibrary)
alias(libs.plugins.kotlinSerialization)
@ -32,7 +32,7 @@ kotlin {
// which platforms this KMP module supports.
// See: https://kotlinlang.org/docs/multiplatform-discover-project.html#targets
androidLibrary {
namespace = "dev.krtirtho.plugin_interfaces"
namespace = "dev.krtirtho.spotube.plugin_interfaces"
compileSdk = libs.versions.android.compileSdk.get().toInt()
minSdk = libs.versions.android.minSdk.get().toInt()
@ -91,4 +91,39 @@ kotlin {
jsMain.dependencies {}
}
}
mavenPublishing {
publishToMavenCentral()
signAllPublications()
coordinates(
group.toString(),
"plugin_interfaces",
version.toString()
)
pom {
name = "plugin_interfaces"
description = "Plugin interfaces for Spotube"
inceptionYear = "2026"
url = "https://github.com/KRTirtho/spotube"
licenses {
license {
name = "AGPL-3.0-or-later"
url = "https://spdx.org/licenses/AGPL-3.0-or-later.html"
distribution = "https://spdx.org/licenses/AGPL-3.0-or-later.html"
}
}
developers {
developer {
id = "KRTirtho"
name = "Kingkor Roy Tirtho"
url = "https://github.com/KRTirtho/"
}
}
scm {
url = "https://github.com/KRTirtho/spotube"
connection = "scm:git:git://github.com/KRTirtho/spotube.git"
developerConnection = "scm:git:ssh://git@github.com/KRTirtho/spotube.git"
}
}
}