|
1 | | -<Project> |
| 1 | +<Project> |
2 | 2 | <PropertyGroup> |
3 | 3 | <SupportedOSPlatformVersion>33.0</SupportedOSPlatformVersion> |
4 | 4 | <RuntimeIdentifiers>android-x86;android-arm;android-arm64</RuntimeIdentifiers> |
|
13 | 13 | the patch in some build orderings. This suppression is harmless since we do fix them. --> |
14 | 14 | <AndroidPageSize16KBCompatibilityCheck>false</AndroidPageSize16KBCompatibilityCheck> |
15 | 15 | </PropertyGroup> |
| 16 | + |
16 | 17 | <!-- Patch NuGet-provided .so files that ship with 4 KB ELF alignment to 16 KB. |
17 | 18 | See build/PatchElfPageSize.targets for details. |
18 | 19 | TODO: Remove once ppy.Veldrid.SPIRV ships 16 KB-aligned native libraries. --> |
19 | 20 | <Import Project="$(MSBuildThisFileDirectory)build\PatchElfPageSize.targets" /> |
| 21 | + |
20 | 22 | <!-- Release-only optimisations: AOT for low-latency gameplay, trimming for smaller APK. |
21 | 23 | Suppress trim analysis warnings because the project uses reflection extensively |
22 | 24 | (Newtonsoft.Json, Realm, AutoMapper, RuntimeBinder). --> |
|
29 | 31 | <AndroidLinkMode>None</AndroidLinkMode> |
30 | 32 | <AndroidEnableResourceShrinking>false</AndroidEnableResourceShrinking> |
31 | 33 | </PropertyGroup> |
| 34 | + |
| 35 | + <ItemGroup Condition="'$(Configuration)' == 'Release'"> |
| 36 | + <TrimmerRootAssembly Include="Microsoft.CSharp" /> |
| 37 | + </ItemGroup> |
| 38 | + |
32 | 39 | <ItemGroup> |
33 | 40 | <!-- IMPORTANT: ppy.osu.Framework.Android v2026.318.0 only ships net8.0-android34.0 assets. |
34 | 41 | NuGet silently falls back to those assets when the app targets net10.0-android (API 36). |
|
37 | 44 | TODO: Remove this comment once ppy.osu.Framework.Android ships net10.0-android assets. --> |
38 | 45 | <PackageReference Include="ppy.osu.Framework.Android" Version="2026.318.0" /> |
39 | 46 | </ItemGroup> |
| 47 | + |
40 | 48 | <PropertyGroup> |
41 | 49 | <!-- Fody does not handle Android build well, and warns when unchanged. |
42 | 50 | Since Realm objects are not declared directly in Android projects, simply disable Fody. --> |
43 | 51 | <DisableFody>true</DisableFody> |
44 | 52 | </PropertyGroup> |
45 | 53 |
|
46 | | - <!-- Fix for .NET 10 Android AOT misclassifying non-managed assets in runtime pack. |
| 54 | + <!-- Fix for .NET 10 Android AOT misclassifying non-managed assets in runtime pack. |
47 | 55 | This is critical for Android 16 (API 36) which has stricter manifest/parsing rules. --> |
48 | 56 | <Target Name="FixRuntimePackAssetTypes" AfterTargets="ResolveRuntimePackAssets;ComputeFilesToPublish"> |
49 | 57 | <ItemGroup> |
|
0 commit comments