Skip to content

Commit

Permalink
Xamarin.Android.Build.Tasks:_Foo - Set Inputs and Outputs to fix ..
Browse files Browse the repository at this point in the history
.. incremental builds.
  • Loading branch information
Ankit Jain committed Apr 28, 2016
1 parent 323f432 commit 6680520
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.targets
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
<?xml version="1.0" encoding="UTF-8" ?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<UsingTask TaskName="Xamarin.Android.Tools.BootstrapTasks.GenerateProfile" AssemblyFile="..\..\bin\Build$(Configuration)\Xamarin.Android.Tools.BootstrapTasks.dll" />
<Target Name="_Foo" BeforeTargets="CoreCompile">
<PropertyGroup>
<_GeneratedProfileClass>$(IntermediateOutputPath)Profile.g.cs</_GeneratedProfileClass>
</PropertyGroup>
<ItemGroup>
<SharedRuntimeBuildPath Include="..\..\bin\$(Configuration)\lib\xbuild-frameworks\MonoAndroid\" />
</ItemGroup>
<CreateItem Include="@(SharedRuntimeBuildPath->'%(Identity)\\v1.0\*.dll');@(SharedRuntimeBuildPath->'%(Identity)\\v6.0\*.dll')">
<Output TaskParameter="Include" ItemName="_SharedRuntimeAssemblies" />
</CreateItem>
<ItemGroup>
<_SharedRuntimeBuildPath Include="..\..\bin\$(Configuration)\lib\xbuild-frameworks\MonoAndroid\" />
<_SharedRuntimeAssemblies Include="@(_SharedRuntimeBuildPath->'%(Identity)\v1.0\*.dll');@(_SharedRuntimeBuildPath->'%(Identity)\$(AndroidFrameworkVersion)\*.dll')"/>
</ItemGroup>
<PropertyGroup>
<_GeneratedProfileClass>$(IntermediateOutputPath)Profile.g.cs</_GeneratedProfileClass>
</PropertyGroup>

<Target Name="_GenerateProfileClass" BeforeTargets="CoreCompile"
Inputs="@(_SharedRuntimeAssemblies)"
Outputs="$(_GeneratedProfileClass)"
>
<GenerateProfile Files="@(_SharedRuntimeAssemblies)" OutputFile="$(_GeneratedProfileClass)" />
<ItemGroup>
<Compile Include="$(_GeneratedProfileClass)" />
Expand All @@ -20,4 +22,4 @@
Lines="$(_GeneratedProfileClass)"
Overwrite="false"/>
</Target>
</Project>
</Project>

0 comments on commit 6680520

Please sign in to comment.