Main Content

updateDependencies

Update project dependencies

Description

example

updateDependencies(proj) runs a dependency analysis on the specified project to update the known dependencies between project files. After the first dependency analysis, running updateDependencies incrementally updates the results.

example

updateDependencies(proj,ReanalyzeAll=tf) reanalyzes all files in the project and performs a complete dependency analysis.

Examples

collapse all

Open the Times Table App project. Use currentProject to create a project object from the currently loaded project.

openExample("matlab/TimesTableProjectExample")
proj = currentProject;

Update the project dependencies. By default, updateDependencies performs an incremental dependency analysis. For information on reanalyzing all files and performing a complete dependency analysis, see Reanalyze All Project Dependencies.

updateDependencies(proj);

Get the files required by the timestable.mlapp project file.

g = proj.Dependencies;
requiredFiles = bfsearch(g,which("source/timestable.mlapp"))
requiredFiles =

  2×1 cell array

    {'C:\myProjects\examples\TimesTableApp\source\timestable.mlapp'}
    {'C:\myProjects\examples\TimesTableApp\source\timesTableGame.m'}

Open the Times Table App project. Use currentProject to create a project object from the currently loaded project.

openExample("matlab/TimesTableProjectExample")
proj = currentProject;

Reanalyze all files and perform a complete dependency analysis on your project.

updateDependencies(proj,ReanalyzeAll=true);

Input Arguments

collapse all

Project, specified as a matlab.project.Project object. Use currentProject to create a project object from the currently loaded project.

True or false, specified as a numeric or logical 1 (true) or 0 (false).

Version History

Introduced in R2019a

expand all