diff --git a/.travis.yml b/.travis.yml index 16d1e88c1d0721d453d63724869d87d2e8089eb4..51dd2672dfaa13223d7182b23adcf667b92b8465 100644 --- a/.travis.yml +++ b/.travis.yml @@ -124,8 +124,7 @@ script: after_success: - if [[ "${TRAVIS_OS_NAME}" = "android" && "${TRAVIS_PULL_REQUEST}" = "false" && "${TRAVIS_BRANCH}" = "master" ]]; then - pip install --user oauth2client==1.5.2 - && pip install --user google-api-python-client PyOpenSSL + pip install --user google-api-python-client PyOpenSSL && cd ${SHADOW_BUILD_DIR} && openssl aes-256-cbc -K $encrypted_25db6eb7c3fd_key -iv $encrypted_25db6eb7c3fd_iv -in ${TRAVIS_BUILD_DIR}/Google_Play_Android_Developer-bb93ae7d61ca.p12.enc -out Google_Play_Android_Developer-bb93ae7d61ca.p12 -d && ${TRAVIS_BUILD_DIR}/tools/google_play_upload.py org.mavlink.qgroundcontrol ${SHADOW_BUILD_DIR}/release/package/qgroundcontrol.apk ; diff --git a/tools/google_play_upload.py b/tools/google_play_upload.py index 8017c9d5876283c0f1da2a465083c43062239554..094e40cfb25dfbff04b348dea41b8ddcf6fe94ec 100755 --- a/tools/google_play_upload.py +++ b/tools/google_play_upload.py @@ -21,6 +21,7 @@ import argparse from apiclient.discovery import build import httplib2 from oauth2client import client +from oauth2client.service_account import ServiceAccountCredentials TRACK = 'beta' # Can be 'alpha', beta', 'production' or 'rollout' SERVICE_ACCOUNT_EMAIL = ( @@ -47,10 +48,7 @@ def main(): # with the Credentials. Note that the first parameter, service_account_name, # is the Email address created for the Service account. It must be the email # address associated with the key that was created. - credentials = client.SignedJwtAssertionCredentials( - SERVICE_ACCOUNT_EMAIL, - key, - scope='https://www.googleapis.com/auth/androidpublisher') + credentials = ServiceAccountCredentials.from_p12_keyfile(SERVICE_ACCOUNT_EMAIL, key, scopes=['https://www.googleapis.com/auth/androidpublisher']) http = httplib2.Http() http = credentials.authorize(http)