Package org.gradle.platform.base.internal

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


        this.sources = sources;
        this.project = project;
    }

    public NativeExecutableSpec create(String name) {
        ComponentSpecIdentifier id = new DefaultComponentSpecIdentifier(project.getPath(), name);
        return instantiator.newInstance(DefaultNativeExecutableSpec.class, id, sources.maybeCreate(name));
    }
View Full Code Here


        this.sources = sources;
        this.project = project;
    }

    public NativeLibrarySpec create(String name) {
        ComponentSpecIdentifier id = new DefaultComponentSpecIdentifier(project.getPath(), name);
        return instantiator.newInstance(DefaultNativeLibrarySpec.class, id, sources.maybeCreate(name));
    }
View Full Code Here

        private <T extends ComponentSpec, I extends BaseComponentSpec> void doRegister(final ModelType<T> type, final ModelType<I> implementation, final ProjectSourceSet projectSourceSet, ComponentSpecContainer componentSpecs, final ProjectIdentifier projectIdentifier) {
            componentSpecs.registerFactory(type.getConcreteClass(), new NamedDomainObjectFactory<T>() {
                public T create(String name) {
                    FunctionalSourceSet componentSourceSet = projectSourceSet.maybeCreate(name);
                    ComponentSpecIdentifier id = new DefaultComponentSpecIdentifier(projectIdentifier.getPath(), name);

                    // safe because we implicitly know that U extends V, but can't express this in the type system
                    @SuppressWarnings("unchecked")
                    T created = (T) BaseComponentSpec.create(implementation.getConcreteClass(), id, componentSourceSet, instantiator);
View Full Code Here

        }

        private CUnitTestSuiteSpec createCUnitTestSuite(final NativeComponentSpec testedComponent, Instantiator instantiator, ProjectSourceSet projectSourceSet) {
            String suiteName = String.format("%sTest", testedComponent.getName());
            String path = testedComponent.getProjectPath();
            ComponentSpecIdentifier id = new DefaultComponentSpecIdentifier(path, suiteName);
            FunctionalSourceSet testSuiteSourceSet = projectSourceSet.maybeCreate(suiteName);
            return instantiator.newInstance(DefaultCUnitTestSuiteSpec.class, id, testedComponent, testSuiteSourceSet);
        }
View Full Code Here

TOP

Related Classes of org.gradle.platform.base.internal.DefaultComponentSpecIdentifier

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.