feat(sdk-android): publish to GitHub Packages at maven.pkg.github.com

Coordinates: dev.uatu:sdk-android:0.0.1. Credentials read from
GH_TOKEN/GH_USERNAME (or GITHUB_TOKEN/GITHUB_ACTOR for CI).
.env is gitignored so local tokens stay out of git.

Consumers add the maven repo + debugImplementation in their
build.gradle and we're done.
This commit is contained in:
pj committed 2026-04-18 00:16:33 +07:00
1 parent fad4f7db38
commit 0c68e72341
2 files changed
+34

No files matched your search

+4
View File
@@ -22,3 +22,7 @@ local.properties
# Node # Node
node_modules/ node_modules/
# Secrets
.env
.env.local
+30
View File
@@ -1,6 +1,7 @@
plugins { plugins {
id("com.android.library") version "8.11.0" id("com.android.library") version "8.11.0"
kotlin("android") version "2.1.21" kotlin("android") version "2.1.21"
`maven-publish`
} }
android { android {
@@ -24,6 +25,35 @@ android {
testOptions { testOptions {
unitTests.isReturnDefaultValues = true unitTests.isReturnDefaultValues = true
} }
publishing {
singleVariant("release") {
withSourcesJar()
}
}
}
publishing {
publications {
register<MavenPublication>("release") {
groupId = "dev.uatu"
artifactId = "sdk-android"
version = "0.0.1"
afterEvaluate {
from(components["release"])
}
}
}
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/priyanshujain/uatu")
credentials {
username = System.getenv("GH_USERNAME") ?: System.getenv("GITHUB_ACTOR") ?: "priyanshujain"
password = System.getenv("GH_TOKEN") ?: System.getenv("GITHUB_TOKEN") ?: ""
}
}
}
} }
dependencies { dependencies {