Skip to content

Commit

Permalink
[Xamarin.Android.Build.Tasks] Fix weird error with _CopyPackage (#2529
Browse files Browse the repository at this point in the history
)

We had an issue where the `_CopyPackage` target was occasionally
*NOT* executing when a `.apk` file changed!

It was really weird.

Rework this to define the `$(_CopyPackageInputs)` Property within a
new `_ResolveCopyPackageInputs` target.  This should allow it to pick
up any dynamically added Items.
  • Loading branch information
dellis1972 authored and jonpryor committed Jan 2, 2019
1 parent 6b03874 commit f8f8372
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets
Original file line number Diff line number Diff line change
Expand Up @@ -2880,16 +2880,17 @@ because xbuild doesn't support framework reference assemblies.
</BuildApk>
</Target>

<PropertyGroup>
<_CopyPackageInputs>
$(MSBuildAllProjects)
;@(ReferencePath)
;@(ReferenceDependencyPaths)
;$(ApkFileIntermediate)
;$(_AndroidBuildPropertiesCache)
;@(ApkFiles)
</_CopyPackageInputs>
</PropertyGroup>
<Target Name="_ResolveCopyPackageInputs">
<PropertyGroup>
<_CopyPackageInputs>
;@(ReferencePath)
;@(ReferenceDependencyPaths)
;$(ApkFileIntermediate)
;$(_AndroidBuildPropertiesCache)
;@(ApkFiles)
</_CopyPackageInputs>
</PropertyGroup>
</Target>

<Target Name="_DefineBuildTargetAbis" DependsOnTargets="$(_BeforeDefineBuildTargetAbis)">
<CreateProperty Value="$(AndroidSupportedAbis)" Condition="'$(_BuildTargetAbis)' == ''">
Expand All @@ -2902,6 +2903,7 @@ because xbuild doesn't support framework reference assemblies.
<_CopyPackageDependsOn>
_DefineBuildTargetAbis
;_BuildApkEmbed
;_ResolveCopyPackageInputs
</_CopyPackageDependsOn>
</PropertyGroup>

Expand Down

0 comments on commit f8f8372

Please sign in to comment.