Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Xamarin.Android.Build.Tasks] aapt2, move ConvertResourcesCases to a new target #2367

Merged
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
19 changes: 13 additions & 6 deletions src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets
Original file line number Diff line number Diff line change
Expand Up @@ -1363,21 +1363,28 @@ because xbuild doesn't support framework reference assemblies.
</ComputeHash>
</Target>

<Target Name="_CompileAndroidLibraryResources" DependsOnTargets="_CollectLibraryResourceDirectories"
<Target Name="_ConvertLibraryResourcesCases" DependsOnTargets="_CollectLibraryResourceDirectories"
Condition="'$(_AndroidUseAapt2)' == 'True'"
jonathanpeppers marked this conversation as resolved.
Show resolved Hide resolved
Inputs="%(_LibraryResourceHashDirectories.FileFound)"
Outputs="$(_AndroidLibraryFlatArchivesDirectory)%(_LibraryResourceHashDirectories.Hash).stamp"
>
<MakeDir Directories="$(_AndroidLibraryFlatArchivesDirectory)" Condition="!Exists('$(_AndroidLibraryFlatArchivesDirectory)')" />
Inputs="@(_LibraryResourceHashDirectories->'%(FileFound)')"
Outputs="$(_AndroidStampDirectory)_ConvertLibraryResourcesCases.stamp">
<ConvertResourcesCases
Condition=" '@(_LibraryResourceDirectories)' != '' "
ContinueOnError="$(DesignTimeBuild)"
ResourceDirectories="@(_LibraryResourceDirectories)"
ResourceNameCaseMap="$(_AndroidResourceNameCaseMap)"
AcwMapFile="$(_AcwMapFile)"
CustomViewMapFile="$(_CustomViewMapFile)"
AndroidConversionFlagFile="$(_AndroidLibraryFlatArchivesDirectory)%(_LibraryResourceHashDirectories.Hash).stamp"
AndroidConversionFlagFile="$(_AndroidStampDirectory)_ConvertLibraryResourcesCases.stamp"
/>
<Touch Files="$(_AndroidStampDirectory)_ConvertLibraryResourcesCases.stamp" AlwaysCreate="True" />
</Target>

<Target Name="_CompileAndroidLibraryResources" DependsOnTargets="_ConvertLibraryResourcesCases"
Condition="'$(_AndroidUseAapt2)' == 'True'"
Inputs="%(_LibraryResourceHashDirectories.FileFound)"
Outputs="$(_AndroidLibraryFlatArchivesDirectory)%(_LibraryResourceHashDirectories.Hash).stamp"
>
<MakeDir Directories="$(_AndroidLibraryFlatArchivesDirectory)" Condition="!Exists('$(_AndroidLibraryFlatArchivesDirectory)')" />
<Aapt2Compile
Condition=" '@(_LibraryResourceHashDirectories)' != '' "
ContinueOnError="$(DesignTimeBuild)"
Expand Down