use of org.gradle.internal.component.external.descriptor.MutableModuleDescriptorState in project gradle by gradle.
the class GradlePomModuleDescriptorBuilder method setModuleRevId.
public void setModuleRevId(String group, String module, String version) {
String effectiveVersion = version;
if (version != null) {
Matcher matcher = TIMESTAMP_PATTERN.matcher(version);
if (matcher.matches()) {
effectiveVersion = matcher.group(1) + "-SNAPSHOT";
}
}
String status = effectiveVersion != null && effectiveVersion.endsWith("SNAPSHOT") ? "integration" : "release";
descriptor = new MutableModuleDescriptorState(DefaultModuleComponentIdentifier.newId(group, module, effectiveVersion), status, false);
}
use of org.gradle.internal.component.external.descriptor.MutableModuleDescriptorState in project gradle by gradle.
the class IvyModuleDescriptorConverter method forIvyModuleDescriptor.
public ModuleDescriptorState forIvyModuleDescriptor(ModuleDescriptor ivyDescriptor) {
ModuleRevisionId moduleRevisionId = ivyDescriptor.getModuleRevisionId();
ModuleComponentIdentifier componentIdentifier = DefaultModuleComponentIdentifier.newId(moduleRevisionId.getOrganisation(), moduleRevisionId.getName(), moduleRevisionId.getRevision());
MutableModuleDescriptorState state = new MutableModuleDescriptorState(componentIdentifier, ivyDescriptor.getStatus(), ivyDescriptor.isDefault());
state.setBranch(moduleRevisionId.getBranch());
state.setDescription(ivyDescriptor.getDescription());
state.setPublicationDate(ivyDescriptor.getPublicationDate());
Map<NamespaceId, String> extraInfo = Cast.uncheckedCast(ivyDescriptor.getExtraInfo());
state.getExtraInfo().putAll(extraInfo);
for (ExcludeRule excludeRule : ivyDescriptor.getAllExcludeRules()) {
addExcludeRule(state, excludeRule);
}
return state;
}
Aggregations