From 0a938932ce8052d28aa605acf809eeb402cc67f7 Mon Sep 17 00:00:00 2001 From: "K. Shankari" Date: Mon, 25 Mar 2019 15:33:36 -0700 Subject: [PATCH 1/3] Bump up version numbers to prepare for the new release --- config.cordovabuild.xml | 2 +- package.cordovabuild.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config.cordovabuild.xml b/config.cordovabuild.xml index 7ea02ca4a..0196330b5 100644 --- a/config.cordovabuild.xml +++ b/config.cordovabuild.xml @@ -1,5 +1,5 @@ - + emission A commute pattern tracker and carbon footprint estimator. diff --git a/package.cordovabuild.json b/package.cordovabuild.json index 651587d62..7fd670e15 100644 --- a/package.cordovabuild.json +++ b/package.cordovabuild.json @@ -1,6 +1,6 @@ { "name": "edu.berkeley.eecs.emission", - "version": "2.5.0", + "version": "2.8.0", "displayName": "emission", "scripts": { "setup-serve": "./bin/download_settings_controls.js", From 546272b6e076ba106f80401e9932ec27f5579caa Mon Sep 17 00:00:00 2001 From: "K. Shankari" Date: Mon, 25 Mar 2019 15:38:31 -0700 Subject: [PATCH 2/3] Porting the download error fix to the main e-mission app Original change is https://github.com/e-mission/e-mission-base/pull/16/commits/289149bb419dd10f084bac2c80cc1eb41e0abfca --- www/js/splash/updatecheck.js | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/www/js/splash/updatecheck.js b/www/js/splash/updatecheck.js index 5d852c761..44f996752 100644 --- a/www/js/splash/updatecheck.js +++ b/www/js/splash/updatecheck.js @@ -153,7 +153,21 @@ angular.module('emission.splash.updatecheck', ['emission.plugin.logger', reloadAlert.then(function(res) { uc.redirectPromise(); }); - }); + }).catch(function(err) { + $rootScope.isDownloading = false; + extractPop.close(); + $ionicPopup.alert({ + title: "Extraction error", + message: JSON.stringify(err) + }); + }) + }).catch(function(err) { + $rootScope.isDownloading = false; + downloadPop.close(); + $ionicPopup.alert({ + title: "Download error", + message: JSON.stringify(err) + }); }); }; @@ -198,6 +212,7 @@ angular.module('emission.splash.updatecheck', ['emission.plugin.logger', }) }) }).catch(function(err) { + $rootScope.isDownloading = false; Logger.log('Ionic Deploy: Unable to check for updates'+err); console.error('Ionic Deploy: Unable to check for updates',err) }) From 01732bcb55cf7cd913bebcdbc6fe883e366870bb Mon Sep 17 00:00:00 2001 From: "K. Shankari" Date: Mon, 25 Mar 2019 16:29:11 -0700 Subject: [PATCH 3/3] Add the grade_workaround used by the crosswalk plugin This has always been used; we now finally check it in! --- bin/gradle_workaround.py | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 bin/gradle_workaround.py diff --git a/bin/gradle_workaround.py b/bin/gradle_workaround.py new file mode 100644 index 000000000..cbe3c525a --- /dev/null +++ b/bin/gradle_workaround.py @@ -0,0 +1,39 @@ +import fileinput +import argparse +import logging + +BUILD_GRADLE = "platforms/android/build.gradle" +# BUILD_GRADLE = "/tmp/build.gradle" +LINE_BEFORE = "// PLUGIN GRADLE EXTENSIONS END" +OUR_ADD_REMOVE_LINE = 'apply from: "cordova-plugin-crosswalk-webview/xwalk6-workaround.gradle"' + +def add_gradle_line(): + for line in fileinput.input(BUILD_GRADLE, inplace=True): + line = line.strip("\n") + print(line) + if line == LINE_BEFORE: + print(OUR_ADD_REMOVE_LINE) + +def remove_gradle_line(): + for line in fileinput.input(BUILD_GRADLE, inplace=True): + line = line.strip("\n") + if line == OUR_ADD_REMOVE_LINE: + pass + else: + print(line) + +if __name__ == '__main__': + parser = argparse.ArgumentParser() + group = parser.add_mutually_exclusive_group(required=True) + + group.add_argument("-a", "--add", action="store_true", + help="add the xwalk line to build.gradle") + group.add_argument("-r", "--remove", action="store_true", + help="remove the xwalk line from build.gradle") + + args = parser.parse_args() + + if args.add: + add_gradle_line() + if args.remove: + remove_gradle_line()