diff --git a/build.gradle.kts b/build.gradle.kts index c3680e6..686f0ec 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -177,4 +177,14 @@ afterEvaluate { sign(publishing.publications["release"]) } } + + if (project == rootProject) { + // standalone build only — in multi-project (android-sdk), parent configures nmcp + nmcp { + publishAllPublicationsToCentralPortal { + username.set(findProperty("ossrh_username") as String? ?: System.getenv("OSSRH_USERNAME") ?: "") + password.set(findProperty("ossrh_password") as String? ?: System.getenv("OSSRH_PASSWORD") ?: "") + } + } + } }