Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ https://github.com/dotnet/designs/blob/4703666296f5e59964961464c25807c727282cae/
<Using Include="Android.OS.Bundle" Alias="Bundle" Platform="Android" />
</ItemGroup>

<ItemGroup Condition=" '$(EnableDefaultAndroidItems)' == 'true' and $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '8.0')) ">
<ItemGroup Condition=" '$(MonoAndroidResourcePrefix)' != '' and
'$(EnableDefaultAndroidItems)' == 'true' and
$([MSBuild]::VersionEquals($(TargetFrameworkVersion), '8.0')) ">
<!-- Default Resource file inclusion -->
<!-- https://developer.android.com/guide/topics/resources/providing-resources -->
<AndroidResource Include="$(MonoAndroidResourcePrefix)\*\*.xml" />
Expand All @@ -35,8 +37,17 @@ https://github.com/dotnet/designs/blob/4703666296f5e59964961464c25807c727282cae/
<AndroidResource Include="$(MonoAndroidResourcePrefix)\font\*.otf" />
<AndroidResource Include="$(MonoAndroidResourcePrefix)\font\*.ttc" />
<AndroidResource Include="$(MonoAndroidResourcePrefix)\raw\*" Exclude="$(MonoAndroidResourcePrefix)\raw\.*" />
</ItemGroup>

<ItemGroup Condition=" '$(MonoAndroidAssetsPrefix)' != '' and
'$(EnableDefaultAndroidItems)' == 'true' and
$([MSBuild]::VersionEquals($(TargetFrameworkVersion), '8.0')) ">
<!-- Default Asset file inclusion -->
<AndroidAsset Include="$(MonoAndroidAssetsPrefix)\**\*" Exclude="$(MonoAndroidAssetsPrefix)\**\.*\**" />
Copy link
Contributor

Choose a reason for hiding this comment

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

Similar to above, but…

Why support $(MonoAndroidAssetsPrefix) at all anymore? Consider @(TransformFile), @(AndroidLibrary), @(AndroidJavaSource), etc., below: none of those use $(MonoAndroidAssetsPrefix), and thus aren't susceptible to pulling in C:\**\*.

Alternatively, perhaps we could require/force $(MonoAndroidAssetsPrefix) to end with "directory-separator-char", which would allow us to change these includes to e.g.:

<AndroidResource Include="$(MonoAndroidAssetsPrefix)**\*" />

which would also prevent us from trying to traverse C:\**\*.

Copy link
Member Author

Choose a reason for hiding this comment

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

After discussion and thinking about AutoImports.props MSBuild ordering, we decided to just format my code better...

Spec if needed: https://github.com/dotnet/designs/blob/main/accepted/2020/workloads/workload-resolvers.md#workload-props-files

</ItemGroup>

<ItemGroup Condition=" '$(EnableDefaultAndroidItems)' == 'true'
and $([MSBuild]::VersionEquals($(TargetFrameworkVersion), '8.0')) ">
<!-- Default XPath transforms for bindings -->
<TransformFile Include="Transforms*.xml" />
<TransformFile Include="Transforms\**\*.xml" />
Expand Down