protected override async Task <bool> Execute(Context context) { var msbuild = new MSBuildRunner(context); // This needs to be built *after* we copy Java.Interop props or we'll get the wrong Mono.Cecil assembly. string remapAsmRefPath = Path.Combine(Configurables.Paths.BuildToolsDir, "remap-assembly-ref", "remap-assembly-ref.sln"); bool result = await msbuild.Run( projectPath : remapAsmRefPath, logTag : "remap-assembly-ref", binlogName : "build-remap-assembly-ref" ); if (!result) { Log.ErrorLine("Failed to build remap-assembly-ref"); return(false); } string xfTestPath = Path.Combine(BuildPaths.XamarinAndroidSourceRoot, "tests", "Xamarin.Forms-Performance-Integration", "Xamarin.Forms.Performance.Integration.csproj"); return(await msbuild.Run( projectPath : xfTestPath, logTag : "xfperf", arguments : new List <string> { "/t:Restore" }, binlogName : "prepare-restore" )); }
protected override async Task <bool> Execute(Context context) { var nuget = new NuGetRunner(context); if (!await NuGetRestore(nuget, context.XASolutionFile)) { return(false); } Log.StatusLine(); if (!await NuGetRestore(nuget, context.XATestsSolutionFile)) { return(false); } var msbuild = new MSBuildRunner(context); string slnPath = Path.Combine(Configurables.Paths.ExternalDir, "debugger-libs", "debugger-libs.sln"); bool result = await msbuild.Run( projectPath : slnPath, logTag : "debugger-libs-restore", arguments : new List <string> { "/t:Restore" }, binlogName : "prepare-debugger-libs-restore" ); if (!result) { return(false); } return(await ExecuteOSSpecific(context, nuget)); }
async Task <bool> ExecuteOSSpecific(Context context, NuGetRunner nuget) { var msbuild = new MSBuildRunner(context); string javaInteropSolution = Path.Combine(Configurables.Paths.ExternalJavaInteropDir, "Java.Interop.sln"); bool result = await msbuild.Run( projectPath : javaInteropSolution, logTag : "java.interop-restore", arguments : new List <string> { "/t:Restore" }, binlogName : "prepare-java.interop-restore" ); if (!result) { return(false); } result = await NuGetRestore(nuget, javaInteropSolution); if (!result) { return(false); } return(await NuGetRestore(nuget, Configurables.Paths.ExternalXamarinAndroidToolsSln)); }
async Task <bool> Restore(MSBuildRunner msbuild, string csprojPath, string logTag, string binLogName) { return(await msbuild.Run( projectPath : csprojPath, logTag : logTag, arguments : new List <string> { "/t:Restore" }, binlogName : binLogName )); }
async Task <bool> ExecuteOSSpecific(Context context) { var msbuild = new MSBuildRunner(context); string javaInteropSolution = Path.Combine(Configurables.Paths.ExternalJavaInteropDir, "Java.Interop.sln"); return(await msbuild.Run( projectPath : javaInteropSolution, logTag : "java.interop-restore", arguments : new List <string> { "/t:Restore" }, binlogName : "prepare-java.interop-restore" )); }
protected override async Task <bool> Execute(Context context) { var msbuild = new MSBuildRunner(context); string xfTestPath = Path.Combine(BuildPaths.XamarinAndroidSourceRoot, "tests", "Xamarin.Forms-Performance-Integration", "Xamarin.Forms.Performance.Integration.csproj"); return(await msbuild.Run( projectPath : xfTestPath, logTag : "xfperf", arguments : new List <string> { "/t:Restore" }, binlogName : "prepare-restore" )); }
async Task <bool> Restore(MSBuildRunner msbuild, string csprojPath, string logTag, string binLogName, string additionalArgument = null) { var args = new List <string> { "/t:Restore" }; if (additionalArgument != null) { args.Add(additionalArgument); } return(await msbuild.Run( projectPath : csprojPath, logTag : logTag, arguments : args, binlogName : binLogName )); }
public static async Task <bool> BuildRemapRef(Context context, bool haveManagedRuntime, string managedRuntime, bool quiet = false) { if (!quiet) { Log.StatusLine("Building remap-assembly-ref"); } var msbuild = new MSBuildRunner(context); string projectPath = Path.Combine(Configurables.Paths.BuildToolsDir, "remap-assembly-ref", "remap-assembly-ref.csproj"); bool result = await msbuild.Run( projectPath : projectPath, logTag : "remap-assembly-ref", binlogName : "build-remap-assembly-ref" ); if (!result) { Log.ErrorLine("Failed to build remap-assembly-ref"); return(false); } return(true); }
async Task <bool> ConjureXamarinCecilAndRemapRef(Context context, bool haveManagedRuntime, string managedRuntime) { StatusStep(context, "Building remap-assembly-ref"); bool result = await Utilities.BuildRemapRef(context, haveManagedRuntime, managedRuntime, quiet : true); if (!result) { return(false); } var msbuild = new MSBuildRunner(context); StatusStep(context, "Building conjure-xamarin-android-cecil"); string projectPath = Path.Combine(Configurables.Paths.BuildToolsDir, "conjure-xamarin-android-cecil", "conjure-xamarin-android-cecil.csproj"); result = await msbuild.Run( projectPath : projectPath, logTag : "conjure-xamarin-android-cecil", binlogName : "build-conjure-xamarin-android-cecil" ); if (!result) { Log.ErrorLine("Failed to build conjure-xamarin-android-cecil"); return(false); } StatusStep(context, "Conjuring Xamarin.Android.Cecil and Xamari.Android.Cecil.Mdb"); string conjurer = Path.Combine(Configurables.Paths.BuildBinDir, "conjure-xamarin-android-cecil.exe"); string conjurerSourceDir = Configurables.Paths.MonoProfileToolsDir; string conjurerDestDir = Configurables.Paths.BuildBinDir; result = Utilities.RunCommand( haveManagedRuntime ? managedRuntime : conjurer, // command BuildPaths.XamarinAndroidSourceRoot, // workingDirectory true, // ignoreEmptyArguments // arguments haveManagedRuntime ? conjurer : String.Empty, Configurables.Paths.MonoProfileToolsDir, // source dir Configurables.Paths.BuildBinDir // destination dir ); StatusStep(context, "Re-signing Xamarin.Android.Cecil.dll"); var sn = new SnRunner(context); string snkPath = Path.Combine(BuildPaths.XamarinAndroidSourceRoot, "mono.snk"); string assemblyPath = Path.Combine(Configurables.Paths.BuildBinDir, "Xamarin.Android.Cecil.dll"); result = await sn.ReSign(snkPath, assemblyPath, $"sign-xamarin-android-cecil"); if (!result) { Log.ErrorLine("Failed to re-sign Xamarin.Android.Cecil.dll"); return(false); } 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"); if (!result) { Log.ErrorLine("Failed to re-sign Xamarin.Android.Cecil.Mdb.dll"); return(false); } return(true); }