[BaseTasks] add ABI detection for RIDs #121
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes: dotnet/android#5432
Two cases currently do not work in .NET 6:
An Android app project includes files such as:
android-arm/libfoo.so
android-arm64/libfoo.so
android-x86/libfoo.so
android-x64/libfoo.so
It would be nice if users could use
$(RuntimeIdentifier)nameshere. We can simply check if the directory name is a RID.
A NuGet package includes a native library from a path such as:
packages/sqlitepclraw.lib.e_sqlite3.android/1.1.11/runtimes/android-arm64/native/libe_sqlite3.so
In this case, there is no
%(RuntimeIdentifier)item metadata on thisnative library. So we will have to check if the following is a RID:
I implemented these two cases as last resort to the existing logic.
I think this will be fine for the behavior to be in "legacy"
Xamarin.Android as well as .NET 6.
I added tests for
AndroidRidAbiHelper, since we had none before.