Search in sources :

Example 1 with PubSpecYamlNameVersionParser

use of com.synopsys.integration.detectable.detectables.dart.PubSpecYamlNameVersionParser in project synopsys-detect by blackducksoftware.

the class DetectableFactory method createDartPubSpecLockDetectable.

public DartPubSpecLockDetectable createDartPubSpecLockDetectable(DetectableEnvironment environment) {
    PubSpecLockParser pubSpecLockParser = new PubSpecLockParser();
    PubSpecYamlNameVersionParser pubSpecYamlNameVersionParser = new PubSpecYamlNameVersionParser();
    PubSpecExtractor pubSpecExtractor = new PubSpecExtractor(pubSpecLockParser, pubSpecYamlNameVersionParser);
    return new DartPubSpecLockDetectable(environment, fileFinder, pubSpecExtractor);
}
Also used : PubSpecYamlNameVersionParser(com.synopsys.integration.detectable.detectables.dart.PubSpecYamlNameVersionParser) PubSpecExtractor(com.synopsys.integration.detectable.detectables.dart.pubspec.PubSpecExtractor) PubSpecLockParser(com.synopsys.integration.detectable.detectables.dart.pubspec.PubSpecLockParser) DartPubSpecLockDetectable(com.synopsys.integration.detectable.detectables.dart.pubspec.DartPubSpecLockDetectable)

Example 2 with PubSpecYamlNameVersionParser

use of com.synopsys.integration.detectable.detectables.dart.PubSpecYamlNameVersionParser in project synopsys-detect by blackducksoftware.

the class DetectableFactory method createDartPubDepDetectable.

public DartPubDepDetectable createDartPubDepDetectable(DetectableEnvironment environment, DartPubDepsDetectableOptions dartPubDepsDetectableOptions, DartResolver dartResolver, FlutterResolver flutterResolver) {
    PubDepsParser pubDepsParser = new PubDepsParser();
    PubSpecYamlNameVersionParser pubSpecYamlNameVersionParser = new PubSpecYamlNameVersionParser();
    PubDepsExtractor pubDepsExtractor = new PubDepsExtractor(executableRunner, pubDepsParser, pubSpecYamlNameVersionParser, toolVersionLogger);
    return new DartPubDepDetectable(environment, fileFinder, pubDepsExtractor, dartPubDepsDetectableOptions, dartResolver, flutterResolver);
}
Also used : PubDepsParser(com.synopsys.integration.detectable.detectables.dart.pubdep.PubDepsParser) PubSpecYamlNameVersionParser(com.synopsys.integration.detectable.detectables.dart.PubSpecYamlNameVersionParser) PubDepsExtractor(com.synopsys.integration.detectable.detectables.dart.pubdep.PubDepsExtractor) DartPubDepDetectable(com.synopsys.integration.detectable.detectables.dart.pubdep.DartPubDepDetectable)

Example 3 with PubSpecYamlNameVersionParser

use of com.synopsys.integration.detectable.detectables.dart.PubSpecYamlNameVersionParser in project synopsys-detect by blackducksoftware.

the class PubSpecYamlNameVersionParserTest method testParseNameVersion.

@Test
public void testParseNameVersion() throws IOException {
    List<String> pubspecYaml = Arrays.asList("name: contacts_app", "description: A new Flutter project.", "", "# Test file for PubSpecYamlNameVersionParserTest", "version: 1.0.0+1");
    PubSpecYamlNameVersionParser nameVersionParser = new PubSpecYamlNameVersionParser();
    NameVersion nameVersion = nameVersionParser.parseNameVersion(pubspecYaml).get();
    Assertions.assertEquals("contacts_app", nameVersion.getName());
    Assertions.assertEquals("1.0.0+1", nameVersion.getVersion());
}
Also used : PubSpecYamlNameVersionParser(com.synopsys.integration.detectable.detectables.dart.PubSpecYamlNameVersionParser) NameVersion(com.synopsys.integration.util.NameVersion) Test(org.junit.jupiter.api.Test)

Aggregations

PubSpecYamlNameVersionParser (com.synopsys.integration.detectable.detectables.dart.PubSpecYamlNameVersionParser)3 DartPubDepDetectable (com.synopsys.integration.detectable.detectables.dart.pubdep.DartPubDepDetectable)1 PubDepsExtractor (com.synopsys.integration.detectable.detectables.dart.pubdep.PubDepsExtractor)1 PubDepsParser (com.synopsys.integration.detectable.detectables.dart.pubdep.PubDepsParser)1 DartPubSpecLockDetectable (com.synopsys.integration.detectable.detectables.dart.pubspec.DartPubSpecLockDetectable)1 PubSpecExtractor (com.synopsys.integration.detectable.detectables.dart.pubspec.PubSpecExtractor)1 PubSpecLockParser (com.synopsys.integration.detectable.detectables.dart.pubspec.PubSpecLockParser)1 NameVersion (com.synopsys.integration.util.NameVersion)1 Test (org.junit.jupiter.api.Test)1