Skip to content

Commit

Permalink
Apply gradle-nexus-staging-plugin to close and release repo on so… (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
artem-zinnatullin authored and ameliariely committed Aug 16, 2019
1 parent bacc629 commit 775e79c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
11 changes: 11 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:3.4.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

// Uploads artifacts to oss.sonatype.org
classpath "de.marcphilipp.gradle:nexus-publish-plugin:0.3.0"
// "Closes" and "Releases" repository on oss.sonatype.org to finish release process.
classpath "io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.21.0"

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down Expand Up @@ -60,3 +64,10 @@ private def projectVersion() {

return tag
}

apply plugin: 'io.codearte.nexus-staging'

nexusStaging {
username = System.getenv("MAVEN_CENTRAL_USERNAME")
password = System.getenv("MAVEN_CENTRAL_PASSWORD")
}
3 changes: 3 additions & 0 deletions ci
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,7 @@ else
unset GPG_OWNERTRUST

./gradlew --stacktrace --info build publishToSonatype -Psigning.keyId="$GPG_KEY_ID" -Psigning.password="$GPG_PASSPHRASE" -Psigning.secretKeyRingFile="$HOME/.gnupg/secring.gpg"

# Run closeAndReleaseRepository separately to avoid contention between publishing and closing.
./gradlew --stacktrace --info closeAndReleaseRepository
fi

0 comments on commit 775e79c

Please sign in to comment.