-
Notifications
You must be signed in to change notification settings - Fork 565
Description
Android application type
Android for .NET (net6.0-android, etc.)
Affected platform version
.NET 6
Description
dotnet new maui includes a lot of "weird" Kotlin files like:
DebugProbesKt.bin, they actually recommend:
packagingOptions {
exclude "DebugProbesKt.bin"
}See: Kotlin/kotlinx.coroutines#2274
The kotlin folder above has lot of *.kotlin_metadata files that is apparently only used if Kotlin reflection is used at runtime:
https://youtrack.jetbrains.com/issue/KT-9770
Proposal
Add a new item group to mirror the gradle feature above. I don't think we have an equivalent in Xamarin.Android or .NET 6?
Maybe our MSBuild targets can define something like:
<ItemGroup>
<AndroidPackagingOptionsExclude Include="DebugProbesKt.bin" />
<AndroidPackagingOptionsExclude Include="**/*.kotlin_*" />
</ItemGroup>NOTE: I think we'd might have to escape the * with url encoding.
In the rare case where a customer needs some of these files, they could clear them in their .csproj as needed:
<ItemGroup>
<AndroidPackagingOptionsExclude Remove="@(AndroidPackagingOptionsExclude)" />
</ItemGroup>Steps to Reproduce
dotnet new mauidotnet build -c Release -f net6.0-android
Then look at the .apk file.
Did you find any workaround?
No response
Relevant log output
No response
