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 Documentation/building/windows/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ MSBuild version 15 or later is required.

7. Build the project:

msbuild Xamarin.Android.sln
msbuild /restore Xamarin.Android.sln

After the solution has built successfully, you can [use your
build][using-your-build] to build Xamarin.Android application and library
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ BOOTSTRAP_BUILD_LOG = bin/Build$(CONFIGURATION)/bootstrap-build.binlog
BOOTSTRAP_MSBUILD_FLAGS = /t:Restore,Build /binaryLogger:"$(BOOTSTRAP_BUILD_LOG)" $(PREPARE_COMMON_MSBUILD_FLAGS)

all:
$(call MSBUILD_BINLOG,all,$(_SLN_BUILD)) $(MSBUILD_FLAGS) $(SOLUTION)
$(call MSBUILD_BINLOG,all,$(_SLN_BUILD)) /restore $(MSBUILD_FLAGS) $(SOLUTION)

-include bin/Build$(CONFIGURATION)/rules.mk

Expand Down
14 changes: 0 additions & 14 deletions Xamarin.Android.sln
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenTK", "src\OpenTK-1.0\Op
{3F1F2F50-AF1A-4A5A-BEDB-193372F068D7} = {3F1F2F50-AF1A-4A5A-BEDB-193372F068D7}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Xamarin.Android.Cecil", "external\Java.Interop\src\Xamarin.Android.Cecil\Xamarin.Android.Cecil.csproj", "{15945D4B-FF56-4BCC-B598-2718D199DD08}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Xamarin.Android.Cecil.Mdb", "external\Java.Interop\src\Xamarin.Android.Cecil\Xamarin.Android.Cecil.Mdb.csproj", "{C0487169-8F81-497F-919E-EB42B1D0243F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "proguard", "src\proguard\proguard.csproj", "{4B9D96BB-95AB-44E8-9F87-13B12C8BCED1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "api-xml-adjuster", "build-tools\api-xml-adjuster\api-xml-adjuster.csproj", "{8A6CB07C-E493-4A4F-AB94-038645A27118}"
Expand Down Expand Up @@ -263,14 +259,6 @@ Global
{5EB9E888-E357-417E-9F39-DDEC195CE47F}.Debug|AnyCPU.Build.0 = Debug|Any CPU
{5EB9E888-E357-417E-9F39-DDEC195CE47F}.Release|AnyCPU.ActiveCfg = Release|Any CPU
{5EB9E888-E357-417E-9F39-DDEC195CE47F}.Release|AnyCPU.Build.0 = Release|Any CPU
{15945D4B-FF56-4BCC-B598-2718D199DD08}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU
{15945D4B-FF56-4BCC-B598-2718D199DD08}.Debug|AnyCPU.Build.0 = Debug|Any CPU
{15945D4B-FF56-4BCC-B598-2718D199DD08}.Release|AnyCPU.ActiveCfg = Release|Any CPU
{15945D4B-FF56-4BCC-B598-2718D199DD08}.Release|AnyCPU.Build.0 = Release|Any CPU
{C0487169-8F81-497F-919E-EB42B1D0243F}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU
{C0487169-8F81-497F-919E-EB42B1D0243F}.Debug|AnyCPU.Build.0 = Debug|Any CPU
{C0487169-8F81-497F-919E-EB42B1D0243F}.Release|AnyCPU.ActiveCfg = Release|Any CPU
{C0487169-8F81-497F-919E-EB42B1D0243F}.Release|AnyCPU.Build.0 = Release|Any CPU
{4B9D96BB-95AB-44E8-9F87-13B12C8BCED1}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU
{4B9D96BB-95AB-44E8-9F87-13B12C8BCED1}.Debug|AnyCPU.Build.0 = Debug|Any CPU
{4B9D96BB-95AB-44E8-9F87-13B12C8BCED1}.Release|AnyCPU.ActiveCfg = Release|Any CPU
Expand Down Expand Up @@ -417,8 +405,6 @@ Global
{7387E151-48E3-4885-B2CA-A74434A34045} = {864062D3-A415-4A6F-9324-5820237BA058}
{B8F799C5-D7CE-4E09-9CE6-BAA4173E7EC8} = {04E3E11E-B47D-4599-8AFC-50515A95E715}
{5EB9E888-E357-417E-9F39-DDEC195CE47F} = {04E3E11E-B47D-4599-8AFC-50515A95E715}
{15945D4B-FF56-4BCC-B598-2718D199DD08} = {864062D3-A415-4A6F-9324-5820237BA058}
{C0487169-8F81-497F-919E-EB42B1D0243F} = {864062D3-A415-4A6F-9324-5820237BA058}
{4B9D96BB-95AB-44E8-9F87-13B12C8BCED1} = {04E3E11E-B47D-4599-8AFC-50515A95E715}
{8A6CB07C-E493-4A4F-AB94-038645A27118} = {E351F97D-EA4F-4E7F-AAA0-8EBB1F2A4A62}
{E0890301-F75F-40E7-B008-54C28B3BA542} = {864062D3-A415-4A6F-9324-5820237BA058}
Expand Down
3 changes: 2 additions & 1 deletion build-tools/automation/azure-pipelines.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ stages:
inputs:
solution: Xamarin.Android.sln
configuration: $(XA.Build.Configuration)
msbuildArguments: /t:Build /bl:$(System.DefaultWorkingDirectory)\bin\Build$(XA.Build.Configuration)\msbuild-build.binlog
msbuildArguments: /restore /t:Build /bl:$(System.DefaultWorkingDirectory)\bin\Build$(XA.Build.Configuration)\msbuild-build.binlog

- task: MSBuild@1
displayName: msbuild create-vsix
Expand Down Expand Up @@ -307,6 +307,7 @@ stages:
solution: Xamarin.Android.sln
configuration: $(XA.Build.Configuration)
msbuildArguments: >
/restore
/t:RunJavaInteropTests
/p:TestAssembly="bin\Test$(XA.Build.Configuration)\generator-Tests.dll;bin\Test$(XA.Build.Configuration)\Java.Interop.Tools.JavaCallableWrappers-Tests.dll;bin\Test$(XA.Build.Configuration)\logcat-parse-Tests.dll;bin\Test$(XA.Build.Configuration)\Xamarin.Android.Tools.ApiXmlAdjuster-Tests.dll;bin\Test$(XA.Build.Configuration)\Xamarin.Android.Tools.Bytecode-Tests.dll"
/bl:$(System.DefaultWorkingDirectory)\bin\Test$(XA.Build.Configuration)\msbuild-run-ji-tests.binlog
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ steps:
solution: ${{ parameters.project }}
configuration: ${{ parameters.configuration }}
msbuildArguments: >
/restore
/t:AcquireAndroidTarget,SignAndroidPackage,DeployTest${{ parameters.packageType }}s,RecordApkSizes,RunTestApks,UndeployTestApks,RenameApkTestCases,ReportComponentFailures
/bl:$(System.DefaultWorkingDirectory)/bin/Test${{ parameters.configuration }}/run${{ parameters.testName }}.binlog
${{ parameters.extraBuildArgs }}
Expand Down
2 changes: 1 addition & 1 deletion build-tools/scripts/BuildEverything.mk
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ endif
leeroy: leeroy-all framework-assemblies opentk-jcw

leeroy-all:
$(call MSBUILD_BINLOG,leeroy-all,$(_SLN_BUILD)) $(SOLUTION) /p:Configuration=$(CONFIGURATION) $(_MSBUILD_ARGS)
$(call MSBUILD_BINLOG,leeroy-all,$(_SLN_BUILD)) /restore $(SOLUTION) /p:Configuration=$(CONFIGURATION) $(_MSBUILD_ARGS)

opentk-jcw:
$(foreach api_level, $(API_LEVELS), \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<PropertyGroup>
<CecilSourceDirectory>$(MSBuildThisFileDirectory)..\..\external\mono\external\cecil</CecilSourceDirectory>
<UtilityOutputFullPath>$(MSBuildThisFileDirectory)..\..\bin\$(Configuration)\lib\xamarin.android\xbuild\Xamarin\Android\</UtilityOutputFullPath>
<UtilityOutputFullPathCoreApps>$(MSBuildThisFileDirectory)..\..\bin\$(Configuration)-netcoreapp3.1\</UtilityOutputFullPathCoreApps>
<XamarinAndroidToolsDirectory>$(MSBuildThisFileDirectory)..\..\external\xamarin-android-tools</XamarinAndroidToolsDirectory>
</PropertyGroup>
</Project>
6 changes: 6 additions & 0 deletions build-tools/scripts/RunTests.targets
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@
/>
</Target>
<Target Name="RunJavaInteropTests">
<MSBuild
Condition=" '$(HostOS)' == 'Windows' "
Projects="$(JavaInteropSourceDirectory)\Java.Interop.sln"
Properties="_IsRestoring=true"
Targets="Restore"
/>
<MSBuild
Condition=" '$(HostOS)' == 'Windows' "
ContinueOnError="ErrorAndContinue"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ public static partial class Paths

public static string TestBinDir => GetCachedPath (ref testBinDir, () => Path.Combine (Configurables.Paths.BinDirRoot, $"Test{ctx.Configuration}"));
public static string BinDir => GetCachedPath (ref binDir, () => Path.Combine (Configurables.Paths.BinDirRoot, ctx.Configuration));
public static string NetCoreBinDir => GetCachedPath (ref binDir, () => Path.Combine (Configurables.Paths.BinDirRoot, $"{ctx.Configuration}-netcoreapp3.1"));
public static string BuildBinDir => GetCachedPath (ref buildBinDir, () => Path.Combine (Configurables.Paths.BinDirRoot, $"Build{ctx.Configuration}"));
public static string MingwBinDir => GetCachedPath (ref mingwBinDir, () => Path.Combine (ctx.Properties.GetRequiredValue (KnownProperties.AndroidMxeFullPath), "bin"));
public static string ProfileAssembliesProjitemsPath => GetCachedPath (ref profileAssembliesProjitemsPath, () => Path.Combine (BuildBinDir, "ProfileAssemblies.projitems"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ async Task<bool> ConjureXamarinCecilAndRemapRef (Context context, bool haveManag
return false;
}

Utilities.CreateDirectory (Configurables.Paths.NetCoreBinDir);
Utilities.CopyFile (assemblyPath, Path.Combine (Configurables.Paths.NetCoreBinDir, "Xamarin.Android.Cecil.dll"));

StatusStep (context, "Re-signing Xamarin.Android.Cecil.Mdb.dll");
assemblyPath = Path.Combine (Configurables.Paths.BuildBinDir, "Xamarin.Android.Cecil.Mdb.dll");
result = await sn.ReSign (snkPath, assemblyPath, $"sign-xamarin-android-cecil-mdb");
Expand All @@ -132,6 +135,8 @@ async Task<bool> ConjureXamarinCecilAndRemapRef (Context context, bool haveManag
return false;
}

Utilities.CopyFile (assemblyPath, Path.Combine (Configurables.Paths.NetCoreBinDir, "Xamarin.Android.Cecil.Mdb.dll"));

return true;
}

Expand Down
12 changes: 0 additions & 12 deletions build-tools/xaprepare/xaprepare/ThirdPartyNotices/Java.Interop.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ class JavaInterop_External_Dependencies_Group : ThirdPartyNoticeGroup
public override List<ThirdPartyNotice> Notices => new List <ThirdPartyNotice> {
new JavaInterop_xamarin_Java_Interop_TPN (),
new JavaInterop_gityf_crc_TPN (),
new JavaInterop_xamarin_mono_cecil_TPN (),
new JavaInterop_jbevain_mono_linq_expressions_TPN (),
new JavaInterop_mono_csharp_TPN (),
new JavaInterop_mono_LineEditor_TPN (),
Expand Down Expand Up @@ -71,17 +70,6 @@ POSSIBILITY OF SUCH DAMAGE.
}

// git submodules of Java.Interop
class JavaInterop_xamarin_mono_cecil_TPN : ThirdPartyNotice
{
static readonly Uri url = new Uri ("https://github.com/mono/cecil/");
static readonly string licenseFile = Path.Combine (Configurables.Paths.ExternalJavaInteropDir, "external", "cecil", "LICENSE.txt");

public override string LicenseFile => licenseFile;
public override string Name => "mono/cecil";
public override Uri SourceUrl => url;
public override string LicenseText => null;
}

class JavaInterop_jbevain_mono_linq_expressions_TPN : ThirdPartyNotice
{
static readonly Uri url = new Uri ("https://github.com/jbevain/mono.linq.expressions/");
Expand Down
12 changes: 12 additions & 0 deletions build-tools/xaprepare/xaprepare/ThirdPartyNotices/mono.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class mono_External_Dependencies_Group : ThirdPartyNoticeGroup

public override List<ThirdPartyNotice> Notices => new List <ThirdPartyNotice> {
new mono_mono_mono_TPN (),
new mono_mono_cecil_TPN (),
new mono_mono_boringssl_TPN (),
new mono_mono_ikdasm_TPN (),
new mono_mono_ikvm_fork_TPN (),
Expand All @@ -23,6 +24,17 @@ class mono_External_Dependencies_Group : ThirdPartyNoticeGroup
};
}

class mono_mono_cecil_TPN : ThirdPartyNotice
{
static readonly Uri url = new Uri ("https://github.com/mono/cecil/");
static readonly string licenseFile = Path.Combine (Configurables.Paths.MonoSdksTpnPath, "external", "cecil", "LICENSE.txt");

public override string LicenseFile => licenseFile;
public override string Name => "mono/cecil";
public override Uri SourceUrl => url;
public override string LicenseText => null;
}

class mono_mono_mono_TPN : ThirdPartyNotice
{
static readonly Uri url = new Uri ("https://github.com/mono/");
Expand Down
2 changes: 1 addition & 1 deletion external/Java.Interop