Exemple #1
0
        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));
        }
Exemple #3
0
        async Task <bool> NuGetRestore(NuGetRunner nuget, string solutionFilePath)
        {
            if (!await nuget.Restore(solutionFilePath))
            {
                Log.ErrorLine($"NuGet restore for solution {solutionFilePath} failed");
                return(false);
            }

            return(true);
        }
Exemple #4
0
        async Task <bool> ExecuteOSSpecific(Context context, NuGetRunner nuget)
        {
            Log.StatusLine();
            var make = new MakeRunner(context)
            {
                NoParallelJobs = true
            };

            bool result = await make.Run(
                logTag : "xamarin-android-tools",
                workingDirectory : Path.Combine(Configurables.Paths.ExternalDir, "xamarin-android-tools"),
                arguments : new List <string> {
                "prepare",
                $"CONFIGURATION={context.Configuration}",
            }
                );

            if (!result)
            {
                return(false);
            }

            string javaInteropDir = context.Properties.GetRequiredValue(KnownProperties.JavaInteropFullPath);

            Log.StatusLine();
            result = await make.Run(
                logTag : "java-interop-prepare",
                workingDirectory : javaInteropDir,
                arguments : new List <string> {
                "prepare",
                $"CONFIGURATION={context.Configuration}",
                $"JAVA_HOME={context.OS.JavaHome}",
                $"JI_MAX_JDK={Configurables.Defaults.MaxJDKVersion}",
            }
                );

            if (!result)
            {
                return(false);
            }

            Log.StatusLine();
            result = await make.Run(
                logTag : "java-interop-props",
                workingDirectory : javaInteropDir,
                arguments : new List <string> {
                $"bin/Build{context.Configuration}/JdkInfo.props",
                $"CONFIGURATION={context.Configuration}",
                $"JI_MAX_JDK={Configurables.Defaults.MaxJDKVersion}",
            }
                );

            return(result);
        }
Exemple #5
0
        async Task <bool> ExecuteOSSpecific(Context context, NuGetRunner nuget)
        {
            Log.StatusLine();
            var make = new MakeRunner(context)
            {
                NoParallelJobs = true
            };

            bool result = await make.Run(
                logTag : "xamarin-android-tools",
                workingDirectory : Path.Combine(Configurables.Paths.ExternalDir, "xamarin-android-tools"),
                arguments : new List <string> {
                "prepare",
                $"CONFIGURATION={context.Configuration}",
            }
                );

            if (!result)
            {
                return(false);
            }

            return(result);
        }