Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.
Closed
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
6 changes: 5 additions & 1 deletion src/Xamarin.Legacy.Sdk/Sdk/AutoImport.Android.props
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ NOTE! everything must be conditioned behind:
<Using Include="Android.OS.Bundle" Alias="Bundle" Platform="Android" Sdk="Xamarin.Legacy.Sdk" />
</ItemGroup>

<ItemGroup Condition=" ('$(TargetPlatformIdentifier)' == 'android' or $(TargetFramework.StartsWith ('MonoAndroid', StringComparison.OrdinalIgnoreCase))) and '$(EnableDefaultXamarinLegacySdkItems)' == 'true' ">
<ItemGroup Condition=" ('$(TargetPlatformIdentifier)' == 'android' or $(TargetFramework.StartsWith ('MonoAndroid', StringComparison.OrdinalIgnoreCase))) and '$(EnableDefaultXamarinLegacySdkItems)' == 'true'
and ('$(MonoAndroidAssetsPrefix)' != '' and '$(MonoAndroidResourcePrefix)' != '') ">
Comment on lines +13 to +14
Copy link
Member

Choose a reason for hiding this comment

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

Can we make an <ItemGroup> block for $(MonoAndroidAssetsPrefix) and one for $(MonoAndroidResourcePrefix)?

There is probably a case where one could be blank and not the other.

<!-- Default Resource file inclusion -->
<!-- https://developer.android.com/guide/topics/resources/providing-resources -->
<AndroidResource Include="$(MonoAndroidResourcePrefix)\*\*.xml" />
Expand All @@ -24,6 +25,9 @@ NOTE! everything must be conditioned behind:
<AndroidResource Include="$(MonoAndroidResourcePrefix)\raw\*" Exclude="$(MonoAndroidResourcePrefix)\raw\.*" />
Copy link
Member

Choose a reason for hiding this comment

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

Can we make the same checks for $(MonoAndroidResourcePrefix)?

If there are several lines, we can put them in an <ItemGroup> block with a single Condition.

Copy link
Author

Choose a reason for hiding this comment

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

Can we make the same checks for $(MonoAndroidResourcePrefix)?

Sure we can. I could not find other prop in the chat.

If there are several lines, we can put them in an <ItemGroup> block with a single Condition.

Changed. Both MonoAndroidResourcePrefix and MonoAndroidAssetPrefix checks are now in separate ItemGroup

<!-- Default Asset file inclusion -->
<AndroidAsset Include="$(MonoAndroidAssetsPrefix)\**\*" Exclude="$(MonoAndroidAssetsPrefix)\**\.*\**" />
</ItemGroup>

<ItemGroup Condition=" ('$(TargetPlatformIdentifier)' == 'android' or $(TargetFramework.StartsWith ('MonoAndroid', StringComparison.OrdinalIgnoreCase))) and '$(EnableDefaultXamarinLegacySdkItems)' == 'true' ">
<!-- Default XPath transforms for bindings -->
<TransformFile Include="Transforms*.xml" />
<TransformFile Include="Transforms\**\*.xml" />
Expand Down
2 changes: 1 addition & 1 deletion src/Xamarin.Legacy.Sdk/Xamarin.Legacy.Sdk.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.Build.NoTargets">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<PackageVersion>0.2.0-alpha2</PackageVersion>
<PackageVersion>0.2.0-alpha3</PackageVersion>
<PackageType>MSBuildSdk</PackageType>
<OutputPath>../../bin/$(Configuration)/</OutputPath>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
Expand Down