Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .external
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
xamarin/monodroid:main@aae6670c6ff4b68d36fb976fd6dec67a2a6d43d7
xamarin/monodroid:main@7da768cf9ddbd137bbce5326dab79b139bcc59e0
mono/mono:2020-02@5e9cb6d1c1de430965312927d5aed7fcb27bfa73
1 change: 0 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"nxunitExplorer.modules": [
"bin/TestDebug/MSBuildDeviceIntegration/net472/MSBuildDeviceIntegration.dll",
"bin/TestDebug/net472/Xamarin.Android.Build.Tests.dll",
"bin/TestDebug/Xamarin.Android.Build.Tests.Commercial.dll",
"bin/TestRelease/MSBuildDeviceIntegration/net472/MSBuildDeviceIntegration.dll",
],
"cmake.configureOnOpen": false
Expand Down
4 changes: 0 additions & 4 deletions Configuration.props
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,6 @@
<_TestsProfiledAotName Condition=" '$(AndroidEnableProfiledAot)' == 'true' ">-Profiled</_TestsProfiledAotName>
<_TestsBundleName Condition=" '$(BundleAssemblies)' == 'true' ">-Bundle</_TestsBundleName>
<TestsFlavor>$(_TestsProfiledAotName)$(_TestsAotName)$(_TestsBundleName)</TestsFlavor>
<LibZipSharpVersion>1.0.20</LibZipSharpVersion>
<MonoCecilVersion>0.11.2</MonoCecilVersion>
<NuGetApiPackageVersion>5.4.0</NuGetApiPackageVersion>
<LZ4PackageVersion>1.1.11</LZ4PackageVersion>
</PropertyGroup>
<PropertyGroup>
<MingwCommandPrefix32>i686-w64-mingw32</MingwCommandPrefix32>
Expand Down
3 changes: 3 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@

<!-- Common <PackageReference/> versions -->
<PropertyGroup>
<LibZipSharpVersion>1.0.20</LibZipSharpVersion>
<MicroBuildCoreVersion>0.4.1</MicroBuildCoreVersion>
<MonoCecilVersion>0.11.2</MonoCecilVersion>
<NuGetApiPackageVersion>5.4.0</NuGetApiPackageVersion>
</PropertyGroup>

</Project>
20 changes: 10 additions & 10 deletions Documentation/building/windows/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,26 @@ MSBuild version 15 or later is required.

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

5. (For Microsoft team members only) (Optional) In a [Developer Command
Prompt][developer-prompt], prepare external proprietary git
dependencies:

msbuild Xamarin.Android.sln /t:PrepareExternal

This will configure external proprietary components such as monodroid.

6. In a [Developer Command Prompt][developer-prompt], prepare the project:
5. In a [Developer Command Prompt][developer-prompt], prepare the project:

msbuild Xamarin.Android.sln /t:Prepare

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

7. Build the project:
6. Build the project:

msbuild Xamarin.Android.sln

7. (For Microsoft team members only - Optional) In a [Developer Command
Prompt][developer-prompt], build external proprietary git
dependencies:

msbuild Xamarin.Android.sln /t:BuildExternal

This will clone and build external proprietary components such as `monodroid`.

After the solution has built successfully, you can [use your
build][using-your-build] to build Xamarin.Android application and library
projects. Note that by default `Xamarin.Android.sln` only builds support for
Expand Down
6 changes: 0 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,6 @@ uninstall::

topdir := $(shell pwd)

# Used by External XA Build
EXTERNAL_XA_PATH=$(topdir)
EXTERNAL_GIT_PATH=$(topdir)/external

-include $(EXTERNAL_GIT_PATH)/monodroid/xa-integration.mk

include build-tools/scripts/BuildEverything.mk

# Must be after BuildEverything.mk - it uses variables defined there
Expand Down
7 changes: 7 additions & 0 deletions Xamarin.Android.Build.Tasks.sln
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Debugging.Soft", "exte
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "vswhere", "tools\vswhere\vswhere.csproj", "{DBDC804F-8406-4F5E-83C6-720CB0CB6C6F}"
EndProject
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}"
EndProject
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}"
EndProject
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}"
Expand Down Expand Up @@ -78,6 +80,10 @@ Global
{DBDC804F-8406-4F5E-83C6-720CB0CB6C6F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DBDC804F-8406-4F5E-83C6-720CB0CB6C6F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DBDC804F-8406-4F5E-83C6-720CB0CB6C6F}.Release|Any CPU.Build.0 = Release|Any CPU
{3DE17662-DCD6-4F49-AF06-D39AACC8649A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3DE17662-DCD6-4F49-AF06-D39AACC8649A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3DE17662-DCD6-4F49-AF06-D39AACC8649A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3DE17662-DCD6-4F49-AF06-D39AACC8649A}.Release|Any CPU.Build.0 = Release|Any CPU
{E34BCFA0-CAA4-412C-AA1C-75DB8D67D157}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E34BCFA0-CAA4-412C-AA1C-75DB8D67D157}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E34BCFA0-CAA4-412C-AA1C-75DB8D67D157}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand All @@ -96,6 +102,7 @@ Global
{90C99ADB-7D4B-4EB4-98C2-40BD1B14C7D2} = {385E71CC-BAE5-488B-805E-ACAE55F01DF5}
{372E8E3E-29D5-4B4D-88A2-4711CD628C4E} = {385E71CC-BAE5-488B-805E-ACAE55F01DF5}
{DE40756E-57F6-4AF2-B155-55E3A88CCED8} = {385E71CC-BAE5-488B-805E-ACAE55F01DF5}
{3DE17662-DCD6-4F49-AF06-D39AACC8649A} = {385E71CC-BAE5-488B-805E-ACAE55F01DF5}
{E34BCFA0-CAA4-412C-AA1C-75DB8D67D157} = {385E71CC-BAE5-488B-805E-ACAE55F01DF5}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
Expand Down
7 changes: 7 additions & 0 deletions Xamarin.Android.sln
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Android", "src\Mono.An
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Android.Export", "src\Mono.Android.Export\Mono.Android.Export.csproj", "{B8105878-D423-4159-A3E7-028298281EC6}"
EndProject
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}"
EndProject
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}"
EndProject
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}"
Expand Down Expand Up @@ -306,6 +308,10 @@ Global
{B8105878-D423-4159-A3E7-028298281EC6}.Debug|AnyCPU.Build.0 = Debug|Any CPU
{B8105878-D423-4159-A3E7-028298281EC6}.Release|AnyCPU.ActiveCfg = Release|Any CPU
{B8105878-D423-4159-A3E7-028298281EC6}.Release|AnyCPU.Build.0 = Release|Any CPU
{3DE17662-DCD6-4F49-AF06-D39AACC8649A}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU
{3DE17662-DCD6-4F49-AF06-D39AACC8649A}.Debug|AnyCPU.Build.0 = Debug|Any CPU
{3DE17662-DCD6-4F49-AF06-D39AACC8649A}.Release|AnyCPU.ActiveCfg = Release|Any CPU
{3DE17662-DCD6-4F49-AF06-D39AACC8649A}.Release|AnyCPU.Build.0 = Release|Any CPU
{E34BCFA0-CAA4-412C-AA1C-75DB8D67D157}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU
{E34BCFA0-CAA4-412C-AA1C-75DB8D67D157}.Debug|AnyCPU.Build.0 = Debug|Any CPU
{E34BCFA0-CAA4-412C-AA1C-75DB8D67D157}.Release|AnyCPU.ActiveCfg = Release|Any CPU
Expand Down Expand Up @@ -445,6 +451,7 @@ Global
{B7A457E6-9CB6-43F6-BFD6-14D5397FB98D} = {864062D3-A415-4A6F-9324-5820237BA058}
{66CF299A-CE95-4131-BCD8-DB66E30C4BF7} = {04E3E11E-B47D-4599-8AFC-50515A95E715}
{B8105878-D423-4159-A3E7-028298281EC6} = {04E3E11E-B47D-4599-8AFC-50515A95E715}
{3DE17662-DCD6-4F49-AF06-D39AACC8649A} = {04E3E11E-B47D-4599-8AFC-50515A95E715}
{E34BCFA0-CAA4-412C-AA1C-75DB8D67D157} = {04E3E11E-B47D-4599-8AFC-50515A95E715}
{1E5501E8-49C1-4659-838D-CC9720C5208F} = {CAB438D8-B0F5-4AF0-BEBD-9E2ADBD7B483}
{1BAFA0CC-0377-46CE-AB7B-7BB2E7B62F63} = {04E3E11E-B47D-4599-8AFC-50515A95E715}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

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

<ItemGroup>
<PackageReference Include="Microsoft.DotNet.ApiCompat" Version="5.0.0-beta.20181.7" IncludeAssets="none" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,6 @@ jobs:

# Only run these tests on node 2
- ${{ if eq(parameters.run_extra_tests, true) }}:
- template: run-nunit-tests.yaml
parameters:
useDotNet: $(UseDotNet)
testRunTitle: Xamarin.Android.Build.Tests.Commercial - macOS
testAssembly: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/Xamarin.Android.Build.Tests.Commercial.dll
testResultsFile: TestResult-MSBuildTestsCommercial-macOS-$(XA.Build.Configuration).xml

- template: run-nunit-tests.yaml
parameters:
useDotNet: $(UseDotNet)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,6 @@ jobs:

# Only run these tests on node 2
- ${{ if eq(parameters.run_extra_tests, true) }}:
- template: run-nunit-tests.yaml
parameters:
useDotNet: $(UseDotNet)
testRunTitle: Xamarin.Android.Build.Tests.Commercial - Windows
testAssembly: $(System.DefaultWorkingDirectory)\bin\Test$(XA.Build.Configuration)\Xamarin.Android.Build.Tests.Commercial.dll
testResultsFile: TestResult-MSBuildTestsCommercial-Windows-$(XA.Build.Configuration).xml

- template: run-nunit-tests.yaml
parameters:
useDotNet: $(UseDotNet)
Expand Down
3 changes: 3 additions & 0 deletions build-tools/installers/create-installers.targets
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,8 @@
<_MSBuildFiles Include="$(MSBuildSrcDir)\logcat-parse.pdb" ExcludeFromAndroidNETSdk="true" />
<_MSBuildFiles Include="$(MSBuildSrcDir)\mdoc.exe" ExcludeFromAndroidNETSdk="true" />
<_MSBuildFiles Include="$(MSBuildSrcDir)\mdoc.pdb" ExcludeFromAndroidNETSdk="true" />
<_MSBuildFiles Include="$(MSBuildSrcDir)\Microsoft.Android.Build.BaseTasks.dll" />
<_MSBuildFiles Include="$(MSBuildSrcDir)\Microsoft.Android.Build.BaseTasks.pdb" />
<_MSBuildFiles Include="$(MSBuildSrcDir)\mkbundle.exe" ExcludeFromAndroidNETSdk="true" />
<_MSBuildFiles Include="$(MSBuildSrcDir)\mkbundle.pdb" ExcludeFromAndroidNETSdk="true" />
<_MSBuildFiles Include="$(MSBuildSrcDir)\mkbundle-api.h" />
Expand Down Expand Up @@ -244,6 +246,7 @@
<_MSBuildFiles Include="$(MSBuildSrcDir)\Xamarin.Android.Build.Tasks.dll" />
<_MSBuildFiles Include="$(MSBuildSrcDir)\Xamarin.Android.Build.Tasks.pdb" />
<_MSBuildFiles Include="@(_LocalizationLanguages->'$(MSBuildSrcDir)\%(Identity)\Java.Interop.Localization.resources.dll')" />
<_MSBuildFiles Include="@(_LocalizationLanguages->'$(MSBuildSrcDir)\%(Identity)\Microsoft.Android.Build.BaseTasks.resources.dll')" />
<_MSBuildFiles Include="@(_LocalizationLanguages->'$(MSBuildSrcDir)\%(Identity)\Xamarin.Android.Build.Tasks.resources.dll')" />
<_MSBuildFiles Include="@(_LocalizationLanguages->'$(MSBuildSrcDir)\%(Identity)\Xamarin.Android.Tools.AndroidSdk.resources.dll')" />
<_MSBuildFiles Include="$(MSBuildSrcDir)\Xamarin.Android.BuildInfo.txt" />
Expand Down
7 changes: 4 additions & 3 deletions build-tools/scripts/BuildEverything.mk
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ ifeq ($(PREPARE_CI_PR)$(PREPARE_CI),00)
else
$(MAKE) prepare
endif
$(MAKE) leeroy $(ZIP_OUTPUT)
ifeq ($(XA_INVERTED_COMMERCIAL_BUILD),true)
$(MAKE) commercial
ifneq ("$(wildcard $(topdir)/external/monodroid/Makefile)","")
cd $(topdir)/external/monodroid && ./configure --with-xamarin-android='$(topdir)'
cd $(topdir)/external/monodroid && $(MAKE) build-monodroid CONFIGURATION=$(CONFIGURATION) XAMARIN_ANDROID_PATH=$(topdir)
endif
$(MAKE) leeroy $(ZIP_OUTPUT)

leeroy: leeroy-all framework-assemblies opentk-jcw

Expand Down
52 changes: 0 additions & 52 deletions build-tools/scripts/MSBuildReferences.projitems

This file was deleted.

7 changes: 7 additions & 0 deletions build-tools/scripts/Packaging.mk
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# If commercial components exist in output, set required variables
ifneq ("$(wildcard $(topdir)/bin/$(CONFIGURATION)/lib/xamarin.android/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets)","")
PKG_LICENSE_EN=$(topdir)/external/monodroid/tools/scripts/License.txt
USE_COMMERCIAL_INSTALLER_NAME=true
EXPERIMENTAL=false
endif

create-installers: create-pkg create-vsix

create-pkg:
Expand Down
9 changes: 9 additions & 0 deletions build-tools/scripts/PrepareWindows.targets
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@
DependsOnTargets="_BuildXAPrepare">
<Exec Command="$(_XAPrepareExe) -s:PrepareExternalGitDependencies $(_XAPrepareStandardArgs)" />
</Target>
<Target Name="BuildExternal"
DependsOnTargets="PrepareExternal">
<ItemGroup>
<_MonodroidBuildProps Include="-p:Configuration=$(Configuration)" />
<_MonodroidBuildProps Include="-p:DebuggingToolsOutputDirectory=$(XAInstallPrefix)xbuild\Xamarin\Android" />
<_MonodroidBuildProps Include="-p:CompatTargetsOutputDirectory=$(XAInstallPrefix)xbuild\Novell" />
</ItemGroup>
<Exec Command="dotnet build &quot;$(XamarinAndroidSourcePath)\external\monodroid\monodroid.proj&quot; @(_MonodroidBuildProps, ' ')" />
</Target>
<Target Name="Prepare"
DependsOnTargets="_BuildXAPrepare">
<Error
Expand Down
2 changes: 1 addition & 1 deletion build-tools/xa-prep-tasks/xa-prep-tasks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<Import Project="..\..\Configuration.props" />
<Import Project="..\..\build-tools\scripts\MSBuildReferences.projitems" />
<Import Project="..\..\external\xamarin-android-tools\src\Microsoft.Android.Build.BaseTasks\MSBuildReferences.projitems" />
<Import Project="xa-prep-tasks.targets" />

</Project>
2 changes: 1 addition & 1 deletion external/xamarin-android-tools
3 changes: 2 additions & 1 deletion src-ThirdParty/android-platform-tools-base/SymbolWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using System.Text;
using Xamarin.Android.Tools;
using Xamarin.Build;
using Microsoft.Android.Build.Tasks;

namespace Xamarin.Android.Tasks
{
Expand Down Expand Up @@ -86,7 +87,7 @@ void GenerateJava (Package package)

writer.Flush ();
var r_java = Path.Combine (output_directory, package.Name.Replace ('.', Path.DirectorySeparatorChar), "R.java");
if (MonoAndroidHelper.CopyIfStreamChanged (writer.BaseStream, r_java)) {
if (Files.CopyIfStreamChanged (writer.BaseStream, r_java)) {
LogDebugMessage ($"Writing: {r_java}");
} else {
LogDebugMessage ($"Up to date: {r_java}");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using Mono.Cecil.Cil;
using Mono.Linker.Steps;
using Xamarin.Android.Tools;
using Microsoft.Android.Build.Tasks;

namespace MonoDroid.Tuner
{
Expand Down
5 changes: 3 additions & 2 deletions src/Xamarin.Android.Build.Tasks/Tasks/Aapt.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2011 Xamarin, Inc. All rights reserved.
// Copyright (C) 2011 Xamarin, Inc. All rights reserved.

using System;
using System.Diagnostics;
Expand All @@ -14,6 +14,7 @@
using System.Collections.Generic;
using Xamarin.Android.Tools;
using Xamarin.Build;
using Microsoft.Android.Build.Tasks;

namespace Xamarin.Android.Tasks
{
Expand Down Expand Up @@ -169,7 +170,7 @@ bool ExecuteForAbi (string cmd, string currentResourceOutputFile)
}
if (ret && !string.IsNullOrEmpty (currentResourceOutputFile)) {
var tmpfile = currentResourceOutputFile + ".bk";
MonoAndroidHelper.CopyIfZipChanged (tmpfile, currentResourceOutputFile);
Files.CopyIfZipChanged (tmpfile, currentResourceOutputFile);
File.Delete (tmpfile);
}
return ret;
Expand Down
3 changes: 2 additions & 1 deletion src/Xamarin.Android.Build.Tasks/Tasks/Aapt2.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2011 Xamarin, Inc. All rights reserved.
// Copyright (C) 2011 Xamarin, Inc. All rights reserved.

using System;
using System.Diagnostics;
Expand All @@ -16,6 +16,7 @@
using Xamarin.Android.Tools;
using ThreadingTasks = System.Threading.Tasks;
using Xamarin.Build;
using Microsoft.Android.Build.Tasks;

namespace Xamarin.Android.Tasks {

Expand Down
1 change: 1 addition & 0 deletions src/Xamarin.Android.Build.Tasks/Tasks/Aapt2Compile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
using System.Text.RegularExpressions;
using System.Collections.Generic;
using Xamarin.Android.Tools;
using Microsoft.Android.Build.Tasks;

namespace Xamarin.Android.Tasks {

Expand Down
Loading