Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reapply "[native] Real shared libraries in APK /lib directories (#9154)" #9348

Merged
merged 3 commits into from
Sep 30, 2024

Commits on Sep 30, 2024

  1. Configuration menu
    Copy the full SHA
    328f681 View commit details
    Browse the repository at this point in the history
  2. Localized file check-in by OneLocBuild Task (#9342)

    Context: https://aka.ms/onelocbuild
    Context: https://aka.ms/AllAboutLoc
    
    Build definition ID 17928: Build ID 10293307
    vs-mobiletools-engineering-service2 authored and jonathanpeppers committed Sep 30, 2024
    Configuration menu
    Copy the full SHA
    dc00a0c View commit details
    Browse the repository at this point in the history
  3. [Xamarin.Android.Build.Tasks] use ProjectSpecificTaskObjectKey in `…

    …<PrepareDSOWrapperState/>` (#9340)
    
    Context: dotnet/maui#24539 (comment)
    
    In .NET MAUI's build, they failed to bump .NET for Android because of
    the following error:
    
        dotnet\packs\Microsoft.Android.Sdk.Windows\35.0.0-rc.2.130\tools\Xamarin.Android.Common.Debugging.targets(139,2): error XABLD7009: System.InvalidOperationException: Internal error: archive DSO stub location not known for architecture 'X86'
        at Xamarin.Android.Tasks.DSOWrapperGenerator.WrapIt(AndroidTargetArch targetArch, String payloadFilePath, String outputFileName, IBuildEngine4 buildEngine, TaskLoggingHelper log) in /Users/runner/work/1/s/xamarin-android/src/Xamarin.Android.Build.Tasks/Utilities/DSOWrapperGenerator.cs:line 86
        at Xamarin.Android.Tasks.BuildApk.AddRuntimeConfigBlob(ZipArchiveEx apk) in /Users/runner/work/1/s/xamarin-android/src/Xamarin.Android.Build.Tasks/Tasks/BuildApk.cs:line 404
        at Xamarin.Android.Tasks.BuildApk.ExecuteWithAbi(String[] supportedAbis, String apkInputPath, String apkOutputPath, Boolean debug, Boolean compress, IDictionary`2 compressedAssembliesInfo, String assemblyStoreApkName) in /Users/runner/work/1/s/xamarin-android/src/Xamarin.Android.Build.Tasks/Tasks/BuildApk.cs:line 215
        at Xamarin.Android.Tasks.BuildApk.RunTask() in /Users/runner/work/1/s/xamarin-android/src/Xamarin.Android.Build.Tasks/Tasks/BuildApk.cs:line 357
        at Microsoft.Android.Build.Tasks.AndroidTask.Execute() in /Users/runner/work/1/s/xamarin-android/external/xamarin-android-tools/src/Microsoft.Android.Build.BaseTasks/AndroidTask.cs:line 25
    
    In 5ebcb1d, we introduced some MSBuild `RegisterTaskObject()` usage
    that failed in specific way:
    
    * MAUI has a `.sln` with multiple "app" projects: device tests,
      samples, etc. building in parallel
    
    * The `<PrepareDSOWrapperState/>` MSBuild task runs for project A,
      saving x64 and arm64 values.
    
    * Project B goes to run `<BuildApk/>` but x86 is missing.
    
    For now, we can fix this by using `ProjectSpecificTaskObjectKey()` that
    wraps the key with a `Tuple` such as:
    
        (key, WorkingDirectory)
    
    Which, should result in a unique key per project.
    
    In a future PR, we could consider removing this `RegisterTaskObject()`
    usage completely, and doing all the work inside the `<BuildApk/>`
    MSBuild task instead.
    jonathanpeppers committed Sep 30, 2024
    Configuration menu
    Copy the full SHA
    65a4c8b View commit details
    Browse the repository at this point in the history