org.gradle.api.internal.artifacts.dsl.ParsedModuleStringNotation Java Examples
The following examples show how to use
org.gradle.api.internal.artifacts.dsl.ParsedModuleStringNotation.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DependencyStringNotationParser.java From pushfish-android with BSD 2-Clause "Simplified" License | 5 votes |
private T createDependencyFromString(String notation) { ParsedModuleStringNotation parsedNotation = splitModuleFromExtension(notation); T moduleDependency = instantiator.newInstance(wantedType, parsedNotation.getGroup(), parsedNotation.getName(), parsedNotation.getVersion()); ModuleFactoryHelper.addExplicitArtifactsIfDefined(moduleDependency, parsedNotation.getArtifactType(), parsedNotation.getClassifier()); return moduleDependency; }
Example #2
Source File: DependencyStringNotationParser.java From pushfish-android with BSD 2-Clause "Simplified" License | 5 votes |
private ParsedModuleStringNotation splitModuleFromExtension(String notation) { Matcher matcher = EXTENSION_SPLITTER.matcher(notation); boolean hasArtifactType = matcher.matches(); if (hasArtifactType && !ClientModule.class.isAssignableFrom(wantedType)) { if (matcher.groupCount() != 2) { throw new InvalidUserDataException("The dependency notation " + notation + " is invalid"); } return new ParsedModuleStringNotation(matcher.group(1), matcher.group(2)); } return new ParsedModuleStringNotation(notation, null); }
Example #3
Source File: DependencyStringNotationParser.java From pushfish-android with BSD 2-Clause "Simplified" License | 5 votes |
private T createDependencyFromString(String notation) { ParsedModuleStringNotation parsedNotation = splitModuleFromExtension(notation); T moduleDependency = instantiator.newInstance(wantedType, parsedNotation.getGroup(), parsedNotation.getName(), parsedNotation.getVersion()); ModuleFactoryHelper.addExplicitArtifactsIfDefined(moduleDependency, parsedNotation.getArtifactType(), parsedNotation.getClassifier()); return moduleDependency; }
Example #4
Source File: DependencyStringNotationParser.java From pushfish-android with BSD 2-Clause "Simplified" License | 5 votes |
private ParsedModuleStringNotation splitModuleFromExtension(String notation) { Matcher matcher = EXTENSION_SPLITTER.matcher(notation); boolean hasArtifactType = matcher.matches(); if (hasArtifactType && !ClientModule.class.isAssignableFrom(wantedType)) { if (matcher.groupCount() != 2) { throw new InvalidUserDataException("The dependency notation " + notation + " is invalid"); } return new ParsedModuleStringNotation(matcher.group(1), matcher.group(2)); } return new ParsedModuleStringNotation(notation, null); }
Example #5
Source File: ApDependency.java From atlas with Apache License 2.0 | 5 votes |
private Map<ModuleIdentifier, String> getAwbDependencies(String awb) { ParsedModuleStringNotation parsedNotation = new ParsedModuleStringNotation(awb,"awb"); String group = parsedNotation.getGroup(); String name = parsedNotation.getName(); ModuleIdentifier moduleIdentifier = DefaultModuleIdentifier.newId(group, name); Map<ModuleIdentifier, String> awbDependencies = mAwbDependenciesMap.get(moduleIdentifier); if (awbDependencies == null) { awbDependencies = Maps.newHashMap(); mAwbDependenciesMap.put(moduleIdentifier, awbDependencies); } return awbDependencies; }
Example #6
Source File: ApDependency.java From atlas with Apache License 2.0 | 5 votes |
private void addDependency(String dependencyString, Map<ModuleIdentifier, String> awb) { ParsedModuleStringNotation parsedNotation = new ParsedModuleStringNotation(dependencyString,dependencyString.split("@")[1]); ModuleIdentifier moduleIdentifier = DefaultModuleIdentifier.newId(parsedNotation.getGroup(), parsedNotation.getName()); String version = parsedNotation.getVersion(); awb.put(moduleIdentifier, version); mFlatDependenciesMap.put(moduleIdentifier, version); }
Example #7
Source File: DependencyStringNotationParser.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 5 votes |
private T createDependencyFromString(String notation) { ParsedModuleStringNotation parsedNotation = splitModuleFromExtension(notation); T moduleDependency = instantiator.newInstance(wantedType, parsedNotation.getGroup(), parsedNotation.getName(), parsedNotation.getVersion()); ModuleFactoryHelper.addExplicitArtifactsIfDefined(moduleDependency, parsedNotation.getArtifactType(), parsedNotation.getClassifier()); return moduleDependency; }
Example #8
Source File: DependencyStringNotationParser.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 5 votes |
private ParsedModuleStringNotation splitModuleFromExtension(String notation) { Matcher matcher = EXTENSION_SPLITTER.matcher(notation); boolean hasArtifactType = matcher.matches(); if (hasArtifactType && !ClientModule.class.isAssignableFrom(wantedType)) { if (matcher.groupCount() != 2) { throw new InvalidUserDataException("The dependency notation " + notation + " is invalid"); } return new ParsedModuleStringNotation(matcher.group(1), matcher.group(2)); } return new ParsedModuleStringNotation(notation, null); }
Example #9
Source File: DependencyStringNotationParser.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 5 votes |
private T createDependencyFromString(String notation) { ParsedModuleStringNotation parsedNotation = splitModuleFromExtension(notation); T moduleDependency = instantiator.newInstance(wantedType, parsedNotation.getGroup(), parsedNotation.getName(), parsedNotation.getVersion()); ModuleFactoryHelper.addExplicitArtifactsIfDefined(moduleDependency, parsedNotation.getArtifactType(), parsedNotation.getClassifier()); return moduleDependency; }
Example #10
Source File: DependencyStringNotationParser.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 5 votes |
private ParsedModuleStringNotation splitModuleFromExtension(String notation) { Matcher matcher = EXTENSION_SPLITTER.matcher(notation); boolean hasArtifactType = matcher.matches(); if (hasArtifactType && !ClientModule.class.isAssignableFrom(wantedType)) { if (matcher.groupCount() != 2) { throw new InvalidUserDataException("The dependency notation " + notation + " is invalid"); } return new ParsedModuleStringNotation(matcher.group(1), matcher.group(2)); } return new ParsedModuleStringNotation(notation, null); }