Package org.gradle.api.artifacts

Examples of org.gradle.api.artifacts.ClientModule


        }
        if (dependency == null || getClass() != dependency.getClass()) {
            return false;
        }

        ClientModule that = (ClientModule) dependency;
        if (!isContentEqualsFor(that)) {
            return false;
        }

        return dependencies.equals(that.getDependencies());
    }
View Full Code Here


        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }

        ClientModule that = (ClientModule) o;

        return isKeyEquals(that);
    }
View Full Code Here

        }
        return dependency;
    }

    public ClientModule createModule(Object dependencyNotation, Closure configureClosure) {
        ClientModule clientModule = clientModuleFactory.createDependency(ClientModule.class, dependencyNotation);
        ModuleFactoryDelegate moduleFactoryDelegate = new ModuleFactoryDelegate(clientModule, this);
        moduleFactoryDelegate.prepareDelegation(configureClosure);
        if (configureClosure != null) {
            configureClosure.call();
        }
View Full Code Here

    @Test
    public void module() {
        final String clientModuleNotation = "someNotation";
        final Closure configureClosure = HelperUtil.toClosure("{}");
        final ClientModule clientModuleDummy = context.mock(ClientModule.class);
        context.checking(new Expectations() {{
            allowing(dependencyFactoryStub).createModule(clientModuleNotation, configureClosure);
            will(returnValue(clientModuleDummy));
        }});
        moduleFactoryDelegate.module(clientModuleNotation, configureClosure);
View Full Code Here

    @Test
    public void createModule() {
        final IDependencyImplementationFactory testImplStringFactoryStub = context.mock(IDependencyImplementationFactory.class, "String");
        final IDependencyImplementationFactory clientModuleFactoryStub = context.mock(IDependencyImplementationFactory.class);
        final ClientModule clientModuleMock = context.mock(ClientModule.class);
        DefaultDependencyFactory dependencyFactory = new DefaultDependencyFactory(WrapUtil.toSet(testImplStringFactoryStub), clientModuleFactoryStub, null);
        final String someNotation1 = "someNotation1";
        final String someNotation2 = "someNotation2";
        final String someNotation3 = "someNotation3";
        final String someNotation4 = "someNotation4";
View Full Code Here

    @Test
    public void createModuleWithNullClosure() {
        final IDependencyImplementationFactory testImplStringFactoryStub = context.mock(IDependencyImplementationFactory.class, "String");
        final IDependencyImplementationFactory clientModuleFactoryStub = context.mock(IDependencyImplementationFactory.class);
        final ClientModule clientModuleMock = context.mock(ClientModule.class);
        DefaultDependencyFactory dependencyFactory = new DefaultDependencyFactory(WrapUtil.toSet(testImplStringFactoryStub), clientModuleFactoryStub, null);

        final String someModuleNotation = "junit:junit:4.4";
        context.checking(new Expectations() {{
            allowing(clientModuleFactoryStub).createDependency(ClientModule.class, someModuleNotation);
View Full Code Here

        assertFalse(dependencyDescriptor.isChanging());
    }

    @Test
    public void testAddWithNullGroupAndNullVersionShouldHaveEmptyStringModuleRevisionValues() {
        ClientModule clientModule = new DefaultClientModule(null, "gradle-core", null, TEST_DEP_CONF);
        final ModuleRevisionId testModuleRevisionId = IvyUtil.createModuleRevisionId(
                clientModule, WrapUtil.toMap(ClientModule.CLIENT_MODULE_KEY, clientModule.getId()));
        context.checking(new Expectations() {{
            allowing(moduleDescriptorFactoryForClientModule).createModuleDescriptor(
                    testModuleRevisionId,
                    WrapUtil.<ModuleDependency>toSet()
            );
View Full Code Here

    public Dependency createDependency(Object dependencyNotation) {
        return dependencyNotationParser.parseNotation(dependencyNotation);
    }

    public ClientModule createModule(Object dependencyNotation, Closure configureClosure) {
        ClientModule clientModule = clientModuleNotationParser.parseNotation(dependencyNotation);
        ModuleFactoryDelegate moduleFactoryDelegate = new ModuleFactoryDelegate(clientModule, this);
        moduleFactoryDelegate.prepareDelegation(configureClosure);
        if (configureClosure != null) {
            configureClosure.call();
        }
View Full Code Here

            return;
        }
        if (dependency instanceof DslOriginDependencyMetaData) {
            ModuleDependency maybeClientModule = ((DslOriginDependencyMetaData) dependency).getSource();
            if (maybeClientModule instanceof ClientModule) {
                ClientModule clientModule = (ClientModule) maybeClientModule;

                MutableModuleComponentResolveMetaData clientModuleMetaData = ((MutableModuleComponentResolveMetaData)result.getMetaData()).copy();
                addClientModuleDependencies(clientModule, clientModuleMetaData);

                setClientModuleArtifact(clientModuleMetaData);
View Full Code Here

    @Test
    public void module() {
        final String clientModuleNotation = "someNotation";
        final Closure configureClosure = TestUtil.toClosure("{}");
        final ClientModule clientModuleDummy = context.mock(ClientModule.class);
        context.checking(new Expectations() {{
            allowing(dependencyFactoryStub).createModule(clientModuleNotation, configureClosure);
            will(returnValue(clientModuleDummy));
        }});
        moduleFactoryDelegate.module(clientModuleNotation, configureClosure);
View Full Code Here

TOP

Related Classes of org.gradle.api.artifacts.ClientModule

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.