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

Clean improvements for BinObj issues #1741

Closed
wants to merge 1 commit into from
Closed
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
35 changes: 35 additions & 0 deletions src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets
Original file line number Diff line number Diff line change
Expand Up @@ -3077,6 +3077,41 @@ because xbuild doesn't support framework reference assemblies.
</CalculateProjectDependencies>
</Target>

<PropertyGroup Condition="'$(BuildingInsideVisualStudio)' == 'true'">
<EnableCleanAllFiles Condition="'$(EnableCleanAllFiles)' == ''">true</EnableCleanAllFiles>
<EnableCleanOnNuGetPackagesChange Condition="'$(EnableCleanOnNuGetPackagesChange)' == ''">true</EnableCleanOnNuGetPackagesChange>
<CoreCleanDependsOn Condition="'$(EnableCleanAllFiles)' == 'true'">
_CleanAllFiles;
$(CoreCleanDependsOn)
</CoreCleanDependsOn>
<BuildDependsOn Condition="'$(EnableCleanOnNuGetPackagesChange)' == 'true'">
_CleanOnNuGetPackagesChange;
$(BuildDependsOn)
</BuildDependsOn>
</PropertyGroup>

<Target Name="_CleanAllFiles">
<ItemGroup>
<Clean Include="$(OutputPath)**\*.*" />
<Clean Include="$(IntermediateOutputPath)**\*.*" Exclude="$(_AndroidDesignTimeResDirIntermediate)\**\*.*" />
</ItemGroup>
</Target>

<Target Name="_BeforeCleanOnNuGetPackagesChange">
<PropertyGroup>
<_NuGetAssetsFile Condition="Exists('$(ProjectLockFile)')">$(ProjectLockFile)</_NuGetAssetsFile>
<_NuGetAssetsFile Condition="'$(_NuGetAssetsFile)' == '' and Exists('packages.config')">packages.config</_NuGetAssetsFile>
</PropertyGroup>
</Target>

<Target Name="_CleanOnNuGetPackagesChange" DependsOnTargets="_BeforeCleanOnNuGetPackagesChange"
Inputs="$(_NuGetAssetsFile)"
Outputs="$(ProjectLockFile).stamp">
<CallTarget Targets="Clean" />
<Touch Files="$(ProjectLockFile).stamp" AlwaysCreate="true" />
</Target>


<Import Project="$(MSBuildThisFileDirectory)Xamarin.Android.Common.Debugging.targets"
Condition="Exists('$(MSBuildThisFileDirectory)Xamarin.Android.Common.Debugging.targets')"/>

Expand Down