Examples of BinaryContainer


Examples of org.gradle.platform.base.BinaryContainer

            this.binaryType = binaryType;
            this.modelRegistry = modelRegistry;
        }

        public void mutate(TaskContainer container, Inputs inputs) {
            BinaryContainer binaries = inputs.get(0, ModelType.of(BinaryContainer.class)).getInstance();
            for (T binary : binaries.withType(binaryType)) {
                NamedEntityInstantiator<Task> instantiator = new Instantiator<Task>(binary, container);
                DefaultCollectionBuilder<Task> collectionBuilder = new DefaultCollectionBuilder<Task>(
                        getSubject().getPath(),
                        instantiator,
                        new SimpleModelRuleDescriptor("Project.<init>.tasks()"),
View Full Code Here

Examples of org.gradle.platform.base.BinaryContainer

        public RegistrationAction(Instantiator instantiator) {
            this.instantiator = instantiator;
        }

        public void execute(RegistrationContext<BinarySpec, BaseBinarySpec> context) {
            BinaryContainer binaries = context.getExtensions().getByType(BinaryContainer.class);
            doRegister(binaries, context.getType(), context.getImplementation());
        }
View Full Code Here

Examples of org.gradle.platform.base.BinaryContainer

        ProjectSourceSet sourceSets = project.getExtensions().findByType(ProjectSourceSet.class);
        if (sourceSets != null) {
            renderer.renderSourceSets(sourceSets);
        }
        BinaryContainer binaries = project.getExtensions().findByType(BinaryContainer.class);
        if (binaries != null) {
            renderer.renderBinaries(binaries);
        }

        renderer.completeProject(project);
View Full Code Here

Examples of org.gradle.platform.base.BinaryContainer

    }

    public void apply(final Project target) {

        target.apply(Collections.singletonMap("plugin", LanguageBasePlugin.class));
        BinaryContainer binaryContainer = target.getExtensions().getByType(BinaryContainer.class);
        binaryContainer.registerFactory(ClassDirectoryBinarySpec.class, new NamedDomainObjectFactory<ClassDirectoryBinarySpec>() {
            public ClassDirectoryBinarySpec create(String name) {
                return instantiator.newInstance(DefaultClassDirectoryBinarySpec.class, name, toolChain, new DefaultJavaPlatform(JavaVersion.current()));
            }
        });

        binaryContainer.withType(ClassDirectoryBinarySpecInternal.class).all(new Action<ClassDirectoryBinarySpecInternal>() {
            public void execute(ClassDirectoryBinarySpecInternal binary) {
                createBinaryLifecycleTask(binary, target);
                setClassesDirConvention(binary, target);
                createProcessResourcesTaskForBinary(binary, target);
                createCompileJavaTaskForBinary(binary, target);
View Full Code Here

Examples of org.gradle.platform.base.BinaryContainer

                DefaultJavaSourceSet javaSourceSet = instantiator.newInstance(DefaultJavaSourceSet.class, "java", sourceSet.getJava(), compileClasspath, functionalSourceSet);
                functionalSourceSet.add(javaSourceSet);
                JvmResourceSet resourceSet = instantiator.newInstance(DefaultJvmResourceSet.class, "resources", sourceSet.getResources(), functionalSourceSet);
                functionalSourceSet.add(resourceSet);

                BinaryContainer binaryContainer = project.getExtensions().getByType(BinaryContainer.class);
                ClassDirectoryBinarySpec binary = binaryContainer.create(String.format("%sClasses", sourceSet.getName()), ClassDirectoryBinarySpec.class);
                ConventionMapping conventionMapping = new DslObject(binary).getConventionMapping();
                conventionMapping.map("classesDir", new Callable<File>() {
                    public File call() throws Exception {
                        return sourceSet.getOutput().getClassesDir();
                    }
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.