Esempio n. 1
0
        private IDependencies CreateFullSourceDependencies()
        {
            var deps = new List <IDependencies>();

            if (project.HasNonEmptySourceSet("cs"))
            {
                deps.Add(sourceSetDependencyFactory.CreateSourceSetDependencies(project.GetSourceSet("cs"),
                                                                                fn => fn.EndsWith(".csproj", StringComparison.InvariantCultureIgnoreCase) ||
                                                                                fn.EndsWith(".csproj.user", StringComparison.InvariantCultureIgnoreCase)));
            }
            if (project.HasNonEmptySourceSet("appconfig"))
            {
                deps.Add(sourceSetDependencyFactory.CreateSourceSetDependencies(project.GetSourceSet("appconfig"), null));
            }
            if (project.HasNonEmptySourceSet("manifest"))
            {
                deps.Add(sourceSetDependencyFactory.CreateSourceSetDependencies(project.GetSourceSet("manifest"), null));
            }
            if (project.HasNonEmptySourceSet("resources"))
            {
                deps.Add(sourceSetDependencyFactory.CreateSourceSetDependencies(project.GetSourceSet("resources"), null));
            }

            return(MultipleDependenciesHelper.CreateMultipleDependencies(new HashSet <IDependencies>(deps)));
        }
Esempio n. 2
0
        private IDependencies CreateDependencies()
        {
            var deps = new List <IDependencies>();

            if (project.HasNonEmptySourceSet("cpp"))
            {
                var filteredSourceSet = project.GetSourceSet("cpp").FilterCppSourceSet(
                    project.RootDirectory.GetChildDirectory("cpp"), suite.SuiteRoot);

                deps.Add(sourceSetDependencyFactory.CreateSourceSetStructureDependency(filteredSourceSet,
                                                                                       fn => fn.EndsWith(".vcxproj", StringComparison.InvariantCultureIgnoreCase) ||
                                                                                       fn.EndsWith(".vcxproj.user", StringComparison.InvariantCultureIgnoreCase)));
            }

            deps.Add(new ProjectPropertiesDependencies(project, "Name", "Type", "EffectiveVersion"));

            VCppATLParametersDependencies.Add(project, deps);
            VCppCLIParametersDependencies.Add(project, deps);
            VCppCompilerParametersDependencies.Add(project, deps);
            VCppLinkerParametersDependencies.Add(project, deps);
            VCppManifestParametersDependencies.Add(project, deps);
            VCppMIDLParametersDependencies.Add(project, deps);

            if (referenceBuilders != null)
            {
                deps.AddRange(referenceBuilders.OfType <IReferenceBuilder>().Select(CreateReferenceDependency));
            }

            //if (appConfigBuilder != null && appConfigBuilder.HasConfigFile)
            //    deps.Add(new SubtaskDependency(appConfigBuilder));

            return(MultipleDependenciesHelper.CreateMultipleDependencies(new HashSet <IDependencies>(deps)));
        }
Esempio n. 3
0
        public PythonScriptedBuilder(Project project, IBuildScript buildScript, ISourceSetFingerprintFactory fingerprintFactory, IProjectBuildScriptRunner scriptRunner)
        {
            this.project      = project;
            this.buildScript  = buildScript;
            this.scriptRunner = scriptRunner;

            dependencies = new Lazy <IDependencies>(() => MultipleDependenciesHelper.CreateMultipleDependencies(
                                                        new HashSet <IDependencies>(new IDependencies[]
            {
                new SourceSetDependencies(fingerprintFactory, project.GetSourceSet(buildScript.SourceSetName)),
                new ScriptDependency(buildScript)
            })));
        }
Esempio n. 4
0
        private IDependencies CreateFullSourceDependencies()
        {
            var deps = new List <IDependencies>();

            if (project.HasNonEmptySourceSet("cpp"))
            {
                var filteredSourceSet = project.GetSourceSet("cpp").FilterCppSourceSet(
                    project.RootDirectory.GetChildDirectory("cpp"), suite.SuiteRoot);

                deps.Add(sourceSetDependencyFactory.CreateSourceSetDependencies(filteredSourceSet,
                                                                                fn => fn.EndsWith(".vcxproj", StringComparison.InvariantCultureIgnoreCase) ||
                                                                                fn.EndsWith(".vcxproj.user", StringComparison.InvariantCultureIgnoreCase)));
            }

            return(MultipleDependenciesHelper.CreateMultipleDependencies(new HashSet <IDependencies>(deps)));
        }
Esempio n. 5
0
        private IDependencies CreateDepenencies()
        {
            var deps = new List <IDependencies>();

            if (project.HasNonEmptySourceSet("fs"))
            {
                deps.Add(sourceSetDependencyFactory.CreateSourceSetStructureDependency(project.GetSourceSet("fs"),
                                                                                       fn => fn.EndsWith(".fsproj", StringComparison.InvariantCultureIgnoreCase) ||
                                                                                       fn.EndsWith(".fsproj.user", StringComparison.InvariantCultureIgnoreCase)));
            }

            deps.Add(new ProjectPropertiesDependencies(project, "Name", "Type", "EffectiveVersion"));

            FsharpParametersDependencies.Add(project, deps);
            FileOrderDependencies.Add(project, deps);

            if (referenceBuilders != null)
            {
                deps.AddRange(referenceBuilders.OfType <IReferenceBuilder>().Select(CreateReferenceDependency));
            }

            return(MultipleDependenciesHelper.CreateMultipleDependencies(new HashSet <IDependencies>(deps)));
        }
Esempio n. 6
0
        /// <summary>
        /// Prepares a builder to be ran in a given build context.
        ///
        /// <para>This is the place where a builder can add additional dependencies.</para>
        /// </summary>
        /// <param name="context">The current build context</param>
        public void AddToContext(IBuildContext context)
        {
            if (!context.Contains(this))
            {
                var solutionBuildContext = new SolutionBuildContext(inSolutionReferenceBuilderFactory, context, this);

                projectBuilders = new HashSet <ISlnProjectBuilder>(
                    from project in projects
                    select CreateProjectBuilder(solutionBuildContext, project)
                    into builder
                    where builder != null
                    select builder
                    );

                solutionBuildContext.AddBuilder(this, projectBuilders);
            }
            else
            {
                projectBuilders = new HashSet <ISlnProjectBuilder>(context.GetDependencies(this).Cast <ISlnProjectBuilder>());
            }

            projectDependencies = MultipleDependenciesHelper.CreateMultipleDependencies(new HashSet <IBuilder>(projectBuilders));
        }
Esempio n. 7
0
        private IDependencies CreateDependencies()
        {
            var deps = new List <IDependencies>();

            if (project.HasNonEmptySourceSet("cs"))
            {
                deps.Add(sourceSetDependencyFactory.CreateSourceSetStructureDependency(project.GetSourceSet("cs"),
                                                                                       fn => fn.EndsWith(".csproj", StringComparison.InvariantCultureIgnoreCase) ||
                                                                                       fn.EndsWith(".csproj.user", StringComparison.InvariantCultureIgnoreCase)));
            }
            if (project.HasNonEmptySourceSet("appconfig"))
            {
                deps.Add(sourceSetDependencyFactory.CreateSourceSetStructureDependency(project.GetSourceSet("appconfig"), null));
            }
            if (project.HasNonEmptySourceSet("manifest"))
            {
                deps.Add(sourceSetDependencyFactory.CreateSourceSetStructureDependency(project.GetSourceSet("manifest"), null));
            }
            if (project.HasNonEmptySourceSet("resources"))
            {
                deps.Add(sourceSetDependencyFactory.CreateSourceSetStructureDependency(project.GetSourceSet("resources"), null));
            }

            deps.Add(new ProjectPropertiesDependencies(project, "Name", "Type", "EffectiveVersion"));

            WPFParametersDependencies.Add(project, deps);
            CsharpParametersDependencies.Add(project, deps);

            if (referenceBuilders != null)
            {
                deps.AddRange(
                    referenceBuilders.Select(
                        (refBuilder, idx) => CreateReferenceDependency(refBuilder, referenceBuilders[idx])));
            }

            return(MultipleDependenciesHelper.CreateMultipleDependencies(new HashSet <IDependencies>(deps)));
        }