Skip to content

Commit

Permalink
A tiny optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
grendello committed Oct 1, 2024
1 parent 365bb02 commit a8e267c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Xamarin.Android.Build.Tasks/Tasks/BuildApk.cs
Original file line number Diff line number Diff line change
Expand Up @@ -364,11 +364,13 @@ public override bool RunTask ()
ExecuteWithAbi (dsoWrapperConfig, SupportedAbis, ApkInputPath, ApkOutputPath, debug, compress, compressedAssembliesInfo, assemblyStoreApkName: null);
outputFiles.Add (ApkOutputPath);
if (CreatePackagePerAbi && SupportedAbis.Length > 1) {
var abiArray = new string[] { String.Empty };
foreach (var abi in SupportedAbis) {
existingEntries.Clear ();
var path = Path.GetDirectoryName (ApkOutputPath);
var apk = Path.GetFileNameWithoutExtension (ApkOutputPath);
ExecuteWithAbi (dsoWrapperConfig, new [] { abi }, String.Format ("{0}-{1}", ApkInputPath, abi),
abiArray[0] = abi;
ExecuteWithAbi (dsoWrapperConfig, abiArray, String.Format ("{0}-{1}", ApkInputPath, abi),
Path.Combine (path, String.Format ("{0}-{1}.apk", apk, abi)),
debug, compress, compressedAssembliesInfo, assemblyStoreApkName: abi);
outputFiles.Add (Path.Combine (path, String.Format ("{0}-{1}.apk", apk, abi)));
Expand Down

0 comments on commit a8e267c

Please sign in to comment.