Package org.gradle.internal.component.external.model

Examples of org.gradle.internal.component.external.model.MutableModuleComponentResolveMetaData


        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);

                result.setMetaData(clientModuleMetaData);
View Full Code Here


                .validInFileName();
        IvyFieldValidator revision = field(publication, "revision", identity.getRevision())
                .notEmpty()
                .validInFileName();

        MutableModuleComponentResolveMetaData metadata = parseIvyFile(publication);
        ModuleVersionIdentifier moduleId = metadata.getId();
        organisation.matches(moduleId.getGroup());
        moduleName.matches(moduleId.getName());
        revision.matches(moduleId.getVersion());

        field(publication, "branch", metadata.getDescriptor().getModuleRevisionId().getBranch())
                .optionalNotEmpty()
                .doesNotContainSpecialCharacters(true);

        field(publication, "status", metadata.getStatus())
                .optionalNotEmpty()
                .validInFileName();
    }
View Full Code Here

                result.missing();
                // When age == 0, verified since the start of this build, assume still missing
                result.setAuthoritative(cachedMetaData.getAgeMillis() == 0);
                return;
            }
            MutableModuleComponentResolveMetaData metaData = cachedMetaData.getMetaData();
            metadataProcessor.processMetadata(metaData);
            if (dependency.isChanging() || metaData.isChanging()) {
                if (cachePolicy.mustRefreshChangingModule(moduleComponentIdentifier, cachedMetaData.getModuleVersion(), cachedMetaData.getAgeMillis())) {
                    LOGGER.debug("Cached meta-data for changing module is expired: will perform fresh resolve of '{}' in '{}'", moduleComponentIdentifier, delegate.getName());
                    return;
                }
                LOGGER.debug("Found cached version of changing module '{}' in '{}'", moduleComponentIdentifier, delegate.getName());
            } else {
                if (cachePolicy.mustRefreshModule(moduleComponentIdentifier, cachedMetaData.getModuleVersion(), cachedMetaData.getAgeMillis())) {
                    LOGGER.debug("Cached meta-data for module must be refreshed: will perform fresh resolve of '{}' in '{}'", moduleComponentIdentifier, delegate.getName());
                    return;
                }
            }

            LOGGER.debug("Using cached module metadata for module '{}' in '{}'", moduleComponentIdentifier, delegate.getName());
            metaData.setSource(new CachingModuleSource(cachedMetaData.getDescriptorHash(), metaData.isChanging(), metaData.getSource()));
            result.resolved(metaData);
            // When age == 0, verified since the start of this build, assume the meta-data hasn't changed
            result.setAuthoritative(cachedMetaData.getAgeMillis() == 0);
        }
View Full Code Here

            switch (result.getState()) {
                case Missing:
                    moduleMetaDataCache.cacheMissing(delegate, moduleComponentIdentifier);
                    break;
                case Resolved:
                    MutableModuleComponentResolveMetaData metaData = result.getMetaData();
                    ModuleSource moduleSource = metaData.getSource();
                    ModuleMetaDataCache.CachedMetaData cachedMetaData = moduleMetaDataCache.cacheMetaData(delegate, metaData);
                    metadataProcessor.processMetadata(metaData);
                    moduleSource = new CachingModuleSource(cachedMetaData.getDescriptorHash(), dependency.isChanging() || metaData.isChanging(), moduleSource);
                    metaData.setSource(moduleSource);
                    result.resolved(metaData);
                    break;
                case Failed:
                    break;
                default:
View Full Code Here

    }

    public void supply(BuildableModuleComponentMetaDataResolveResult result) {
        assert isCacheable() : "Results are not cacheable, cannot supply the results.";
        if (state == Resolved) {
            MutableModuleComponentResolveMetaData metaData = this.metaData.copy();
            result.resolved(metaData);
            result.setAuthoritative(authoritative);
        } else if (state == Missing) {
            result.missing();
            result.setAuthoritative(authoritative);
View Full Code Here

            transformDependencies(result);
        }
    }

    private void transformDependencies(BuildableModuleComponentMetaDataResolveResult result) {
        MutableModuleComponentResolveMetaData metaData = result.getMetaData();
        List<DependencyMetaData> transformed = new ArrayList<DependencyMetaData>();
        for (DependencyMetaData dependency : metaData.getDependencies()) {
            transformed.add(dependency.withRequestedVersion(dependency.getDescriptor().getDynamicConstraintDependencyRevisionId().getRevision()));
        }
        metaData.setDependencies(transformed);
    }
View Full Code Here

    }

    @Override
    @Nullable
    protected MutableModuleComponentResolveMetaData parseMetaDataFromArtifact(ModuleComponentIdentifier moduleComponentIdentifier, ExternalResourceArtifactResolver artifactResolver, ResourceAwareResolveResult result) {
        MutableModuleComponentResolveMetaData metaData = super.parseMetaDataFromArtifact(moduleComponentIdentifier, artifactResolver, result);
        if (metaData == null) {
            return null;
        }

        if (isOrphanedPom(mavenMetaData(metaData), artifactResolver)) {
View Full Code Here

TOP

Related Classes of org.gradle.internal.component.external.model.MutableModuleComponentResolveMetaData

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.