summaryrefslogtreecommitdiffhomepage
path: root/android/scripts
diff options
context:
space:
mode:
authorAlbin <albin@mullvad.net>2023-07-27 13:56:12 +0200
committerAlbin <albin@mullvad.net>2023-07-27 13:56:12 +0200
commit7a1c9dba446651f06b00c80178407b34120cede9 (patch)
tree72328e2b0966106e46583ff2b2a539f3b8cf27db /android/scripts
parent6d57800a24833e53c5cc161d9afb4dffe4381365 (diff)
parentea51297f2a3bbac44351147df78ae4f3ff2bc6e8 (diff)
downloadmullvadvpn-7a1c9dba446651f06b00c80178407b34120cede9.tar.xz
mullvadvpn-7a1c9dba446651f06b00c80178407b34120cede9.zip
Merge branch 'move-tile-service-to-its-own-module-droid-225'
Diffstat (limited to 'android/scripts')
-rwxr-xr-xandroid/scripts/generate-pngs.sh8
-rwxr-xr-xandroid/scripts/tidy.sh14
2 files changed, 11 insertions, 11 deletions
diff --git a/android/scripts/generate-pngs.sh b/android/scripts/generate-pngs.sh
index a3d90976c9..6aa4aa380e 100755
--- a/android/scripts/generate-pngs.sh
+++ b/android/scripts/generate-pngs.sh
@@ -27,15 +27,15 @@ BLACK_MONO_ICON_PATH="../../graphics/icon-shaved.svg"
#
# Examples:
#
-# The following will generate a 50 by 50 image in android/app/src/main/res/drawable-hdpi/my_image.png
+# The following will generate a 50 by 50 image in android/lib/resource/src/main/res/drawable-hdpi/my_image.png
#
# convert_image /tmp/my-image.svg hdpi-50
#
-# The following will generate a 50 by 50 image in android/app/src/main/res/drawable-mdpi/other_image.png
+# The following will generate a 50 by 50 image in android/lib/resource/src/main/res/drawable-mdpi/other_image.png
#
# convert_image /tmp/my-other-image.svg mdpi-50 other_image
#
-# The following will generate a 50 by 50 image in android/app/src/main/res/mipmap-xxhdpi/my_icon.png
+# The following will generate a 50 by 50 image in android/lib/resource/src/main/res/mipmap-xxhdpi/my_icon.png
#
# convert_image /tmp/my-final-image.svg xxhdpi-50 my_icon mipmap
function convert_image() {
@@ -62,7 +62,7 @@ function convert_image() {
local dpi="$(echo "$dpi_config" | cut -f1 -d'-')"
local size="$(echo "$dpi_config" | cut -f2 -d'-')"
- local dpi_dir="../app/src/main/res/${destination_dir}-${dpi}"
+ local dpi_dir="../lib/resource/src/main/res/${destination_dir}-${dpi}"
echo "$source_image -> ($size x $size) ${dpi_dir}/${destination_image}.png"
mkdir -p "$dpi_dir"
diff --git a/android/scripts/tidy.sh b/android/scripts/tidy.sh
index a31be34233..0372febcda 100755
--- a/android/scripts/tidy.sh
+++ b/android/scripts/tidy.sh
@@ -33,10 +33,10 @@ function format {
--indent-attributes yes \
--indent-spaces 4 \
--literal-attributes yes \
- ../app/src/main/AndroidManifest.xml \
- ../app/src/main/res/anim*/*.xml \
- ../app/src/main/res/drawable*/*.xml \
- ../app/src/main/res/layout*/*.xml \
+ ../**/src/main/AndroidManifest.xml \
+ ../lib/resource/src/main/res/anim*/*.xml \
+ ../lib/resource/src/main/res/drawable*/*.xml \
+ ../app/src/main/res/layout*/*.xml
tidy -xml \
-m \
@@ -47,14 +47,14 @@ function format {
--indent-spaces 4 \
--literal-attributes yes \
--indent-cdata yes \
- ../app/src/main/res/values/*.xml
+ ../lib/resource/src/main/res/values/*.xml
# FIXME - when tidy learns to not leave whitespace around, remove the line below - https://github.com/htacg/tidy-html5/issues/864
- find ../app/src/main/ -name '*.xml' -exec sed -i -e 's/[ \t]*$//' '{}' ';'
+ find .. -name '*.xml' -exec sed -i -e 's/[ \t]*$//' '{}' ';'
}
function checkDiff {
- if git diff --exit-code -- ../app/src/main/AndroidManifest.xml ../app/src/main/res; then
+ if git diff --exit-code -- ../**/AndroidManifest.xml ../**/src/main/res; then
echo "Android XML files are correctly formatted"
return 0
else