Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ jobs:
-p:AndroidSigningKeyAlias="$ANDROID_KEY_ALIAS"
-p:AndroidSigningKeyPass="$ANDROID_KEY_PASS"
-p:AndroidSigningStorePass="$ANDROID_STORE_PASS"
-p:CustomBeforeMicrosoftCommonTargets="${{ github.workspace }}/build/SuppressSubmoduleWarnings.targets"

- name: Build Android APK (unsigned Release)
if: steps.keystore.outputs.has_keystore != 'true'
Expand All @@ -119,6 +120,7 @@ jobs:
-p:Version="${{ steps.version.outputs.version }}"
-p:ApplicationDisplayVersion="${{ steps.version.outputs.version }}"
-p:ApplicationVersion="${{ github.run_number }}"
-p:CustomBeforeMicrosoftCommonTargets="${{ github.workspace }}/build/SuppressSubmoduleWarnings.targets"

- name: Find APK
id: find_apk
Expand Down
8 changes: 8 additions & 0 deletions build/SuppressSubmoduleWarnings.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<Project>
<!-- Suppress CS1591 (missing XML doc comments) for submodule projects that enable
documentation generation but don't suppress the warning in Release builds.
This file is imported via CustomBeforeMicrosoftCommonTargets in the release workflow. -->
<PropertyGroup Condition="$(MSBuildProjectFullPath.Contains('submodules'))">

Copilot AI Apr 19, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The MSBuild Condition syntax here is invalid: $(MSBuildProjectFullPath.Contains('submodules')) is treated as a property reference and will expand to empty, which can make the Condition fail evaluation (or not match) and break/disable the suppression. Use a proper string-method condition expression instead (e.g., apply .Contains() on a quoted string containing $(MSBuildProjectFullPath)), so the NoWarn property group reliably applies only to submodule projects.

Suggested change
<PropertyGroup Condition="$(MSBuildProjectFullPath.Contains('submodules'))">
<PropertyGroup Condition="'$(MSBuildProjectFullPath)'.Contains('submodules')">

Copilot uses AI. Check for mistakes.
<NoWarn>$(NoWarn);CS1591</NoWarn>
</PropertyGroup>
</Project>
12 changes: 8 additions & 4 deletions osu.Android.props
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
AndroidPageSize16KBCompatibilityCheck=false should suppress the check, but Android SDK
36.1.53 still emits XA0141 in some build orderings, so we also add it to NoWarn. -->
<AndroidPageSize16KBCompatibilityCheck>false</AndroidPageSize16KBCompatibilityCheck>
<NoWarn>$(NoWarn);XA0141</NoWarn>
<NoWarn>$(NoWarn);XA0141;NU1608;XA4301</NoWarn>
<!-- Disable ELF alignment patching for ALL configurations.
The custom PatchElfPageSize task can run concurrently with the Android packaging step
because MSBuild's BeforeTargets="Build" fires for every ABI sub-build, which often
Expand Down Expand Up @@ -53,9 +53,13 @@
<SuppressTrimAnalysisWarnings>true</SuppressTrimAnalysisWarnings>
<PublishTrimmed>true</PublishTrimmed>
<TrimMode>partial</TrimMode>
<!-- Strip IL bodies from AOT-compiled assemblies. The runtime uses the native .so code
instead, and IL is only kept for non-AOT methods. This can save 20-30 MB. -->
<AndroidStripILAfterAOT>true</AndroidStripILAfterAOT>
<!-- Keep IL bodies as a fallback for methods not covered by profiled AOT.
AndroidEnableProfiledAot only AOT-compiles methods in the startup profile; the remaining
methods require IL for JIT/interpretation. Stripping IL (AndroidStripILAfterAOT=true)
removes that fallback, causing 'plt_entry not met' assertions in aot-runtime.c when
the runtime encounters an un-AOT'd method (observed on .NET Timer thread at startup).
The ~20-30 MB size saving is not worth the crash risk. -->
<AndroidStripILAfterAOT>false</AndroidStripILAfterAOT>
<!-- Compress managed assemblies inside the APK (LZ4). Android extracts them on first run
but the download/APK size is significantly smaller. -->
<AndroidEnableAssemblyCompression>true</AndroidEnableAssemblyCompression>
Expand Down
Loading