Package org.gradle.api.invocation

Examples of org.gradle.api.invocation.Gradle


            File cacheBaseDir;
            Map<String, Object> properties = new HashMap<String, Object>(this.properties);
            if (target == null) {
                cacheBaseDir = globalCacheDir;
            } else if (target instanceof Gradle) {
                Gradle gradle = (Gradle) target;
                cacheBaseDir = new File(gradle.getRootProject().getProjectDir(), Project.TMP_DIR_NAME);
            } else if (target instanceof File) {
                File dir = (File) target;
                cacheBaseDir = new File(dir, Project.TMP_DIR_NAME);
            } else {
                throw new IllegalArgumentException(String.format("Cannot create cache for unrecognised domain object %s.", target));
View Full Code Here


        }
        currentTask = null;
    }

    private String getDisplayName(Task task) {
        Gradle build = task.getProject().getGradle();
        if (build.getParent() == null) {
            // The main build, use the task path
            return task.getPath();
        }
        // A nested build, use a discriminator
        return Project.PATH_SEPARATOR + build.getRootProject().getName() + task.getPath();
    }
View Full Code Here

        }
        if (scope == null) {
            return getCacheDir(globalCacheDir, versionStrategy, key);
        }
        if (scope instanceof Gradle) {
            Gradle gradle = (Gradle) scope;
            return getCacheDir(getBuildCacheDir(gradle.getRootProject()), versionStrategy, key);
        }
        if (scope instanceof Project) {
            Project project = (Project) scope;
            return getCacheDir(getBuildCacheDir(project.getRootProject()), versionStrategy, String.format("projects/%s/%s", project.getPath().replace(':', '_'), key));
        }
View Full Code Here

        String taskMessage = state.getFailure() != null ? "FAILED" : state.getSkipMessage();
        currentTask.completed(taskMessage);
    }

    private String getDisplayName(Task task) {
        Gradle build = task.getProject().getGradle();
        if (build.getParent() == null) {
            // The main build, use the task path
            return task.getPath();
        }
        // A nested build, use a discriminator
        return Project.PATH_SEPARATOR + build.getRootProject().getName() + task.getPath();
    }
View Full Code Here

TOP

Related Classes of org.gradle.api.invocation.Gradle

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.