No you can’t. First step is to figure out why ‘dependsOnChildren()’ was used in the first place. Then, if no better solution is found for the problem at hand, ‘dependsOnChildren()’ has to be replaced with explicit task dependencies from tasks in the project that has ‘dependsOnChildren’ to equally named tasks in subprojects.
@Deprecated Project dependsOnChildren(boolean evaluateDependsOnProject) Deprecated. To definde task dependencies use Task.dependsOn(Object…) instead. For declaring evaluation dependencies to child projects, use evaluation dependencies use evaluationDependsOnChildren(). Declares that this project has an execution dependency on each of its child projects.
Parameters: evaluateDependsOnProject - If true, adds an evaluation dependency. Returns: this project.
and the description of evaluationDependsOnChildren() Declares that this project has an evaluation dependency on each of its child projects.