Exemplo n.º 1
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);
        }
        async Task <bool> ExecuteOSSpecific(Context context)
        {
            string javaInteropDir = context.Properties.GetRequiredValue(KnownProperties.JavaInteropFullPath);
            var    dotnetPath     = context.Properties.GetRequiredValue(KnownProperties.DotNetPreviewPath);
            var    dotnetTool     = Path.Combine(dotnetPath, "dotnet");

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

            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}",
                $"DOTNET_TOOL_PATH={dotnetTool}"
            }
                );

            return(result);
        }
Exemplo n.º 3
0
        async Task <bool> ExecuteOSSpecific(Context context)
        {
            Log.StatusLine();
            var make = new MakeRunner(context)
            {
                NoParallelJobs = true
            };

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

            bool result = await make.Run(
                logTag : "mono-runtimes",
                workingDirectory : GetWorkingDirectory(context),
                arguments : makeArguments
                );

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

            Utilities.SaveAbiChoice(context);

            return(true);
        }