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:
@ -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
|
||||
|
Reference in New Issue
Block a user