fix errors in test build introduced by renaming the package in AndroidManifest.xml

instead, we can customise the build task to add a manifestpackage parameter to aapt
this will ONLY rename the package according to android package uniqueness - not any other instances (such as the name of the R resource class, relative class names in the manifest file, etc)
see http://stackoverflow.com/a/11084817 and http://www.piwai.info/renaming-android-manifest-package/ for details

(we still have a hacky mobile-test-setup/revert - but only to rename the title string now)
This commit is contained in:
Jon Atkins
2013-08-30 03:50:02 +01:00
parent de3d05fe95
commit 004a34bd29
3 changed files with 42 additions and 8 deletions

View File

@ -2,14 +2,11 @@
# quick-n-dirty script to rename the mobile build for tests
# rename the package, so it can be installed alongside the regular build
test -f mobile/AndroidManifest.xml~ || cp mobile/AndroidManifest.xml mobile/AndroidManifest.xml~
sed -e 's/package="com.cradle.iitc_mobile"/package="com.cradle.iitc_mobile.test"/' mobile/AndroidManifest.xml~ > mobile/AndroidManifest.xml
# rename the app title
test -f mobile/res/values/strings.xml~ || cp mobile/res/values/strings.xml mobile/res/values/strings.xml~
sed -e 's/IITC Mobile/IITCm Test/' mobile/res/values/strings.xml~ > mobile/res/values/strings.xml
# also, you'll need to build with
# ant -Doverride.package.name=com.cradle.iitc_mobile.test ...
# or similar