Commit 1bdcf9f
authored
[Xamarin.Android.Build.Tasks] Fix Android Version Code for Release builds (#7795)
* [Xamarin.Android.Build.Tasks] Fix Android Version Code for Release builds
Fixes dotnet/maui#11139
Users trying to use `maui` and the new `ApplicationVersion` in
conjunction with `AndroidCreatePackagePerAbi` find that the version
is NOT used in the final set of apks.
This is because when we use `AndroidCreatePackagePerAbi` we are totally
ignoring the `ApplicationVersion` number. Instead we pick up the one
from the `AndroidManifest.xml` `android:versionCode`. For maui users This
is not obvious and is counter intuitive.
So lets use the `ApplicationVersion` when using `AndroidCreatePackagePerAbi`.
All the old code will remain in place, if the `ApplicationVersion` is
not set we will still fall back to `android:versionCode` and if that is
not set default to `1`.1 parent 9113e2b commit 1bdcf9f
File tree
2 files changed
+41
-1
lines changed- src/Xamarin.Android.Build.Tasks
- Tests/Xamarin.Android.Build.Tests
2 files changed
+41
-1
lines changedLines changed: 40 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
522 | 522 | | |
523 | 523 | | |
524 | 524 | | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
525 | 565 | | |
526 | 566 | | |
527 | 567 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
599 | 599 | | |
600 | 600 | | |
601 | 601 | | |
602 | | - | |
| 602 | + | |
603 | 603 | | |
604 | 604 | | |
605 | 605 | | |
| |||
0 commit comments