When building Xamarin.Android project with:
keystore_path
keystore_alias
keystore_password
provided, "SignAndroidPackage" target added automatically, which causing VisualStudio to build app, than sign with default Xamarin keystore, then "apksign_and_zipalign" sign it again.
This fix checking:
if keystore details are provided -> it will replace "SignAndroidPackage" with "Package" to generate apk, then "apksign_and_zipalign" sign apk with desired credentials.
if keystore details are NOT provided: "SignAndroidPackage" with be used to sign apk with Xamarin default credentials and "NO" "apksign_and_zipalign" will be called.
When building Xamarin.Android project with: keystore_path keystore_alias keystore_password
provided, "SignAndroidPackage" target added automatically, which causing VisualStudio to build app, than sign with default Xamarin keystore, then "apksign_and_zipalign" sign it again.
This fix checking: if keystore details are provided -> it will replace "SignAndroidPackage" with "Package" to generate apk, then "apksign_and_zipalign" sign apk with desired credentials.
if keystore details are NOT provided: "SignAndroidPackage" with be used to sign apk with Xamarin default credentials and "NO" "apksign_and_zipalign" will be called.
NOTE: sorry for chaining PRs