#!/bin/bash

PACKAGE="$1"

echo "Setting the application android package to $PACKAGE"

sed -i "s/package=\"[^\"]\+\"/package=\"$PACKAGE\"/" android/app/src/debug/AndroidManifest.xml
sed -i "s/package=\"[^\"]\+\"/package=\"$PACKAGE\"/" android/app/src/main/AndroidManifest.xml
sed -i "s/package=\"[^\"]\+\"/package=\"$PACKAGE\"/" android/app/src/profile/AndroidManifest.xml

sed -i "s/applicationId \"[^\"]\+\"/applicationId \"$PACKAGE\"/" android/app/build.gradle

sed -i "s/package .*/package $PACKAGE/" android/app/src/main/kotlin/com/charlyghislain/embedded_webview/MainActivity.kt

