예제 #1
0
        public virtual void BuildSolution()
        {
            if (!BuildsOnCurrentPlatform)
            {
                CakeContext.Information("Solution is not configured to build on this platform: {0}", SolutionPath);
                return;
            }

            if (PreBuildAction != null)
            {
                PreBuildAction();
            }

            if (RestoreComponents)
            {
                CakeContext.RestoreComponents(SolutionPath, new XamarinComponentRestoreSettings());
            }

            CakeContext.NuGetRestore(SolutionPath, new NuGetRestoreSettings {
                Source = BuildSpec.NuGetSources.Select(s => s.Url).ToList()
            });

            RunBuild(SolutionPath);

            if (PostBuildAction != null)
            {
                PostBuildAction();
            }
        }