-
Notifications
You must be signed in to change notification settings - Fork 533
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[r8] add r8 and depot_tools submodules.
depot_tools is required to build r8. On Windows it is however not used but a binary executable zip will be downloaded and used instead. (see https://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html#_setting_up for details) r8 build is not integrated in the primary Makefile and .sln yet. (r8 is not a "build tool" but we build msbuild tasks dependencies there too.)
- Loading branch information
1 parent
edbef70
commit 9f4b0df
Showing
6 changed files
with
92 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<Configuration Condition="'$(Configuration)'==''">Debug</Configuration> | ||
</PropertyGroup> | ||
<Import Project="r8.props" /> | ||
<Import Project="..\..\Configuration.props" /> | ||
<Import Project="r8.targets" /> | ||
</Project> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
</Project> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
|
||
<UsingTask TaskName="Xamarin.Android.Tasks.Unzip" AssemblyFile="Xamarin.Android.Build.Tasks.dll" /> | ||
<UsingTask AssemblyFile="$(MSBuildThisFileDirectory)..\..\bin\Build$(Configuration)\xa-prep-tasks.dll" TaskName="Xamarin.Android.BuildTools.PrepTasks.DownloadUri" /> | ||
|
||
<!-- public targets --> | ||
|
||
<Target Name="Build" DependsOnTargets="_SetupDepotTools;_BuildR8;_CopyR8" /> | ||
<Target Name="Clean" DependsOnTargets="_CleanR8;_CleanDepotTools" /> | ||
|
||
<!-- depot_tools --> | ||
|
||
<!-- Why do people split files and make build scripts unreadable? That's unacceptable. Therefore properties are here. Always consider code readability. --> | ||
<PropertyGroup> | ||
<_WindowsDepotToolzZipDownload>..\..\bin\Build$(Configuration)\depot_tools.zip</_WindowsDepotToolzZipDownload> | ||
</PropertyGroup> | ||
|
||
<Target Name="_SetupDepotTools" DependsOnTargets="_SetupDepotToolsWindows" /> | ||
<Target Name="_CleanDepotTools" DependsOnTargets="_CleanDepotToolsWindows" /> | ||
|
||
<Target Name="_SetupDepotToolsWindows" Condition="$(HostOS) == 'Windows'"> | ||
<DownloadUri | ||
SourceUris="https://storage.googleapis.com/chrome-infra/depot_tools.zip" | ||
DestinationFiles="$(_WindowsDepotToolzZipDownload)" | ||
/> | ||
<Unzip | ||
Sources="$(_WindowsDepotToolsZipDownload)" | ||
Destination="bin\Build$(Configuration)\depot_tools" | ||
/> | ||
</Target> | ||
|
||
<Target Name="_CleanDepotToolsWindows" Condition="$(HostOS) == 'Windows'"> | ||
<RemoveDir Directories="bin\Build$(Configuration)\depot_tools" /> | ||
</Target> | ||
|
||
|
||
<!-- r8 --> | ||
|
||
<PropertyGroup> | ||
<_PathToDepotTools Condition="'$(HostOS)' == 'Windows'">..\..\bin\Build$(Configuration)\depot_tools</_PathToDepotTools> | ||
<_PathToDepotTools Condition="'$(HostOS)' != 'Windows'">..\..\external\depot_tools</_PathToDepotTools> | ||
<_Sep Condition="'$(HostOS)' == 'Windows'">;</_Sep> | ||
<_Sep Condition="'$(HostOS)' != 'Windows'">:</_Sep> | ||
<_W Condition="'$(HostOS)' == 'Windows'">"</_W> | ||
<_W Condition="'$(HostOS)' != 'Windows'"></_W> <_EnvForDepotTools>PATH=$(_W)$(_PathToDepotTools)$(_W)$(_Sep)$(PATH)</_EnvForDepotTools> | ||
</PropertyGroup> | ||
|
||
<Target Name="_BuildR8" DependsOnTargets="_SetupDepotTools"> | ||
<Exec | ||
Command="..\..\external\r8\tools\gradle.py d8 r8" | ||
WorkingDirectory="..\..\external\r8" | ||
EnvironmentVariables="$(_EnvForDepotTools)" | ||
/> | ||
</Target> | ||
|
||
<Target Name="_CopyR8"> | ||
<Copy | ||
SourceFiles="..\..\external\r8\build\libs\r8.jar" | ||
DestinationFolder="$(XAInstallPrefix)\xbuild\Xamarin\Android\" | ||
SkipUnchangedFiles="true" | ||
/> | ||
</Target> | ||
|
||
<Target Name="_CleanR8"> | ||
<Exec | ||
Command="..\..\external\r8\tools\gradle.py clean" | ||
WorkingDirectory="..\..\external\r8" | ||
EnvironmentVariables="$(_EnvForDepotTools)" | ||
/> | ||
</Target> | ||
|
||
</Project> |
Submodule depot_tools
added at
a16b4c
Submodule r8
added at
d7c62c