File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,7 +11,11 @@ buildscript {
1111 dependencies {
1212 classpath ' com.android.tools.build:gradle:3.4.2'
1313 classpath " org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version "
14+
15+ // Uploads artifacts to oss.sonatype.org
1416 classpath " de.marcphilipp.gradle:nexus-publish-plugin:0.3.0"
17+ // "Closes" and "Releases" repository on oss.sonatype.org to finish release process.
18+ classpath " io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.21.0"
1519
1620 // NOTE: Do not place your application dependencies here; they belong
1721 // in the individual module build.gradle files
@@ -60,3 +64,10 @@ private def projectVersion() {
6064
6165 return tag
6266}
67+
68+ apply plugin : ' io.codearte.nexus-staging'
69+
70+ nexusStaging {
71+ username = System . getenv(" MAVEN_CENTRAL_USERNAME" )
72+ password = System . getenv(" MAVEN_CENTRAL_PASSWORD" )
73+ }
Original file line number Diff line number Diff line change 5454 unset GPG_OWNERTRUST
5555
5656 ./gradlew --stacktrace --info build publishToSonatype -Psigning.keyId=" $GPG_KEY_ID " -Psigning.password=" $GPG_PASSPHRASE " -Psigning.secretKeyRingFile=" $HOME /.gnupg/secring.gpg"
57+
58+ # Run closeAndReleaseRepository separately to avoid contention between publishing and closing.
59+ ./gradlew --stacktrace --info closeAndReleaseRepository
5760fi
You can’t perform that action at this time.
0 commit comments