From 001233e2cb49003f3cd1fbef7f5941267450eb93 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Wed, 26 Sep 2018 16:59:48 -0700 Subject: [PATCH 1/7] Add Kokoro release scripts --- .kokoro/release/common.cfg | 56 ++++++++++ .kokoro/release/common.sh | 50 +++++++++ .kokoro/release/drop.cfg | 7 ++ .kokoro/release/drop.sh | 25 +++++ .kokoro/release/promote.cfg | 7 ++ .kokoro/release/promote.sh | 25 +++++ .kokoro/release/stage.cfg | 7 ++ .kokoro/release/stage.sh | 32 ++++++ google-api-client-android/pom.xml | 2 +- google-api-client-appengine/pom.xml | 4 +- google-api-client-gson/pom.xml | 4 +- google-api-client-jackson2/pom.xml | 4 +- google-api-client-java6/pom.xml | 2 +- google-api-client-protobuf/pom.xml | 4 +- google-api-client-servlet/pom.xml | 6 +- google-api-client-xml/pom.xml | 4 +- google-api-client/pom.xml | 4 +- pom.xml | 158 ++++++++++++++++------------ 18 files changed, 317 insertions(+), 84 deletions(-) create mode 100644 .kokoro/release/common.cfg create mode 100644 .kokoro/release/common.sh create mode 100644 .kokoro/release/drop.cfg create mode 100755 .kokoro/release/drop.sh create mode 100644 .kokoro/release/promote.cfg create mode 100755 .kokoro/release/promote.sh create mode 100644 .kokoro/release/stage.cfg create mode 100755 .kokoro/release/stage.sh diff --git a/.kokoro/release/common.cfg b/.kokoro/release/common.cfg new file mode 100644 index 000000000..73e295f10 --- /dev/null +++ b/.kokoro/release/common.cfg @@ -0,0 +1,56 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + } +} + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "google-api-java-client/.kokoro/trampoline.sh" + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 70247 + keyname: "maven-gpg-keyring" + } + } +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 70247 + keyname: "maven-gpg-passphrase" + } + } +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 70247 + keyname: "maven-gpg-pubkeyring" + } + } +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 70247 + keyname: "sonatype-credentials" + } + } +} diff --git a/.kokoro/release/common.sh b/.kokoro/release/common.sh new file mode 100644 index 000000000..f7d538b3a --- /dev/null +++ b/.kokoro/release/common.sh @@ -0,0 +1,50 @@ +#!/bin/bash +# Copyright 2018 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +# Get secrets from keystore and set and environment variables +setup_environment_secrets() { + export GPG_PASSPHRASE=$(cat ${KOKORO_KEYSTORE_DIR}/70247_maven-gpg-passphrase) + export GPG_TTY=$(tty) + export GPG_HOMEDIR=/gpg + mkdir $GPG_HOMEDIR + mv ${KOKORO_KEYSTORE_DIR}/70247_maven-gpg-pubkeyring $GPG_HOMEDIR/pubring.gpg + mv ${KOKORO_KEYSTORE_DIR}/70247_maven-gpg-keyring $GPG_HOMEDIR/secring.gpg + export SONATYPE_USERNAME=$(cat ${KOKORO_KEYSTORE_DIR}/70247_sonatype-credentials | cut -f1 -d'|') + export SONATYPE_PASSWORD=$(cat ${KOKORO_KEYSTORE_DIR}/70247_sonatype-credentials | cut -f2 -d'|') +} + +create_settings_xml_file() { + echo " + + + ossrh + ${SONATYPE_USERNAME} + ${SONATYPE_PASSWORD} + + + sonatype-nexus-staging + ${SONATYPE_USERNAME} + ${SONATYPE_PASSWORD} + + + sonatype-nexus-snapshots + ${SONATYPE_USERNAME} + ${SONATYPE_PASSWORD} + + +" > $1 +} diff --git a/.kokoro/release/drop.cfg b/.kokoro/release/drop.cfg new file mode 100644 index 000000000..395a94c00 --- /dev/null +++ b/.kokoro/release/drop.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Tell the trampoline which build file to use. +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/google-api-java-client/.kokoro/release/drop.sh" +} diff --git a/.kokoro/release/drop.sh b/.kokoro/release/drop.sh new file mode 100755 index 000000000..abc381e5d --- /dev/null +++ b/.kokoro/release/drop.sh @@ -0,0 +1,25 @@ +#!/bin/bash +# Copyright 2018 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +source $(dirname "$0")/common.sh + +pushd $(dirname "$0")/../../ + +setup_environment_secrets +create_settings_xml_file "settings.xml" + +mvn nexus-staging:drop --settings=settings.xml diff --git a/.kokoro/release/promote.cfg b/.kokoro/release/promote.cfg new file mode 100644 index 000000000..8703880cd --- /dev/null +++ b/.kokoro/release/promote.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Tell the trampoline which build file to use. +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/google-api-java-client/.kokoro/release/promote.sh" +} diff --git a/.kokoro/release/promote.sh b/.kokoro/release/promote.sh new file mode 100755 index 000000000..439e0fc3e --- /dev/null +++ b/.kokoro/release/promote.sh @@ -0,0 +1,25 @@ +#!/bin/bash +# Copyright 2018 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +source $(dirname "$0")/common.sh + +pushd $(dirname "$0")/../../ + +setup_environment_secrets +create_settings_xml_file "settings.xml" + +mvn nexus-staging:release -DperformRelease=true --settings=settings.xml diff --git a/.kokoro/release/stage.cfg b/.kokoro/release/stage.cfg new file mode 100644 index 000000000..dcf8f7364 --- /dev/null +++ b/.kokoro/release/stage.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Tell the trampoline which build file to use. +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/google-api-java-client/.kokoro/release/stage.sh" +} diff --git a/.kokoro/release/stage.sh b/.kokoro/release/stage.sh new file mode 100755 index 000000000..02809c918 --- /dev/null +++ b/.kokoro/release/stage.sh @@ -0,0 +1,32 @@ +#!/bin/bash +# Copyright 2018 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +source $(dirname "$0")/common.sh + +pushd $(dirname "$0")/../../ + +setup_environment_secrets +create_settings_xml_file "settings.xml" + +mvn clean install deploy \ + --settings settings.xml \ + -DperformRelease=true \ + -Dgpg.executable=gpg \ + -Dgpg.passphrase=${GPG_PASSPHRASE} \ + -Dgpg.homedir=${GPG_HOMEDIR} + + diff --git a/google-api-client-android/pom.xml b/google-api-client-android/pom.xml index ae08ec9ec..d05fa0c12 100644 --- a/google-api-client-android/pom.xml +++ b/google-api-client-android/pom.xml @@ -16,7 +16,7 @@ maven-javadoc-plugin - http://download.oracle.com/javase/1.5.0/docs/api/ + http://download.oracle.com/javase/6/docs/api/ ${project.name} ${project.version} ${project.artifactId} ${project.version} diff --git a/google-api-client-appengine/pom.xml b/google-api-client-appengine/pom.xml index 96ac3b6bd..3baef8c6e 100644 --- a/google-api-client-appengine/pom.xml +++ b/google-api-client-appengine/pom.xml @@ -17,8 +17,8 @@ http://download.oracle.com/javase/6/docs/api/ https://cloud.google.com/appengine/docs/standard/java/javadoc/ - http://javadoc.google-http-java-client.googlecode.com/hg/${project.http.version} - http://javadoc.google-oauth-java-client.googlecode.com/hg/${project.oauth.version} + https://googleapis.github.io/google-http-java-client/releases/${project.http.version}/javadoc/ + https://googleapis.github.io/google-oauth-java-client/releases/${project.oauth.version}/javadoc/ ${project.name} ${project.version} ${project.artifactId} ${project.version} diff --git a/google-api-client-gson/pom.xml b/google-api-client-gson/pom.xml index fea316f79..552353c55 100644 --- a/google-api-client-gson/pom.xml +++ b/google-api-client-gson/pom.xml @@ -15,8 +15,8 @@ maven-javadoc-plugin - http://download.oracle.com/javase/1.5.0/docs/api/ - http://javadoc.google-http-java-client.googlecode.com/hg/${project.http.version} + http://download.oracle.com/javase/6/docs/api/ + https://googleapis.github.io/google-http-java-client/releases/${project.http.version}/javadoc/ ${project.name} ${project.version} ${project.artifactId} ${project.version} diff --git a/google-api-client-jackson2/pom.xml b/google-api-client-jackson2/pom.xml index e2be54ecd..d8f6b9c06 100644 --- a/google-api-client-jackson2/pom.xml +++ b/google-api-client-jackson2/pom.xml @@ -15,8 +15,8 @@ maven-javadoc-plugin - http://download.oracle.com/javase/1.5.0/docs/api/ - http://javadoc.google-http-java-client.googlecode.com/hg/${project.http.version} + http://download.oracle.com/javase/6/docs/api/ + https://googleapis.github.io/google-http-java-client/releases/${project.http.version}/javadoc/ ${project.name} ${project.version} ${project.artifactId} ${project.version} diff --git a/google-api-client-java6/pom.xml b/google-api-client-java6/pom.xml index 1a21db064..a4c42a98e 100644 --- a/google-api-client-java6/pom.xml +++ b/google-api-client-java6/pom.xml @@ -16,7 +16,7 @@ http://download.oracle.com/javase/6/docs/api/ - http://javadoc.google-http-java-client.googlecode.com/hg/${project.http.version} + https://googleapis.github.io/google-http-java-client/releases/${project.http.version}/javadoc/ ${project.name} ${project.version} ${project.artifactId} ${project.version} diff --git a/google-api-client-protobuf/pom.xml b/google-api-client-protobuf/pom.xml index f436b752d..25eb9e43a 100644 --- a/google-api-client-protobuf/pom.xml +++ b/google-api-client-protobuf/pom.xml @@ -22,8 +22,8 @@ maven-javadoc-plugin - http://download.oracle.com/javase/1.5.0/docs/api/ - http://javadoc.google-http-java-client.googlecode.com/hg/${project.http.version} + http://download.oracle.com/javase/6/docs/api/ + https://googleapis.github.io/google-http-java-client/releases/${project.http.version}/javadoc/ ${project.name} ${project.version} ${project.artifactId} ${project.version} diff --git a/google-api-client-servlet/pom.xml b/google-api-client-servlet/pom.xml index 51888a642..475e082bc 100644 --- a/google-api-client-servlet/pom.xml +++ b/google-api-client-servlet/pom.xml @@ -15,9 +15,9 @@ maven-javadoc-plugin - http://download.oracle.com/javase/1.5.0/docs/api/ - http://javadoc.google-http-java-client.googlecode.com/hg/${project.http.version} - http://javadoc.google-oauth-java-client.googlecode.com/hg/${project.oauth.version} + http://download.oracle.com/javase/6/docs/api/ + https://googleapis.github.io/google-http-java-client/releases/${project.http.version}/javadoc/ + https://googleapis.github.io/google-oauth-java-client/releases/${project.oauth.version}/javadoc/ ${project.name} ${project.version} ${project.artifactId} ${project.version} diff --git a/google-api-client-xml/pom.xml b/google-api-client-xml/pom.xml index ca0096645..7368a081a 100644 --- a/google-api-client-xml/pom.xml +++ b/google-api-client-xml/pom.xml @@ -15,8 +15,8 @@ maven-javadoc-plugin - http://download.oracle.com/javase/1.5.0/docs/api/ - http://javadoc.google-http-java-client.googlecode.com/hg/${project.http.version} + http://download.oracle.com/javase/6/docs/api/ + https://googleapis.github.io/google-http-java-client/releases/${project.http.version}/javadoc/ ${project.name} ${project.version} ${project.artifactId} ${project.version} diff --git a/google-api-client/pom.xml b/google-api-client/pom.xml index 92e0fff68..19def4ed6 100644 --- a/google-api-client/pom.xml +++ b/google-api-client/pom.xml @@ -24,8 +24,8 @@ https://docs.oracle.com/javase/6/docs/api/ https://cloud.google.com/appengine/docs/standard/java/javadoc/ - https://googleapis.github.io/google-http-java-client/releases/1.25.0/javadoc/ - https://googleapis.github.io/google-oauth-java-client/releases/1.25.0/javadoc/ + https://googleapis.github.io/google-http-java-client/releases/${project.http.version}/javadoc/ + https://googleapis.github.io/google-oauth-java-client/releases/${project.oauth.version}/javadoc/ ${project.name} ${project.version} ${project.artifactId} ${project.version} diff --git a/pom.xml b/pom.xml index 656f6b913..5b4450e4e 100644 --- a/pom.xml +++ b/pom.xml @@ -27,9 +27,9 @@ - scm:git:https://github.com/google/google-api-java-client.git - scm:git:ssh:git@github.com:google/google-api-java-client.git - https://github.com/google/google-api-java-client + scm:git:https://github.com/googleapis/google-api-java-client.git + scm:git:ssh:git@github.com:googleapis/google-api-java-client.git + https://github.com/googleapis/google-api-java-client @@ -147,7 +147,7 @@ javax.servlet servlet-api - 2.5 + ${project.servlet-api.version} com.google.http-client @@ -286,12 +286,19 @@ - maven-assembly-plugin - 2.2 + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.6 + true + + ossrh + https://oss.sonatype.org/ + false + - maven-clean-plugin - 2.4.1 + maven-assembly-plugin + 2.2 maven-compiler-plugin @@ -301,74 +308,53 @@ 1.6 + - maven-dependency-plugin - 2.1 - - - maven-deploy-plugin - 2.5 - - - maven-ear-plugin - 2.4.2 - - - maven-ejb-plugin - 2.3 - - - maven-install-plugin - 2.3.1 - - - maven-jar-plugin - 2.3.1 - - - false - - + org.apache.maven.plugins + maven-source-plugin + 2.2.1 + + + attach-sources + + jar-no-fork + + + + org.apache.maven.plugins maven-javadoc-plugin - 2.7 - - - maven-plugin-plugin - 2.6 + 2.9.1 + + + attach-javadocs + + jar + + + - maven-rar-plugin - 2.2 - - - maven-release-plugin - 2.1 - - - maven-resources-plugin - 2.4.3 - - - maven-site-plugin - 2.1.1 - - - maven-source-plugin - 2.1.2 + org.apache.maven.plugins + maven-jar-plugin + 3.0.2 + + + + test-jar + + + maven-surefire-plugin - 2.12.4 + 2.19.1 -Xmx1024m + sponge_log - - maven-war-plugin - 2.1 - maven-checkstyle-plugin 2.6 @@ -381,7 +367,7 @@ org.codehaus.mojo clirr-maven-plugin - 2.6 + 2.8 org.codehaus.mojo @@ -412,8 +398,8 @@ http://download.oracle.com/javase/6/docs/api/ http://cloud.google.com/appengine/docs/java/javadoc - https://developers.google.com/api-client-library/java/google-http-java-client/reference/${project.http.version} - https://developers.google.com/api-client-library/java/google-http-java-client/reference/${project.oauth.version} + https://googleapis.github.io/google-http-java-client/releases/${project.http.version}/javadoc/ + https://googleapis.github.io/google-oauth-java-client/releases/${project.oauth.version}/javadoc/ Google API Client Library for Java ${project.version} ${basedir}/overview.html @@ -461,6 +447,7 @@ + org.apache.maven.plugins maven-checkstyle-plugin checkstyle.xml @@ -511,7 +498,7 @@ org.codehaus.mojo.signature - java15 + java16 1.0 @@ -550,6 +537,43 @@ 4.5.5 4.4.10 2.3-eb + 2.5 1.1 + + + + release-sign-artifacts + + + performRelease + true + + + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.6 + + + sign-artifacts + verify + + sign + + + + --pinentry-mode + loopback + + + + + + + + + From bd85c4bba3579092b54deaff74ebd82ac3094c85 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Thu, 27 Sep 2018 09:25:31 -0700 Subject: [PATCH 2/7] Remove unnecessary extra maven-jar compile after upgrading plugins --- google-api-client-appengine/pom.xml | 9 -------- google-api-client-gson/pom.xml | 9 -------- google-api-client-jackson2/pom.xml | 9 -------- google-api-client-java6/pom.xml | 9 -------- google-api-client-protobuf/pom.xml | 9 -------- google-api-client-servlet/pom.xml | 34 +++++++++++++++++++---------- google-api-client-xml/pom.xml | 9 -------- pom.xml | 3 +++ 8 files changed, 26 insertions(+), 65 deletions(-) diff --git a/google-api-client-appengine/pom.xml b/google-api-client-appengine/pom.xml index 3baef8c6e..f501ea8c6 100644 --- a/google-api-client-appengine/pom.xml +++ b/google-api-client-appengine/pom.xml @@ -33,15 +33,6 @@ - - - jar - compile - - jar - - - maven-source-plugin diff --git a/google-api-client-gson/pom.xml b/google-api-client-gson/pom.xml index 552353c55..b329a5296 100644 --- a/google-api-client-gson/pom.xml +++ b/google-api-client-gson/pom.xml @@ -31,15 +31,6 @@ - - - jar - compile - - jar - - - maven-source-plugin diff --git a/google-api-client-jackson2/pom.xml b/google-api-client-jackson2/pom.xml index d8f6b9c06..495e76285 100644 --- a/google-api-client-jackson2/pom.xml +++ b/google-api-client-jackson2/pom.xml @@ -31,15 +31,6 @@ - - - jar - compile - - jar - - - org.apache.felix diff --git a/google-api-client-java6/pom.xml b/google-api-client-java6/pom.xml index a4c42a98e..a06cf74b3 100644 --- a/google-api-client-java6/pom.xml +++ b/google-api-client-java6/pom.xml @@ -31,15 +31,6 @@ - - - jar - compile - - jar - - - maven-source-plugin diff --git a/google-api-client-protobuf/pom.xml b/google-api-client-protobuf/pom.xml index 25eb9e43a..e5c80c677 100644 --- a/google-api-client-protobuf/pom.xml +++ b/google-api-client-protobuf/pom.xml @@ -38,15 +38,6 @@ - - - jar - compile - - jar - - - maven-source-plugin diff --git a/google-api-client-servlet/pom.xml b/google-api-client-servlet/pom.xml index 475e082bc..c504eff58 100644 --- a/google-api-client-servlet/pom.xml +++ b/google-api-client-servlet/pom.xml @@ -32,15 +32,6 @@ - - - jar - compile - - jar - - - maven-source-plugin @@ -56,11 +47,32 @@ org.datanucleus - maven-datanucleus-plugin - 2.2.1 + datanucleus-maven-plugin + ${project.datanucleus-maven-plugin.version} + JDO true + + + org.datanucleus + datanucleus-core + ${project.datanucleus-core.version} + runtime + + + org.datanucleus + datanucleus-api-jdo + ${project.datanucleus-api-jdo.version} + runtime + + + javax.jdo + jdo2-api + ${project.jdo2-api.version} + runtime + + process-classes diff --git a/google-api-client-xml/pom.xml b/google-api-client-xml/pom.xml index 7368a081a..23a48ee9b 100644 --- a/google-api-client-xml/pom.xml +++ b/google-api-client-xml/pom.xml @@ -31,15 +31,6 @@ - - - jar - compile - - jar - - - maven-source-plugin diff --git a/pom.xml b/pom.xml index 5b4450e4e..d1bd1271b 100644 --- a/pom.xml +++ b/pom.xml @@ -537,6 +537,9 @@ 4.5.5 4.4.10 2.3-eb + 3.2.2 + 3.2.1 + 4.0.3 2.5 1.1 From 61891671f87e93a26708b65fac79de5a81993ea2 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Thu, 27 Sep 2018 10:13:36 -0700 Subject: [PATCH 3/7] Add the appengine api --- .kokoro/release/stage.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.kokoro/release/stage.sh b/.kokoro/release/stage.sh index 02809c918..7185ba549 100755 --- a/.kokoro/release/stage.sh +++ b/.kokoro/release/stage.sh @@ -22,6 +22,9 @@ pushd $(dirname "$0")/../../ setup_environment_secrets create_settings_xml_file "settings.xml" +# Install the appengine-api +mvn dependency:get -Dartifact=com.google.appengine:appengine-api-1.0-sdk:1.9.65 + mvn clean install deploy \ --settings settings.xml \ -DperformRelease=true \ From b668069618820f4254b2e64256cd72d8aa389c59 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Thu, 27 Sep 2018 10:23:17 -0700 Subject: [PATCH 4/7] skip tests --- .kokoro/release/stage.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.kokoro/release/stage.sh b/.kokoro/release/stage.sh index 7185ba549..f4d2b86d5 100755 --- a/.kokoro/release/stage.sh +++ b/.kokoro/release/stage.sh @@ -22,11 +22,9 @@ pushd $(dirname "$0")/../../ setup_environment_secrets create_settings_xml_file "settings.xml" -# Install the appengine-api -mvn dependency:get -Dartifact=com.google.appengine:appengine-api-1.0-sdk:1.9.65 - mvn clean install deploy \ --settings settings.xml \ + -DskipTests=true \ -DperformRelease=true \ -Dgpg.executable=gpg \ -Dgpg.passphrase=${GPG_PASSPHRASE} \ From 67cb277f7d44d006de71c555d197bb7ac8093c7c Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Thu, 27 Sep 2018 10:35:49 -0700 Subject: [PATCH 5/7] Install play services --- .kokoro/release/stage.sh | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.kokoro/release/stage.sh b/.kokoro/release/stage.sh index f4d2b86d5..3c09ab49a 100755 --- a/.kokoro/release/stage.sh +++ b/.kokoro/release/stage.sh @@ -22,9 +22,24 @@ pushd $(dirname "$0")/../../ setup_environment_secrets create_settings_xml_file "settings.xml" +# Install play services +wget https://dl.google.com/dl/android/maven2/com/google/android/gms/play-services-basement/8.3.0/play-services-basement-8.3.0.aar +unzip play-services-basement-8.3.0.aar +mvn install:install-file \ + -Dfile=classes.jar \ + -DgroupId=com.google.android.google-play-services \ + -DartifactId=google-play-services \ + -Dversion=1 \ + -Dpackaging=jar + +# Install the android SDK +mvn dependency:get -Dartifact=com.google.android:android:4.1.1.4 + +# Install the appengine SDK +mvn dependency:get -Dartifact=com.google.appengine:appengine-api-1.0-sdk:1.9.65 + mvn clean install deploy \ --settings settings.xml \ - -DskipTests=true \ -DperformRelease=true \ -Dgpg.executable=gpg \ -Dgpg.passphrase=${GPG_PASSPHRASE} \ From fe33442097e98c3851878f0d6980e8c11fdb3816 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Thu, 27 Sep 2018 11:41:33 -0700 Subject: [PATCH 6/7] Install play services only if not installed --- .kokoro/release/stage.sh | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.kokoro/release/stage.sh b/.kokoro/release/stage.sh index 3c09ab49a..8c4bfe5dd 100755 --- a/.kokoro/release/stage.sh +++ b/.kokoro/release/stage.sh @@ -22,22 +22,23 @@ pushd $(dirname "$0")/../../ setup_environment_secrets create_settings_xml_file "settings.xml" -# Install play services -wget https://dl.google.com/dl/android/maven2/com/google/android/gms/play-services-basement/8.3.0/play-services-basement-8.3.0.aar -unzip play-services-basement-8.3.0.aar -mvn install:install-file \ - -Dfile=classes.jar \ - -DgroupId=com.google.android.google-play-services \ - -DartifactId=google-play-services \ - -Dversion=1 \ - -Dpackaging=jar - # Install the android SDK mvn dependency:get -Dartifact=com.google.android:android:4.1.1.4 # Install the appengine SDK mvn dependency:get -Dartifact=com.google.appengine:appengine-api-1.0-sdk:1.9.65 +# Install play services +mvn dependency:get -Dartifact=com.google.android.google-play-services:google-play-services:1 -o -DremoteRepositories=file:~/.m2 || \ + (wget https://dl.google.com/dl/android/maven2/com/google/android/gms/play-services-basement/8.3.0/play-services-basement-8.3.0.aar && \ + unzip play-services-basement-8.3.0.aar && \ + mvn install:install-file \ + -Dfile=classes.jar \ + -DgroupId=com.google.android.google-play-services \ + -DartifactId=google-play-services \ + -Dversion=1 \ + -Dpackaging=jar) + mvn clean install deploy \ --settings settings.xml \ -DperformRelease=true \ From 2589d3d94354cb0d1c74dd59914e002a5cbba53c Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Thu, 27 Sep 2018 11:44:26 -0700 Subject: [PATCH 7/7] Install other dependencies --- .kokoro/install_dependencies.sh | 33 +++++++++++++++++++++++++++++++++ .kokoro/release/stage.sh | 18 +----------------- 2 files changed, 34 insertions(+), 17 deletions(-) create mode 100755 .kokoro/install_dependencies.sh diff --git a/.kokoro/install_dependencies.sh b/.kokoro/install_dependencies.sh new file mode 100755 index 000000000..a0439dd7d --- /dev/null +++ b/.kokoro/install_dependencies.sh @@ -0,0 +1,33 @@ +#!/bin/bash +# Copyright 2018 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +# Install the android SDK +mvn dependency:get -Dartifact=com.google.android:android:4.1.1.4 + +# Install the appengine SDK +mvn dependency:get -Dartifact=com.google.appengine:appengine-api-1.0-sdk:1.9.65 + +# Install play services +mvn dependency:get -Dartifact=com.google.android.google-play-services:google-play-services:1 -o -DremoteRepositories=file:~/.m2 || \ + (wget https://dl.google.com/dl/android/maven2/com/google/android/gms/play-services-basement/8.3.0/play-services-basement-8.3.0.aar && \ + unzip play-services-basement-8.3.0.aar && \ + mvn install:install-file \ + -Dfile=classes.jar \ + -DgroupId=com.google.android.google-play-services \ + -DartifactId=google-play-services \ + -Dversion=1 \ + -Dpackaging=jar) diff --git a/.kokoro/release/stage.sh b/.kokoro/release/stage.sh index 8c4bfe5dd..118c44ccd 100755 --- a/.kokoro/release/stage.sh +++ b/.kokoro/release/stage.sh @@ -16,29 +16,13 @@ set -eo pipefail source $(dirname "$0")/common.sh +source $(dirname "$0")/../install_dependencies.sh pushd $(dirname "$0")/../../ setup_environment_secrets create_settings_xml_file "settings.xml" -# Install the android SDK -mvn dependency:get -Dartifact=com.google.android:android:4.1.1.4 - -# Install the appengine SDK -mvn dependency:get -Dartifact=com.google.appengine:appengine-api-1.0-sdk:1.9.65 - -# Install play services -mvn dependency:get -Dartifact=com.google.android.google-play-services:google-play-services:1 -o -DremoteRepositories=file:~/.m2 || \ - (wget https://dl.google.com/dl/android/maven2/com/google/android/gms/play-services-basement/8.3.0/play-services-basement-8.3.0.aar && \ - unzip play-services-basement-8.3.0.aar && \ - mvn install:install-file \ - -Dfile=classes.jar \ - -DgroupId=com.google.android.google-play-services \ - -DartifactId=google-play-services \ - -Dversion=1 \ - -Dpackaging=jar) - mvn clean install deploy \ --settings settings.xml \ -DperformRelease=true \