You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixes: #6920
Certainly NuGet packages pull in Kotlin-related artifacts which
aren't required at runtime. These artifacts contribute to `.apk`
package size.
The [recommendation for native Android developers][0] is to
explicitly exclude these artifacts by using `packagingOptions`:
packagingOptions {
exclude 'DebugProbesKt.bin'
}
Xamarin.Android and .NET SDK for Android developers don't use Gradle,
so the above snippet is not useful.
Add support for a new `@(AndroidPackagingOptionsExclude)` item group.
This contains a "search pattern" a'la the `searchPattern` parameter
of [`Directory.EnumerateFiles(path, searchPattern)`][1], in which:
* `*` matches 0 or more characters
* `?` matches 1 character.
The default items within `@(AndroidPackagingOptionsExclude)` are:
* `DebugProbesKt.bin`
* `*.kotlin_*`
Files which match the search patterns within
`@(AndroidPackagingOptionsExclude)` are *excluded* from `.aab` and
`.apk` files, reducing app size.
[0]: Kotlin/kotlinx.coroutines#2274
[1]: https://docs.microsoft.com/en-us/dotnet/api/system.io.directory.enumeratefiles?view=net-6.0#system-io-directory-enumeratefiles(system-string-system-string)
0 commit comments