Skip to content

Commit de5c8f8

Browse files
authored
[Xamarin.Android.Build.Tasks] Use Microsoft.Android.Build.BaseTasks (#5464)
Context: dotnet/android-tools#101 Context: xamarin/monodroid#1145 We would like to eventually remove the dependency that xamarin/monodroid has on xamarin/xamarin-android. As a first step towards this effort, shared MSBuild code is being moved to xamarin/xamarin-android-tools. `Xamarin.Android.Build.Tasks` has been updated to use the new shared `Microsoft.Android.Build.BaseTasks` sources. All of the files that were moved to xamarin/xamarin-android-tools have been deleted. The inverted monodroid build has been replaced with the new monodroid build system, see xamarin/monodroid#1145 for more context. The one build task test that was still being ran from the xamarin/monodroid repo has been moved into `DebuggingTasksTests.cs`, which is conditionally included in `Xamarin.Android.Build.Tests`. Tests associated with the build task source that was moved to xamarin/xamarin-android-tools have also been moved to a new `Microsoft.Android.Build.BaseTasks-Tests` assembly in that repo.
1 parent 8bde758 commit de5c8f8

File tree

172 files changed

+450
-2740
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

172 files changed

+450
-2740
lines changed

.external

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
xamarin/monodroid:main@aae6670c6ff4b68d36fb976fd6dec67a2a6d43d7
1+
xamarin/monodroid:main@7da768cf9ddbd137bbce5326dab79b139bcc59e0
22
mono/mono:2020-02@5e9cb6d1c1de430965312927d5aed7fcb27bfa73

.vscode/settings.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"nxunitExplorer.modules": [
44
"bin/TestDebug/MSBuildDeviceIntegration/net472/MSBuildDeviceIntegration.dll",
55
"bin/TestDebug/net472/Xamarin.Android.Build.Tests.dll",
6-
"bin/TestDebug/Xamarin.Android.Build.Tests.Commercial.dll",
76
"bin/TestRelease/MSBuildDeviceIntegration/net472/MSBuildDeviceIntegration.dll",
87
],
98
"cmake.configureOnOpen": false

Configuration.props

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,6 @@
129129
<_TestsProfiledAotName Condition=" '$(AndroidEnableProfiledAot)' == 'true' ">-Profiled</_TestsProfiledAotName>
130130
<_TestsBundleName Condition=" '$(BundleAssemblies)' == 'true' ">-Bundle</_TestsBundleName>
131131
<TestsFlavor>$(_TestsProfiledAotName)$(_TestsAotName)$(_TestsBundleName)</TestsFlavor>
132-
<LibZipSharpVersion>1.0.20</LibZipSharpVersion>
133-
<MonoCecilVersion>0.11.2</MonoCecilVersion>
134-
<NuGetApiPackageVersion>5.4.0</NuGetApiPackageVersion>
135-
<LZ4PackageVersion>1.1.11</LZ4PackageVersion>
136132
</PropertyGroup>
137133
<PropertyGroup>
138134
<MingwCommandPrefix32>i686-w64-mingw32</MingwCommandPrefix32>

Directory.Build.props

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@
2525

2626
<!-- Common <PackageReference/> versions -->
2727
<PropertyGroup>
28+
<LibZipSharpVersion>1.0.20</LibZipSharpVersion>
2829
<MicroBuildCoreVersion>0.4.1</MicroBuildCoreVersion>
30+
<MonoCecilVersion>0.11.2</MonoCecilVersion>
31+
<NuGetApiPackageVersion>5.4.0</NuGetApiPackageVersion>
2932
</PropertyGroup>
3033

3134
</Project>

Documentation/building/windows/instructions.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,26 +18,26 @@ MSBuild version 15 or later is required.
1818

1919
4. (Optional) [Configure the build](../configuration.md).
2020

21-
5. (For Microsoft team members only) (Optional) In a [Developer Command
22-
Prompt][developer-prompt], prepare external proprietary git
23-
dependencies:
24-
25-
msbuild Xamarin.Android.sln /t:PrepareExternal
26-
27-
This will configure external proprietary components such as monodroid.
28-
29-
6. In a [Developer Command Prompt][developer-prompt], prepare the project:
21+
5. In a [Developer Command Prompt][developer-prompt], prepare the project:
3022

3123
msbuild Xamarin.Android.sln /t:Prepare
3224

3325
This will ensure that the build dependencies are installed, perform
3426
`git submodule update`, download NuGet dependencies, and other
3527
"preparatory" and pre-build tasks that need to be performed.
3628

37-
7. Build the project:
29+
6. Build the project:
3830

3931
msbuild Xamarin.Android.sln
4032

33+
7. (For Microsoft team members only - Optional) In a [Developer Command
34+
Prompt][developer-prompt], build external proprietary git
35+
dependencies:
36+
37+
msbuild Xamarin.Android.sln /t:BuildExternal
38+
39+
This will clone and build external proprietary components such as `monodroid`.
40+
4141
After the solution has built successfully, you can [use your
4242
build][using-your-build] to build Xamarin.Android application and library
4343
projects. Note that by default `Xamarin.Android.sln` only builds support for

Makefile

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -136,12 +136,6 @@ uninstall::
136136

137137
topdir := $(shell pwd)
138138

139-
# Used by External XA Build
140-
EXTERNAL_XA_PATH=$(topdir)
141-
EXTERNAL_GIT_PATH=$(topdir)/external
142-
143-
-include $(EXTERNAL_GIT_PATH)/monodroid/xa-integration.mk
144-
145139
include build-tools/scripts/BuildEverything.mk
146140

147141
# Must be after BuildEverything.mk - it uses variables defined there

Xamarin.Android.Build.Tasks.sln

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Debugging.Soft", "exte
2525
EndProject
2626
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "vswhere", "tools\vswhere\vswhere.csproj", "{DBDC804F-8406-4F5E-83C6-720CB0CB6C6F}"
2727
EndProject
28+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Android.Build.BaseTasks", "external\xamarin-android-tools\src\Microsoft.Android.Build.BaseTasks\Microsoft.Android.Build.BaseTasks.csproj", "{3DE17662-DCD6-4F49-AF06-D39AACC8649A}"
29+
EndProject
2830
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Xamarin.Android.Tools.AndroidSdk", "external\xamarin-android-tools\src\Xamarin.Android.Tools.AndroidSdk\Xamarin.Android.Tools.AndroidSdk.csproj", "{E34BCFA0-CAA4-412C-AA1C-75DB8D67D157}"
2931
EndProject
3032
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Android.Sdk.ILLink", "src\Microsoft.Android.Sdk.ILLink\Microsoft.Android.Sdk.ILLink.csproj", "{2A237E71-1FA3-409B-B13E-F6294932A5A9}"
@@ -78,6 +80,10 @@ Global
7880
{DBDC804F-8406-4F5E-83C6-720CB0CB6C6F}.Debug|Any CPU.Build.0 = Debug|Any CPU
7981
{DBDC804F-8406-4F5E-83C6-720CB0CB6C6F}.Release|Any CPU.ActiveCfg = Release|Any CPU
8082
{DBDC804F-8406-4F5E-83C6-720CB0CB6C6F}.Release|Any CPU.Build.0 = Release|Any CPU
83+
{3DE17662-DCD6-4F49-AF06-D39AACC8649A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
84+
{3DE17662-DCD6-4F49-AF06-D39AACC8649A}.Debug|Any CPU.Build.0 = Debug|Any CPU
85+
{3DE17662-DCD6-4F49-AF06-D39AACC8649A}.Release|Any CPU.ActiveCfg = Release|Any CPU
86+
{3DE17662-DCD6-4F49-AF06-D39AACC8649A}.Release|Any CPU.Build.0 = Release|Any CPU
8187
{E34BCFA0-CAA4-412C-AA1C-75DB8D67D157}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
8288
{E34BCFA0-CAA4-412C-AA1C-75DB8D67D157}.Debug|Any CPU.Build.0 = Debug|Any CPU
8389
{E34BCFA0-CAA4-412C-AA1C-75DB8D67D157}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -96,6 +102,7 @@ Global
96102
{90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2} = {385E71CC-BAE5-488B-805E-ACAE55F01DF5}
97103
{372E8E3E-29D5-4B4D-88A2-4711CD628C4E} = {385E71CC-BAE5-488B-805E-ACAE55F01DF5}
98104
{DE40756E-57F6-4AF2-B155-55E3A88CCED8} = {385E71CC-BAE5-488B-805E-ACAE55F01DF5}
105+
{3DE17662-DCD6-4F49-AF06-D39AACC8649A} = {385E71CC-BAE5-488B-805E-ACAE55F01DF5}
99106
{E34BCFA0-CAA4-412C-AA1C-75DB8D67D157} = {385E71CC-BAE5-488B-805E-ACAE55F01DF5}
100107
EndGlobalSection
101108
GlobalSection(ExtensibilityGlobals) = postSolution

Xamarin.Android.sln

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Android", "src\Mono.An
9696
EndProject
9797
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Android.Export", "src\Mono.Android.Export\Mono.Android.Export.csproj", "{B8105878-D423-4159-A3E7-028298281EC6}"
9898
EndProject
99+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Android.Build.BaseTasks", "external\xamarin-android-tools\src\Microsoft.Android.Build.BaseTasks\Microsoft.Android.Build.BaseTasks.csproj", "{3DE17662-DCD6-4F49-AF06-D39AACC8649A}"
100+
EndProject
99101
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Xamarin.Android.Tools.AndroidSdk", "external\xamarin-android-tools\src\Xamarin.Android.Tools.AndroidSdk\Xamarin.Android.Tools.AndroidSdk.csproj", "{E34BCFA0-CAA4-412C-AA1C-75DB8D67D157}"
100102
EndProject
101103
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Xamarin.Android.Tools.AndroidSdk-Tests", "external\xamarin-android-tools\tests\Xamarin.Android.Tools.AndroidSdk-Tests\Xamarin.Android.Tools.AndroidSdk-Tests.csproj", "{1E5501E8-49C1-4659-838D-CC9720C5208F}"
@@ -306,6 +308,10 @@ Global
306308
{B8105878-D423-4159-A3E7-028298281EC6}.Debug|AnyCPU.Build.0 = Debug|Any CPU
307309
{B8105878-D423-4159-A3E7-028298281EC6}.Release|AnyCPU.ActiveCfg = Release|Any CPU
308310
{B8105878-D423-4159-A3E7-028298281EC6}.Release|AnyCPU.Build.0 = Release|Any CPU
311+
{3DE17662-DCD6-4F49-AF06-D39AACC8649A}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU
312+
{3DE17662-DCD6-4F49-AF06-D39AACC8649A}.Debug|AnyCPU.Build.0 = Debug|Any CPU
313+
{3DE17662-DCD6-4F49-AF06-D39AACC8649A}.Release|AnyCPU.ActiveCfg = Release|Any CPU
314+
{3DE17662-DCD6-4F49-AF06-D39AACC8649A}.Release|AnyCPU.Build.0 = Release|Any CPU
309315
{E34BCFA0-CAA4-412C-AA1C-75DB8D67D157}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU
310316
{E34BCFA0-CAA4-412C-AA1C-75DB8D67D157}.Debug|AnyCPU.Build.0 = Debug|Any CPU
311317
{E34BCFA0-CAA4-412C-AA1C-75DB8D67D157}.Release|AnyCPU.ActiveCfg = Release|Any CPU
@@ -445,6 +451,7 @@ Global
445451
{B7A457E6-9CB6-43F6-BFD6-14D5397FB98D} = {864062D3-A415-4A6F-9324-5820237BA058}
446452
{66CF299A-CE95-4131-BCD8-DB66E30C4BF7} = {04E3E11E-B47D-4599-8AFC-50515A95E715}
447453
{B8105878-D423-4159-A3E7-028298281EC6} = {04E3E11E-B47D-4599-8AFC-50515A95E715}
454+
{3DE17662-DCD6-4F49-AF06-D39AACC8649A} = {04E3E11E-B47D-4599-8AFC-50515A95E715}
448455
{E34BCFA0-CAA4-412C-AA1C-75DB8D67D157} = {04E3E11E-B47D-4599-8AFC-50515A95E715}
449456
{1E5501E8-49C1-4659-838D-CC9720C5208F} = {CAB438D8-B0F5-4AF0-BEBD-9E2ADBD7B483}
450457
{1BAFA0CC-0377-46CE-AB7B-7BB2E7B62F63} = {04E3E11E-B47D-4599-8AFC-50515A95E715}

build-tools/Xamarin.Android.Tools.BootstrapTasks/Xamarin.Android.Tools.BootstrapTasks.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</PropertyGroup>
88

99
<Import Project="..\..\Configuration.props" />
10-
<Import Project="..\..\build-tools\scripts\MSBuildReferences.projitems" />
10+
<Import Project="..\..\external\xamarin-android-tools\src\Microsoft.Android.Build.BaseTasks\MSBuildReferences.projitems" />
1111

1212
<ItemGroup>
1313
<PackageReference Include="Microsoft.DotNet.ApiCompat" Version="5.0.0-beta.20181.7" IncludeAssets="none" />

build-tools/automation/yaml-templates/run-msbuild-mac-tests.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,6 @@ jobs:
4444

4545
# Only run these tests on node 2
4646
- ${{ if eq(parameters.run_extra_tests, true) }}:
47-
- template: run-nunit-tests.yaml
48-
parameters:
49-
useDotNet: $(UseDotNet)
50-
testRunTitle: Xamarin.Android.Build.Tests.Commercial - macOS
51-
testAssembly: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/Xamarin.Android.Build.Tests.Commercial.dll
52-
testResultsFile: TestResult-MSBuildTestsCommercial-macOS-$(XA.Build.Configuration).xml
53-
5447
- template: run-nunit-tests.yaml
5548
parameters:
5649
useDotNet: $(UseDotNet)

0 commit comments

Comments
 (0)