|
1 | 1 | <?xml version="1.0" encoding="utf-8"?>
|
2 | 2 | <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
| 3 | + <UsingTask AssemblyFile="$(MSBuildThisFileDirectory)..\..\bin\Build$(Configuration)\xa-prep-tasks.dll" TaskName="Xamarin.Android.BuildTools.PrepTasks.DownloadUri" /> |
3 | 4 | <UsingTask AssemblyFile="$(MSBuildThisFileDirectory)..\..\bin\Build$(Configuration)\xa-prep-tasks.dll" TaskName="Xamarin.Android.BuildTools.PrepTasks.GitCommitTime" />
|
| 5 | + <UsingTask AssemblyFile="$(MSBuildThisFileDirectory)..\..\bin\Build$(Configuration)\xa-prep-tasks.dll" TaskName="Xamarin.Android.BuildTools.PrepTasks.GitCommitHash" /> |
4 | 6 | <Target Name="Build" DependsOnTargets="$(BuildDependsOn)" />
|
5 | 7 | <PropertyGroup>
|
6 | 8 | <_SourceTopDir>..\..</_SourceTopDir>
|
|
48 | 50 | </PropertyGroup>
|
49 | 51 | <PropertyGroup>
|
50 | 52 | <ForceBuildDependsOn>
|
| 53 | + _DownloadArchive; |
51 | 54 | _Autogen;
|
52 | 55 | _Build;
|
53 | 56 | _InstallRuntimes;
|
|
176 | 179 | />
|
177 | 180 | </Target>
|
178 | 181 |
|
| 182 | + <Target Name="_GetMonoGitCommitHash"> |
| 183 | + <GitCommitHash |
| 184 | + WorkingDirectory="$(MonoSourceFullPath)" |
| 185 | + ToolPath="$(GitToolPath)" |
| 186 | + ToolExe="$(GitToolExe)" > |
| 187 | + <Output TaskParameter="CommitHash" PropertyName="_MonoGitCommitHash" /> |
| 188 | + </GitCommitHash> |
| 189 | + <PropertyGroup> |
| 190 | + <_MonoArchiveName>android-$(_MonoSdksConfiguration)-$(_MonoGitCommitHash)-$(HostOS)</_MonoArchiveName> |
| 191 | + </PropertyGroup> |
| 192 | + </Target> |
| 193 | + |
179 | 194 | <Target Name="_GetRuntimesOutputItems">
|
180 | 195 | <ItemGroup>
|
181 | 196 | <_RuntimeSource
|
|
267 | 282 | </ItemGroup>
|
268 | 283 | </Target>
|
269 | 284 |
|
| 285 | + <Target Name="_DownloadArchive" |
| 286 | + DependsOnTargets="_GetMonoGitCommitHash" |
| 287 | + Condition=" !Exists('$(MonoSourceFullPath)\sdks\out\.stamp-$(_MonoArchiveName)-download') " > |
| 288 | + <MakeDir |
| 289 | + Directories="$(MonoSourceFullPath)\sdks\out" |
| 290 | + /> |
| 291 | + <DownloadUri |
| 292 | + SourceUris="https://xamjenkinsartifact.blob.core.windows.net/mono-sdks/$(_MonoArchiveName).tar.gz" |
| 293 | + DestinationFiles="$(AndroidToolchainCacheDirectory)\$(_MonoArchiveName).tar.gz" |
| 294 | + ContinueOnError="True" |
| 295 | + /> |
| 296 | + <Exec |
| 297 | + Condition=" Exists('$(AndroidToolchainCacheDirectory)\$(_MonoArchiveName).tar.gz') " |
| 298 | + Command="tar -xvf $(AndroidToolchainCacheDirectory)\$(_MonoArchiveName).tar.gz" |
| 299 | + IgnoreStandardErrorWarningFormat="True" |
| 300 | + WorkingDirectory="$(MonoSourceFullPath)\sdks\out" |
| 301 | + /> |
| 302 | + <Touch |
| 303 | + Condition=" Exists('$(AndroidToolchainCacheDirectory)\$(_MonoArchiveName).tar.gz') " |
| 304 | + Files="$(MonoSourceFullPath)\sdks\out\.stamp-$(_MonoArchiveName)-download" |
| 305 | + AlwaysCreate="True" |
| 306 | + /> |
| 307 | + </Target> |
| 308 | + |
270 | 309 | <Target Name="_Build"
|
271 | 310 | Condition=" '@(_MonoRuntime)' != '' Or '@(_MonoCrossRuntime)' != '' Or '@(_MonoBcl)' != '' Or '@(_LlvmRuntime)' != '' "
|
272 |
| - DependsOnTargets="_SetAutogenShTimeToLastCommitTimestamp;_GetRuntimesOutputItems;_PrepareLlvmItems" |
| 311 | + DependsOnTargets="_SetAutogenShTimeToLastCommitTimestamp;_GetRuntimesOutputItems;_PrepareLlvmItems;_GetMonoGitCommitHash;_DownloadArchive" |
273 | 312 | Inputs="$(LlvmSourceFullPath)\CMakeLists.txt;$(MonoSourceFullPath)\autogen.sh"
|
274 | 313 | Outputs="@(_RuntimeSource);@(_RuntimeBinarySource);@(_CrossRuntimeBinarySource);@(_ProfilerSource);@(_MonoPosixHelperSource);@(_RuntimeEglibHeaderSource);@(_MonoBtlsSource);@(_BclTestOutput);@(_BclProfileItems);@(_LlvmSourceBinary)">
|
275 | 314 | <Exec
|
| 315 | + Condition=" !Exists('$(MonoSourceFullPath)\sdks\out\.stamp-$(_MonoArchiveName)-download') " |
276 | 316 | Command="make DISABLE_IOS=1 $(MakeConcurrency) @(_MonoRuntime->'package-android-%(Identity)', ' ') @(_MonoCrossRuntime->'package-android-%(Identity)', ' ') @(_MonoBcl->'package-android-%(Identity)', ' ') @(_LlvmRuntime->'provision-llvm-%(Identity)', ' ') $(_MonoSdksParameters)"
|
277 | 317 | IgnoreStandardErrorWarningFormat="True"
|
278 | 318 | WorkingDirectory="$(MonoSourceFullPath)\sdks\builds"
|
|
0 commit comments