Java Code Examples for org.gradle.api.internal.project.ProjectInternal#evaluate()

The following examples show how to use org.gradle.api.internal.project.ProjectInternal#evaluate() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DefaultProjectLocator.java    From pushfish-android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public ProjectInternal locateProject(String path) {
    if (path == null || path.length() == 0) {
        return delegate.getProject(projectPath);
    }

    ProjectInternal referencedProject = delegate.getProject(path);
    // TODO This is a brain-dead way to ensure that the reference project's model is ready to access
    referencedProject.evaluate();
    return referencedProject;
}
 
Example 2
Source File: TaskPathProjectEvaluator.java    From pushfish-android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public void configureHierarchy(ProjectInternal project) {
    if (cancellationToken.isCancellationRequested()) {
        throw new BuildCancelledException();
    }
    project.evaluate();
    for (Project sub : project.getSubprojects()) {
        if (cancellationToken.isCancellationRequested()) {
            throw new BuildCancelledException();
        }
        ((ProjectInternal) sub).evaluate();
    }
}
 
Example 3
Source File: DefaultProjectLocator.java    From pushfish-android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public ProjectInternal locateProject(String path) {
    if (path == null || path.length() == 0) {
        return delegate.getProject(projectPath);
    }

    ProjectInternal referencedProject = delegate.getProject(path);
    // TODO:DAZ This is a brain-dead way to ensure that the reference project's model is ready to access
    referencedProject.evaluate();
    return referencedProject;
}
 
Example 4
Source File: TaskPathProjectEvaluator.java    From pushfish-android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public void evaluateByPath(ProjectInternal project, String path) {
    ResolvedTaskPath taskPath = taskPathResolver.resolvePath(path, project);
    if (taskPath.isQualified()) {
        taskPath.getProject().evaluate();
    } else {
        project.evaluate();
        for (Project sub : project.getSubprojects()) {
            ((ProjectInternal) sub).evaluate();
        }
    }
}
 
Example 5
Source File: ProjectEvaluatingAction.java    From pushfish-android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public void configure(BuildExecutionContext context) {
    StartParameter param = context.getGradle().getStartParameter();
    List<String> taskNames = param.getTaskNames();
    ProjectInternal project = context.getGradle().getDefaultProject();

    if (param.getTaskNames().isEmpty()) {
        //so that we don't miss out default tasks
        project.evaluate();
    }

    for (String path : taskNames) {
        evaluator.evaluateByPath(project, path);
    }
    context.proceed();
}
 
Example 6
Source File: DefaultProjectLocator.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public ProjectInternal locateProject(String path) {
    if (path == null || path.length() == 0) {
        return delegate.getProject(projectPath);
    }

    ProjectInternal referencedProject = delegate.getProject(path);
    // TODO This is a brain-dead way to ensure that the reference project's model is ready to access
    referencedProject.evaluate();
    return referencedProject;
}
 
Example 7
Source File: TaskPathProjectEvaluator.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public void configureHierarchy(ProjectInternal project) {
    if (cancellationToken.isCancellationRequested()) {
        throw new BuildCancelledException();
    }
    project.evaluate();
    for (Project sub : project.getSubprojects()) {
        if (cancellationToken.isCancellationRequested()) {
            throw new BuildCancelledException();
        }
        ((ProjectInternal) sub).evaluate();
    }
}
 
Example 8
Source File: DefaultProjectLocator.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public ProjectInternal locateProject(String path) {
    if (path == null || path.length() == 0) {
        return delegate.getProject(projectPath);
    }

    ProjectInternal referencedProject = delegate.getProject(path);
    // TODO:DAZ This is a brain-dead way to ensure that the reference project's model is ready to access
    referencedProject.evaluate();
    return referencedProject;
}
 
Example 9
Source File: TaskPathProjectEvaluator.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public void evaluateByPath(ProjectInternal project, String path) {
    ResolvedTaskPath taskPath = taskPathResolver.resolvePath(path, project);
    if (taskPath.isQualified()) {
        taskPath.getProject().evaluate();
    } else {
        project.evaluate();
        for (Project sub : project.getSubprojects()) {
            ((ProjectInternal) sub).evaluate();
        }
    }
}
 
Example 10
Source File: ProjectEvaluatingAction.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public void configure(BuildExecutionContext context) {
    StartParameter param = context.getGradle().getStartParameter();
    List<String> taskNames = param.getTaskNames();
    ProjectInternal project = context.getGradle().getDefaultProject();

    if (param.getTaskNames().isEmpty()) {
        //so that we don't miss out default tasks
        project.evaluate();
    }

    for (String path : taskNames) {
        evaluator.evaluateByPath(project, path);
    }
    context.proceed();
}
 
Example 11
Source File: TaskPathProjectEvaluator.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public void configure(ProjectInternal project) {
    if (cancellationToken.isCancellationRequested()) {
        throw new BuildCancelledException();
    }
    project.evaluate();
}
 
Example 12
Source File: TaskPathProjectEvaluator.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public void configure(ProjectInternal project) {
    if (cancellationToken.isCancellationRequested()) {
        throw new BuildCancelledException();
    }
    project.evaluate();
}