Examples of BinarySpecInternal


Examples of org.gradle.platform.base.internal.BinarySpecInternal

    public CreateSourceTransformTask(LanguageRegistration<?> languageRegistration) {
        this.language = languageRegistration;
    }

    public void createCompileTasksForBinary(final TaskContainer tasks, BinarySpec binarySpec) {
        final BinarySpecInternal binary = (BinarySpecInternal) binarySpec;
        if (binary.isLegacyBinary() || !language.applyToBinary(binary)) {
            return;
        }

        final SourceTransformTaskConfig taskConfig = language.getTransformTask();
        binary.getSource().withType(language.getSourceSetType(), new Action<LanguageSourceSet>() {
            public void execute(LanguageSourceSet languageSourceSet) {
                LanguageSourceSetInternal sourceSet = (LanguageSourceSetInternal) languageSourceSet;
                if (sourceSet.getMayHaveSources()) {
                    String taskName = taskConfig.getTaskPrefix() + capitalize(binary.getName()) + capitalize(sourceSet.getFullName());
                    Task task = tasks.create(taskName, taskConfig.getTaskType());

                    taskConfig.configureTask(task, binary, sourceSet);

                    task.dependsOn(sourceSet);
                    binary.getTasks().add(task);
                }
            }
        });
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.