Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

automate publish with additional nexus plugins #610

Merged
merged 2 commits into from
Oct 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,7 @@
.vscode/
.DS_Store
hs_err_*.log
local.properties
local.properties

*.gpg
*.bak
Binary file added .travis.gpg.enc
Binary file not shown.
15 changes: 14 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,21 @@ notifications:
email:
- mdr-eng@google.com
after_success:
- ./gradlew jacocoTestReport coveralls
- "./gradlew jacocoTestReport coveralls"
env:
global:
- secure: TOW8DiUzKHdpa/ZL9yaAvzvzAsTfJ6+bW4y2JfukpLT4Qj0V6e6fFPlBwfOvGYR9NAGLpw7DxdNJcSn1sTxIdwvwm5YkriMoSNpHh7IMUs9vx5d/k9ZwR4RQ+XyVzm3oskoxOZUX3HnKvP3nJkGvLgTxsDBJw4FcpuU9V4yTEK4=
- secure: JyoUWkUDIR8O6Fm0QAzmb67OqlMceExmu6GJG2Z/zNSELr8t0mkvKkZ9ApQ0rUxkimUdc5SDY541DCGbwDzmp4ZE1Jd47olq0YJNSUqFvNmdmGZOM+aUfN5jREl9c4R4XPw4GxFhjym8GUPXQTOjxV18nqPyt6aJxN8sq4062u0=
- secure: EhTBrng1AmJGXZ02R5b2txc4LXIsdHuDQ24Wt5IBHT+2011IeG/dKvnygyxplWxZiCFyoPrP6AIwZcgil6fWm0DoSBOcZ0SAFUXMRnqOM/1vFICWNy2nRqH1aRy/HTgRoLA+VYcyypwVfMNbgbV2ZKR/cmDOUcZBJWbuuoiqW80=
- secure: YBx2DnYdeV/Y7HJXneJ5EwzNI0qf8YqEFnBy2ZTiFn9T8kfGmaJ8yQi99JV9g8BPXELnExPwxuo5W1uGecrPZvh0StHOScAxP0OHC1tgahgE7ziow49I+QmlO6c5FOcCQxDks70MiiwcsdvE91KUqE0sjWJmurcIrkGs4hYM0zs=
- secure: RvI62yA7y8ByDJZyVjuZP4krWJtWLwHglhCgw/md01oPAR0xiCH/2osuJVNc3UaUyYQly4novXk1+8cA7HuvoflkzGXdAsnN+PFA1J/XredKAaufOKstKWKXki9ejcJsGH177Ny2b0N7vadDFB9s6Xj1H74CqYEh/uNmvK72N7M=
- secure: INA/3Gkoh5O9orGfxNhnLOTyJdNO7TlyQCjCA2As7dh0if0OZMha1bMWZQGTPfkczlL1tJVrFhNAJL13VyGuQdjrUTRrGQVHLiKgiog4JzNLBVzUL+HdrFEuU49JonnAQdmfzZDw4N0Z8iOPncOdxSI6kHtXibY2/IWUWQmdw3M=
deploy:
provider: script
script: openssl aes-256-cbc -K $encrypted_e022d974387b_key -iv $encrypted_e022d974387b_iv
-in .travis.gpg.enc -out .travis.gpg -d && ./gradlew publishToSonatype -PsonatypeUsername=${SONATYPE_USERNAME}
-PsonatypePassword=${SONATYPE_PASSWORD} -Psigning.keyId=${GPG_KEY_ID} -Psigning.password=${GPG_KEY_PASSPHRASE}
-Psigning.secretKeyRingFile=.travis.gpg --info
on:
tags: true
jdk: openjdk8
19 changes: 19 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import org.apache.tools.ant.filters.ReplaceTokens
import java.time.Duration

buildscript {
repositories {
Expand All @@ -13,6 +14,8 @@ buildscript {
plugins {
id 'com.github.ben-manes.versions' version '0.22.0'
id 'com.github.sherter.google-java-format' version '0.8'
id "de.marcphilipp.nexus-publish" version "0.3.0"
id 'io.codearte.nexus-staging' version '0.21.1'
}

apply plugin: 'java'
Expand Down Expand Up @@ -159,6 +162,22 @@ publishing {
}
}

nexusPublishing {
repositories {
sonatype {
username = sonatypeUsername
password = sonatypePassword
clientTimeout = Duration.ofSeconds(120)
}
}
}

nexusStaging {
username = sonatypeUsername
password = sonatypePassword
packageGroup = "com.google.maps"
}

signing {
sign publishing.publications.MapsJavaUtils
}