This guide explains how to publish the Atlantis Android library to Maven Central and JitPack.
- JDK 17+
- Gradle 8.x
- GPG key for signing (Maven Central only)
- Sonatype OSSRH account (Maven Central only)
JitPack automatically builds and publishes your library from GitHub releases. No account setup required.
-
Create a GitHub Release
# Tag the release git tag -a v1.0.0 -m "Release version 1.0.0" git push origin v1.0.0
-
Create Release on GitHub
- Go to your repository on GitHub
- Click "Releases" → "Create a new release"
- Select the tag
v1.0.0 - Add release notes
- Publish the release
-
Wait for JitPack Build
- Visit
https://jitpack.io/#ProxymanApp/atlantis - JitPack will automatically build when someone requests the dependency
- First build may take a few minutes
- Visit
-
Users can now add the dependency:
// settings.gradle.kts dependencyResolutionManagement { repositories { maven { url = uri("https://jitpack.io") } } } // build.gradle.kts dependencies { implementation("com.github.ProxymanApp:atlantis:v1.0.0") }
JitPack uses jitpack.yml for custom build configuration (optional):
# jitpack.yml (place in atlantis-android/ folder)
jdk:
- openjdk17
install:
- cd atlantis-android && ./gradlew :atlantis:publishToMavenLocalPublishing to Maven Central requires more setup but provides better discoverability and CDN distribution.
- Create a Sonatype JIRA account at https://issues.sonatype.org
- Create a "New Project" ticket requesting access to your group ID
- Wait for approval (usually 1-2 business days)
# Generate GPG key
gpg --full-generate-key
# List keys to get key ID
gpg --list-keys --keyid-format LONG
# Export public key to keyserver
gpg --keyserver keyserver.ubuntu.com --send-keys YOUR_KEY_ID
# Export private key for CI (store securely)
gpg --export-secret-keys YOUR_KEY_ID | base64 > private-key.gpg.b64Create/update ~/.gradle/gradle.properties (NOT in version control):
# Sonatype credentials
ossrhUsername=your-sonatype-username
ossrhPassword=your-sonatype-password
# GPG signing
signing.keyId=YOUR_KEY_ID_LAST_8_CHARS
signing.password=your-gpg-passphrase
signing.secretKeyRingFile=/path/to/secring.gpgAdd Maven Central publishing configuration to atlantis/build.gradle.kts:
plugins {
// ... existing plugins
id("signing")
}
// Add to afterEvaluate block
afterEvaluate {
publishing {
publications {
create<MavenPublication>("release") {
from(components["release"])
groupId = "com.proxyman"
artifactId = "atlantis-android"
version = project.findProperty("VERSION_NAME") as String? ?: "1.0.0"
pom {
name.set("Atlantis Android")
description.set("Capture HTTP/HTTPS traffic from Android apps and send to Proxyman for debugging")
url.set("https://github.com/ProxymanApp/atlantis")
licenses {
license {
name.set("Apache License, Version 2.0")
url.set("https://www.apache.org/licenses/LICENSE-2.0.txt")
}
}
developers {
developer {
id.set("proxymanllc")
name.set("Proxyman LLC")
email.set("support@proxyman.com")
}
}
scm {
url.set("https://github.com/ProxymanApp/atlantis")
connection.set("scm:git:git://github.com/ProxymanApp/atlantis-android.git")
developerConnection.set("scm:git:ssh://git@github.com/ProxymanApp/atlantis-android.git")
}
}
}
}
repositories {
maven {
name = "sonatype"
// OSSRH (s01.oss.sonatype.org) was sunset on 2025-06-30.
val releasesRepoUrl = uri("https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/")
val snapshotsRepoUrl = uri("https://central.sonatype.com/repository/maven-snapshots/")
url = if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl
credentials {
username = findProperty("ossrhUsername") as String? ?: ""
password = findProperty("ossrhPassword") as String? ?: ""
}
}
}
}
signing {
sign(publishing.publications["release"])
}
}cd atlantis-android
# Publish artifacts to Sonatype Central API
./gradlew :atlantis:publishReleasePublicationToSonatypeRepository
# Or publish all publications
./gradlew :atlantis:publishAllPublicationsToSonatypeRepository- Log in to https://central.sonatype.com
- Go to
Publishing -> Deployments - Find your deployment for namespace
com.proxyman - Click
Publish(or wait if auto-publish is enabled) - Wait 10-30 minutes for sync to Maven Central
JitPack works automatically with GitHub releases - no CI configuration needed.
Create .github/workflows/publish.yml:
name: Publish to Maven Central
on:
release:
types: [published]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Decode GPG Key
run: |
echo "${{ secrets.GPG_PRIVATE_KEY }}" | base64 --decode > private-key.gpg
gpg --import private-key.gpg
- name: Publish to Maven Central
working-directory: atlantis-android
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
run: |
./gradlew :atlantis:publishReleasePublicationToSonatypeRepository \
-PossrhUsername=$OSSRH_USERNAME \
-PossrhPassword=$OSSRH_PASSWORD \
-Psigning.keyId=$SIGNING_KEY_ID \
-Psigning.password=$SIGNING_PASSWORD \
-Psigning.secretKeyRingFile=$HOME/.gnupg/secring.gpgAdd these secrets to your repository settings:
GPG_PRIVATE_KEY: Base64-encoded GPG private keyOSSRH_USERNAME: Sonatype usernameOSSRH_PASSWORD: Sonatype passwordSIGNING_KEY_ID: Last 8 characters of GPG key IDSIGNING_PASSWORD: GPG key passphrase
Update gradle.properties:
VERSION_NAME=1.1.0
VERSION_CODE=21.0.0- Initial release1.0.1- Bug fixes1.1.0- New features (backward compatible)2.0.0- Breaking changes
For development versions, use -SNAPSHOT suffix:
VERSION_NAME=1.1.0-SNAPSHOTPublish to snapshot repository:
./gradlew :atlantis:publishReleasePublicationToSonatypeRepositoryAfter publishing, verify your artifact is available:
# Check Maven Central
curl -s "https://repo1.maven.org/maven2/com/proxyman/atlantis-android/maven-metadata.xml"
# Or search on search.maven.org
# https://search.maven.org/search?q=g:com.proxyman%20AND%20a:atlantis-androidVisit: https://jitpack.io/#ProxymanApp/atlantis
- Check build logs at
https://jitpack.io/#ProxymanApp/atlantis - Ensure
build.gradle.ktsis in the correct location - Try rebuilding by clicking "Get it" again
- Ensure GPG key is not expired
- Check that the key is uploaded to keyserver
- Verify key ID and passphrase are correct
Common issues:
- Missing POM information (name, description, URL, SCM)
- Missing Javadoc JAR
- Missing Sources JAR
- Invalid signature
Check deployment details in https://central.sonatype.com/publishing/deployments for specific validation errors.
For publishing issues, contact: