mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-02 19:17:10 +00:00
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:
1 parent
fad4f7db38
commit
0c68e72341
2 files changed
+34
No files matched your search
@@ -1,6 +1,7 @@
|
||||
plugins {
|
||||
id("com.android.library") version "8.11.0"
|
||||
kotlin("android") version "2.1.21"
|
||||
`maven-publish`
|
||||
}
|
||||
|
||||
android {
|
||||
@@ -24,6 +25,35 @@ android {
|
||||
testOptions {
|
||||
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 {
|
||||
|
||||
Reference in new issue
Block a user