From f5ebee89dae4c32bc0bc1a7f93f099892a0ca9ba Mon Sep 17 00:00:00 2001 From: Eric House Date: Wed, 18 Jan 2017 19:56:03 -0800 Subject: [PATCH] fix duplicate permissions Merging of AndroidManifest.xml files meant the dbg flavor was getting its C2D_MESSAGE permission and the main flavor's, which on recent OS versions meant it couldn't be installed. Use substitution from gradle to fix. --- .projectile | 4 +--- .../android/app/src/main/AndroidManifest.xml | 6 +++--- .../app/src/xw4dbg/AndroidManifest.xml | 6 +++--- xwords4/android/scripts/arelease-clone.sh | 20 ++++--------------- 4 files changed, 11 insertions(+), 25 deletions(-) diff --git a/.projectile b/.projectile index acf1e3e9a..e639096cc 100644 --- a/.projectile +++ b/.projectile @@ -1,6 +1,4 @@ -TAGS --/xwords4/android/XWords4-dbg +-/xwords4/android/app/build -/xwords4/linux/discon_ok2.sh_logs --/xwords4/android/XWords4/res_src/values-pt/strings.xml --/xwords4/android/XWords4/res_src/values-ba_CK/strings.xml -/xwords4/relay/xwrelay.log diff --git a/xwords4/android/app/src/main/AndroidManifest.xml b/xwords4/android/app/src/main/AndroidManifest.xml index 1dca39900..5f67e9bde 100644 --- a/xwords4/android/app/src/main/AndroidManifest.xml +++ b/xwords4/android/app/src/main/AndroidManifest.xml @@ -44,9 +44,9 @@ - - + @@ -235,7 +235,7 @@ - + diff --git a/xwords4/android/app/src/xw4dbg/AndroidManifest.xml b/xwords4/android/app/src/xw4dbg/AndroidManifest.xml index 4f4b88fe9..1a705ea34 100644 --- a/xwords4/android/app/src/xw4dbg/AndroidManifest.xml +++ b/xwords4/android/app/src/xw4dbg/AndroidManifest.xml @@ -44,9 +44,9 @@ - - + @@ -239,7 +239,7 @@ - + diff --git a/xwords4/android/scripts/arelease-clone.sh b/xwords4/android/scripts/arelease-clone.sh index b083ce208..e8c69cd63 100755 --- a/xwords4/android/scripts/arelease-clone.sh +++ b/xwords4/android/scripts/arelease-clone.sh @@ -3,18 +3,13 @@ set -e -u usage () { - echo "usage: $(basename $0) [--tag tagname | --branch branchname] [--variant variant]" + echo "usage: $(basename $0) [--tag tagname | --branch branchname] " echo " # (uses current branch as default)" exit 1 } TAG="" BRANCH="" -VARIANT="XWords4" - -if [ -f ./AndroidManifest.xml ]; then # we're in the right directory - VARIANT=$(basename $(pwd)) -fi while [ 0 -lt $# ] ; do case $1 in @@ -26,10 +21,6 @@ while [ 0 -lt $# ] ; do BRANCH=$2 shift ;; - --variant) - VARIANT=$2 - shift - ;; *) usage ;; @@ -37,8 +28,6 @@ while [ 0 -lt $# ] ; do shift done -echo "VARIANT=$VARIANT" - if [ -n "$TAG" ]; then if ! git tag | grep -w "$TAG"; then echo "tag $TAG not found" @@ -48,7 +37,7 @@ elif [ -z $BRANCH ]; then BRANCH=$(git branch | grep '^*' | sed 's,^.* ,,') fi -echo "building $VARIANT with ${TAG}${BRANCH}" +echo "building with ${TAG}${BRANCH}" BUILDIR=/tmp/$(basename $0)_build_$$ OUT_FILE=$BUILDIR/apks.txt @@ -61,9 +50,8 @@ cd $BUILDIR git clone $SRCDIR BUILD cd BUILD git checkout ${TAG}${BRANCH} -cd ./xwords4/android/${VARIANT} -../scripts/setup_local_props.sh -../scripts/arelease.sh --variant ${VARIANT} --apk-list $OUT_FILE +cd ./xwords4/android/ +./scripts/arelease.sh --apk-list $OUT_FILE mkdir -p /tmp/releases_${VARIANT} cp *.apk /tmp/releases_${VARIANT}