Package org.netbeans.gradle.project.api.task

Examples of org.netbeans.gradle.project.api.task.GradleTargetVerifier


            ProjectConnection projectConnection,
            GradleTaskDef taskDef,
            GradleModelLoader.ModelBuilderSetup targetSetup,
            InputOutputWrapper io) {

        GradleTargetVerifier targetVerifier = taskDef.getGradleTargetVerifier();
        if (targetVerifier == null) {
            return true;
        }

        ModelBuilder<BuildEnvironment> envGetter = projectConnection.model(BuildEnvironment.class);
        GradleModelLoader.setupLongRunningOP(targetSetup, envGetter);

        BuildEnvironment buildEnv = envGetter.get();

        GradleTarget gradleTarget = new GradleTarget(
                    targetSetup.getJDKVersion(),
                    GradleVersion.version(buildEnv.getGradle().getGradleVersion()));

        return targetVerifier.checkTaskExecutable(gradleTarget, io.getOutRef(), io.getErrRef());
    }
View Full Code Here


            CustomCommandActions customActions) {

        ContextAwareGradleTargetVerifier contextAwareVerifier
                = customActions.getContextAwareGradleTargetVerifier();

        final GradleTargetVerifier verifier1 = contextAwareVerifier != null
                ? contextAwareVerifier.startCommand(project, actionContext)
                : null;
        final GradleTargetVerifier verifier2 = customActions.getGradleTargetVerifier();

        if (verifier1 == null) return verifier2;
        if (verifier2 == null) return verifier1;

        return new GradleTargetVerifier() {
            @Override
            public boolean checkTaskExecutable(
                    GradleTarget gradleTarget,
                    OutputWriter output,
                    OutputWriter errOutput) {
                return verifier1.checkTaskExecutable(gradleTarget, output, errOutput)
                        && verifier2.checkTaskExecutable(gradleTarget, output, errOutput);
            }
        };
    }
View Full Code Here

        final GradleVersion minGradleVersion = GradleVersion.version(minGradleVersionStr);

        return new CustomCommandAdjuster() {
            @Override
            public void adjust(JavaExtension javaExt, CustomCommandActions.Builder customActions) {
                customActions.setGradleTargetVerifier(new GradleTargetVerifier() {
                    @Override
                    public boolean checkTaskExecutable(
                            GradleTarget gradleTarget,
                            OutputWriter output,
                            OutputWriter errOutput) {
View Full Code Here

TOP

Related Classes of org.netbeans.gradle.project.api.task.GradleTargetVerifier

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.