To release MMKV, upload the Android artifacts first, followed by the KMP artifacts. The KMP command publishes the root metadata artifact and all target-specific artifacts (Android, iOS, etc.) in a single operation.
Upload Commands
# 1. Upload Android
cd Android/MMKV
./gradlew :mmkv:publishAllPublicationsToMavenCentralRepository
# 2. Upload KMP
cd ../../KMP
./gradlew :mmkv:publishAllPublicationsToSonatypeRepository \
-PMMKV_USE_MAVEN_LOCAL=true
Central Portal Handoff
After the Maven-style upload, the build automatically performs a handoff to the Central Portal. The default behavior is user_managed, which transfers the deployment for final review. You can override this using -PCENTRAL_PORTAL_PUBLISHING_TYPE:
automatic: Transfer and automatically release after validation.portal_api: Transfer only; continue through the Publisher API.
Configuration Properties
CENTRAL_PORTAL_NAMESPACE: e.g., com.tencentCENTRAL_PORTAL_STAGING_API_URL: https://ossrh-staging-api.central.sonatype.comCENTRAL_PORTAL_DRY_RUN: Set to true for testing.
# Example: Automatic release after validation
./gradlew :mmkv:publishAllPublicationsToSonatypeRepository \
-PMMKV_USE_MAVEN_LOCAL=true \
-PCENTRAL_PORTAL_PUBLISHING_TYPE=automatic