org.gradle.api.artifacts.ResolvedConfiguration Java Examples

The following examples show how to use org.gradle.api.artifacts.ResolvedConfiguration. 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: DependencyTaskTest.java    From play-services-plugins with Apache License 2.0 6 votes vote down vote up
@Test
public void testGetResolvedArtifacts_isPackagedInHierarchy() {
  Set<ResolvedArtifact> artifactSet = prepareArtifactSet(2);
  ResolvedConfiguration resolvedConfiguration = mockResolvedConfiguration(artifactSet);

  Configuration configuration = mock(Configuration.class);
  when(configuration.getName()).thenReturn("random");
  when(configuration.isCanBeResolved()).thenReturn(true);
  when(configuration.getResolvedConfiguration()).thenReturn(resolvedConfiguration);

  Configuration parent = mock(Configuration.class);
  when(parent.getName()).thenReturn("compile");
  Set<Configuration> hierarchy = new HashSet<>();
  hierarchy.add(parent);
  when(configuration.getHierarchy()).thenReturn(hierarchy);

  assertThat(dependencyTask.getResolvedArtifacts(configuration), is(artifactSet));
}
 
Example #2
Source File: AppModelGradleResolver.java    From quarkus with Apache License 2.0 5 votes vote down vote up
@Override
public Path resolve(AppArtifact appArtifact) throws AppModelResolverException {
    if (!appArtifact.isResolved()) {

        final DefaultDependencyArtifact dep = new DefaultDependencyArtifact();
        dep.setExtension(appArtifact.getType());
        dep.setType(appArtifact.getType());
        dep.setName(appArtifact.getArtifactId());

        final DefaultExternalModuleDependency gradleDep = new DefaultExternalModuleDependency(appArtifact.getGroupId(),
                appArtifact.getArtifactId(), appArtifact.getVersion(), null);
        gradleDep.addArtifact(dep);

        final Configuration detachedConfig = project.getConfigurations().detachedConfiguration(gradleDep);

        final ResolvedConfiguration rc = detachedConfig.getResolvedConfiguration();
        Set<ResolvedArtifact> resolvedArtifacts = rc.getResolvedArtifacts();
        for (ResolvedArtifact a : resolvedArtifacts) {
            if (appArtifact.getArtifactId().equals(a.getName())
                    && appArtifact.getType().equals(a.getType())
                    && appArtifact.getGroupId().equals(a.getModuleVersion().getId().getGroup())) {
                appArtifact.setPath(a.getFile().toPath());
            }
        }

        if (!appArtifact.isResolved()) {
            throw new AppModelResolverException("Failed to resolve " + appArtifact);
        }

    }
    return appArtifact.getPath();
}
 
Example #3
Source File: DependencyTaskTest.java    From play-services-plugins with Apache License 2.0 5 votes vote down vote up
@NotNull
private ResolvedConfiguration mockResolvedConfigurationFromDependencySet(
        Set<ResolvedDependency> resolvedDependencySet) {

  LenientConfiguration lenientConfiguration = mock(LenientConfiguration.class);
  when(lenientConfiguration.getFirstLevelModuleDependencies()).thenReturn(resolvedDependencySet);
  ResolvedConfiguration resolvedConfiguration = mock(ResolvedConfiguration.class);
  when(resolvedConfiguration.getLenientConfiguration()).thenReturn(lenientConfiguration);
  return resolvedConfiguration;
}
 
Example #4
Source File: DependencyTaskTest.java    From play-services-plugins with Apache License 2.0 5 votes vote down vote up
@NotNull
private ResolvedConfiguration mockResolvedConfiguration(Set<ResolvedArtifact> artifactSet) {
  ResolvedDependency resolvedDependency = mock(ResolvedDependency.class);
  when(resolvedDependency.getAllModuleArtifacts()).thenReturn(artifactSet);
  Set<ResolvedDependency> resolvedDependencySet = Collections.singleton(resolvedDependency);
  return mockResolvedConfigurationFromDependencySet(resolvedDependencySet);
}
 
Example #5
Source File: DependencyTaskTest.java    From play-services-plugins with Apache License 2.0 5 votes vote down vote up
@Test
public void testGetResolvedArtifacts_libraryProject_returnsArtifacts() {
  ResolvedDependency libraryResolvedDependency = mock(ResolvedDependency.class);
  when(libraryResolvedDependency.getModuleVersion())
          .thenReturn(DependencyTask.LOCAL_LIBRARY_VERSION);
  ResolvedDependency libraryChildResolvedDependency = mock(ResolvedDependency.class);
  Set<ResolvedArtifact> libraryChildArtifactSet =
          prepareArtifactSet(/* start= */ 0, /* count= */ 2);
  when(libraryChildResolvedDependency.getAllModuleArtifacts())
          .thenReturn(libraryChildArtifactSet);
  when(libraryResolvedDependency.getChildren())
          .thenReturn(Collections.singleton(libraryChildResolvedDependency));

  Set<ResolvedArtifact> appArtifactSet = prepareArtifactSet(/* start= */ 2, /* count= */ 2);
  ResolvedDependency appResolvedDependency = mock(ResolvedDependency.class);
  when(appResolvedDependency.getAllModuleArtifacts()).thenReturn(appArtifactSet);

  Set<ResolvedDependency> resolvedDependencySet = new HashSet<>(
          Arrays.asList(libraryResolvedDependency, appResolvedDependency));
  ResolvedConfiguration resolvedConfiguration = mockResolvedConfigurationFromDependencySet(
          resolvedDependencySet);

  Configuration configuration = mock(Configuration.class);
  when(configuration.getName()).thenReturn("compile");
  when(configuration.isCanBeResolved()).thenReturn(true);
  when(configuration.getResolvedConfiguration()).thenReturn(resolvedConfiguration);

  Set<ResolvedArtifact> artifactSuperSet = new HashSet<>();
  artifactSuperSet.addAll(appArtifactSet);
  artifactSuperSet.addAll(libraryChildArtifactSet);
  assertThat(dependencyTask.getResolvedArtifacts(configuration), is(artifactSuperSet));
  // Calling getAllModuleArtifacts on a library will cause an exception.
  verify(libraryResolvedDependency, never()).getAllModuleArtifacts();
}
 
Example #6
Source File: DependencyTaskTest.java    From play-services-plugins with Apache License 2.0 5 votes vote down vote up
@Test
public void testGetResolvedArtifacts_returnArtifact() {
  Set<ResolvedArtifact> artifactSet = prepareArtifactSet(2);
  ResolvedConfiguration resolvedConfiguration = mockResolvedConfiguration(artifactSet);

  Configuration configuration = mock(Configuration.class);
  when(configuration.getName()).thenReturn("compile");
  when(configuration.isCanBeResolved()).thenReturn(true);
  when(configuration.getResolvedConfiguration()).thenReturn(resolvedConfiguration);

  assertThat(dependencyTask.getResolvedArtifacts(configuration), is(artifactSet));
}
 
Example #7
Source File: DependencyTaskTest.java    From play-services-plugins with Apache License 2.0 5 votes vote down vote up
@Test
public void testGetResolvedArtifacts_cannotResolve() {
  Set<ResolvedArtifact> artifactSet = prepareArtifactSet(2);
  ResolvedConfiguration resolvedConfiguration = mockResolvedConfiguration(artifactSet);

  Configuration configuration = mock(Configuration.class);
  when(configuration.getName()).thenReturn("implementation");
  when(configuration.getResolvedConfiguration()).thenReturn(resolvedConfiguration);

  when(configuration.isCanBeResolved()).thenReturn(false);

  assertThat(dependencyTask.getResolvedArtifacts(configuration), is(nullValue()));
}
 
Example #8
Source File: DependencyTaskTest.java    From play-services-plugins with Apache License 2.0 5 votes vote down vote up
@Test
public void testGetResolvedArtifacts_isTest() {
  Set<ResolvedArtifact> artifactSet = prepareArtifactSet(2);
  ResolvedConfiguration resolvedConfiguration = mockResolvedConfiguration(artifactSet);

  Configuration configuration = mock(Configuration.class);
  when(configuration.isCanBeResolved()).thenReturn(true);
  when(configuration.getResolvedConfiguration()).thenReturn(resolvedConfiguration);

  when(configuration.getName()).thenReturn("testCompile");

  assertThat(dependencyTask.getResolvedArtifacts(configuration), is(nullValue()));
}
 
Example #9
Source File: DependencyTaskTest.java    From play-services-plugins with Apache License 2.0 5 votes vote down vote up
@Test
public void testGetResolvedArtifacts_isNotPackaged() {
  Set<ResolvedArtifact> artifactSet = prepareArtifactSet(2);
  ResolvedConfiguration resolvedConfiguration = mockResolvedConfiguration(artifactSet);

  Configuration configuration = mock(Configuration.class);
  when(configuration.isCanBeResolved()).thenReturn(true);
  when(configuration.getResolvedConfiguration()).thenReturn(resolvedConfiguration);

  when(configuration.getName()).thenReturn("random");

  assertThat(dependencyTask.getResolvedArtifacts(configuration), is(nullValue()));
}
 
Example #10
Source File: DependencyTaskTest.java    From play-services-plugins with Apache License 2.0 5 votes vote down vote up
@Test
public void testGetResolvedArtifacts_isPackagedApi() {
  Set<ResolvedArtifact> artifactSet = prepareArtifactSet(2);
  ResolvedConfiguration resolvedConfiguration = mockResolvedConfiguration(artifactSet);

  Configuration configuration = mock(Configuration.class);
  when(configuration.isCanBeResolved()).thenReturn(true);
  when(configuration.getResolvedConfiguration()).thenReturn(resolvedConfiguration);

  when(configuration.getName()).thenReturn("api");

  assertThat(dependencyTask.getResolvedArtifacts(configuration), is(artifactSet));
}
 
Example #11
Source File: DependencyTaskTest.java    From play-services-plugins with Apache License 2.0 5 votes vote down vote up
@Test
public void testGetResolvedArtifacts_isPackagedImplementation() {
  Set<ResolvedArtifact> artifactSet = prepareArtifactSet(2);
  ResolvedConfiguration resolvedConfiguration = mockResolvedConfiguration(artifactSet);

  Configuration configuration = mock(Configuration.class);
  when(configuration.isCanBeResolved()).thenReturn(true);
  when(configuration.getResolvedConfiguration()).thenReturn(resolvedConfiguration);

  when(configuration.getName()).thenReturn("implementation");

  assertThat(dependencyTask.getResolvedArtifacts(configuration), is(artifactSet));
}
 
Example #12
Source File: DependencyTaskTest.java    From play-services-plugins with Apache License 2.0 5 votes vote down vote up
@Test
public void testGetResolvedArtifacts_isPackagedCompile() {
  Set<ResolvedArtifact> artifactSet = prepareArtifactSet(2);
  ResolvedConfiguration resolvedConfiguration = mockResolvedConfiguration(artifactSet);

  Configuration configuration = mock(Configuration.class);
  when(configuration.isCanBeResolved()).thenReturn(true);
  when(configuration.getResolvedConfiguration()).thenReturn(resolvedConfiguration);

  when(configuration.getName()).thenReturn("compile");

  assertThat(dependencyTask.getResolvedArtifacts(configuration), is(artifactSet));
}
 
Example #13
Source File: DependencyTaskTest.java    From play-services-plugins with Apache License 2.0 5 votes vote down vote up
@Test
public void testGetResolvedArtifacts_ResolveException() {
  ResolvedConfiguration resolvedConfiguration = mock(ResolvedConfiguration.class);
  when(resolvedConfiguration.getLenientConfiguration()).thenThrow(ResolveException.class);

  Configuration configuration = mock(Configuration.class);
  when(configuration.getName()).thenReturn("compile");
  when(configuration.isCanBeResolved()).thenReturn(true);
  when(configuration.getResolvedConfiguration()).thenReturn(resolvedConfiguration);

  assertThat(dependencyTask.getResolvedArtifacts(configuration), is(nullValue()));
}
 
Example #14
Source File: GenerateProtoTask.java    From curiostack with MIT License 4 votes vote down vote up
private Map<String, File> downloadTools(List<String> artifacts) {
  RepositoryHandler repositories = getProject().getRepositories();
  List<ArtifactRepository> currentRepositories = ImmutableList.copyOf(repositories);
  // Make sure Maven Central is present as a repository since it's the usual place to
  // get protoc, even for non-Java projects. We restore to the previous state after the task.
  repositories.mavenCentral();

  List<Dependency> dependencies =
      artifacts.stream()
          .map(
              artifact -> {
                checkArgument(!artifact.isEmpty(), "artifact must not be empty");

                List<String> coordinateParts = COORDINATE_SPLITTER.splitToList(artifact);

                List<String> artifactParts =
                    ARTIFACT_SPLITTER.splitToList(coordinateParts.get(0));

                ImmutableMap.Builder<String, String> depParts =
                    ImmutableMap.builderWithExpectedSize(5);

                // Do a loose matching to allow for the possibility of dependency management
                // manipulation.
                if (artifactParts.size() > 0) {
                  depParts.put("group", artifactParts.get(0));
                }
                if (artifactParts.size() > 1) {
                  depParts.put("name", artifactParts.get(1));
                }
                if (artifactParts.size() > 2) {
                  depParts.put("version", artifactParts.get(2));
                }

                if (artifactParts.size() > 3) {
                  depParts.put("classifier", artifactParts.get(3));
                } else {
                  depParts.put(
                      "classifier",
                      getProject().getExtensions().getByType(OsDetector.class).getClassifier());
                }

                if (coordinateParts.size() > 1) {
                  depParts.put("ext", coordinateParts.get(1));
                } else {
                  depParts.put("ext", "exe");
                }

                return getProject().getDependencies().create(depParts.build());
              })
          .collect(toImmutableList());
  Configuration configuration = getProject().getConfigurations().getByName("protobufTools");
  configuration.getDependencies().addAll(dependencies);

  // Resolve once to download all tools in parallel.
  configuration.resolve();

  // This will not re-download.
  ResolvedConfiguration resolved = configuration.getResolvedConfiguration();
  Map<String, File> downloaded =
      Streams.zip(
              artifacts.stream(),
              dependencies.stream(),
              (artifact, dep) -> {
                Set<File> files =
                    resolved.getFiles(
                        d -> {
                          // Dependency.contentEquals doesn't match for some reason...
                          return Objects.equals(dep.getGroup(), d.getGroup())
                              && dep.getName().equals(d.getName())
                              && Objects.equals(dep.getVersion(), d.getVersion());
                        });
                checkState(files.size() == 1);

                File file = Iterables.getOnlyElement(files);
                if (!file.canExecute()) {
                  if (!file.setExecutable(true)) {
                    throw new IllegalStateException(
                        "Could not set proto tool to executable: " + file.getAbsolutePath());
                  }
                }

                return new SimpleImmutableEntry<>(artifact, file);
              })
          .collect(toImmutableMap(Entry::getKey, Entry::getValue));

  repositories.clear();
  repositories.addAll(currentRepositories);

  return downloaded;
}
 
Example #15
Source File: ResolverResults.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public void failed(ResolvedConfiguration resolvedConfiguration, ResolveException failure) {
    this.resolvedConfiguration = resolvedConfiguration;
    this.resolutionResult = null;
    this.fatalFailure = failure;
}
 
Example #16
Source File: ResolverResults.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public ResolvedConfiguration getResolvedConfiguration() {
    assertHasResult();
    return resolvedConfiguration;
}
 
Example #17
Source File: ResolverResults.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public void withResolvedConfiguration(ResolvedConfiguration resolvedConfiguration) {
    this.resolvedConfiguration = resolvedConfiguration;
}
 
Example #18
Source File: ResolverResults.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public void resolved(ResolvedConfiguration resolvedConfiguration, ResolutionResult resolutionResult) {
    this.resolvedConfiguration = resolvedConfiguration;
    this.resolutionResult = resolutionResult;
    this.fatalFailure = null;
}
 
Example #19
Source File: ResolverResults.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public void failed(ResolvedConfiguration resolvedConfiguration, ResolveException failure) {
    this.resolvedConfiguration = resolvedConfiguration;
    this.resolutionResult = null;
    this.fatalFailure = failure;
}
 
Example #20
Source File: ResolverResults.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public ResolvedConfiguration getResolvedConfiguration() {
    assertHasResult();
    return resolvedConfiguration;
}
 
Example #21
Source File: ResolverResults.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public void withResolvedConfiguration(ResolvedConfiguration resolvedConfiguration) {
    this.resolvedConfiguration = resolvedConfiguration;
}
 
Example #22
Source File: ResolverResults.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public void resolved(ResolvedConfiguration resolvedConfiguration, ResolutionResult resolutionResult) {
    this.resolvedConfiguration = resolvedConfiguration;
    this.resolutionResult = resolutionResult;
    this.fatalFailure = null;
}
 
Example #23
Source File: ResolverResults.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public ResolvedConfiguration getResolvedConfiguration() {
    assertHasResult();
    return resolvedConfiguration;
}
 
Example #24
Source File: AppModelGradleResolver.java    From quarkus with Apache License 2.0 4 votes vote down vote up
private void collectDependencies(Configuration config, AppModel.Builder appBuilder,
        final List<Dependency> directExtensionDeps,
        final List<AppDependency> userDeps, Map<AppArtifactKey, AppDependency> versionMap,
        Map<ModuleIdentifier, ModuleVersionIdentifier> userModules) {

    final ResolvedConfiguration resolvedConfig = config.getResolvedConfiguration();
    for (ResolvedArtifact a : resolvedConfig.getResolvedArtifacts()) {
        if (!isDependency(a)) {
            continue;
        }
        userModules.put(getModuleId(a), a.getModuleVersion().getId());

        final AppDependency dependency = toAppDependency(a);
        final AppArtifactKey artifactGa = new AppArtifactKey(dependency.getArtifact().getGroupId(),
                dependency.getArtifact().getArtifactId());

        // If we are running in dev mode we prefer directories of classes and resources over the JARs
        // for local project dependencies
        if (LaunchMode.DEVELOPMENT.equals(launchMode)
                && (a.getId().getComponentIdentifier() instanceof ProjectComponentIdentifier)) {
            final Project depProject = project.getRootProject()
                    .findProject(((ProjectComponentIdentifier) a.getId().getComponentIdentifier()).getProjectPath());
            final JavaPluginConvention javaConvention = depProject.getConvention().findPlugin(JavaPluginConvention.class);
            if (javaConvention != null) {
                SourceSet mainSourceSet = javaConvention.getSourceSets().getByName(SourceSet.MAIN_SOURCE_SET_NAME);
                final PathsCollection.Builder paths = PathsCollection.builder();
                final Path classesDir = Paths
                        .get(QuarkusGradleUtils.getClassesDir(mainSourceSet, depProject.getBuildDir(), false));
                if (Files.exists(classesDir)) {
                    paths.add(classesDir);
                }
                for (File resourcesDir : mainSourceSet.getResources().getSourceDirectories()) {
                    if (resourcesDir.exists()) {
                        paths.add(resourcesDir.toPath());
                    }
                }
                dependency.getArtifact().setPaths(paths.build());
            }
        }

        if (!dependency.getArtifact().isResolved()) {
            throw new IllegalStateException("Failed to resolve " + a.getId());
        }

        userDeps.add(dependency);
        versionMap.put(artifactGa, dependency);
    }

    collectExtensionDeps(resolvedConfig.getFirstLevelModuleDependencies(), versionMap, appBuilder, directExtensionDeps,
            true, new HashSet<>());
}
 
Example #25
Source File: AppModelGradleResolver.java    From quarkus with Apache License 2.0 4 votes vote down vote up
@Override
public AppModel resolveModel(AppArtifact appArtifact) throws AppModelResolverException {
    AppModel.Builder appBuilder = new AppModel.Builder();
    if (appModel != null && appModel.getAppArtifact().equals(appArtifact)) {
        return appModel;
    }
    final List<Dependency> directExtensionDeps = new ArrayList<>();

    // collect enforced platforms
    final Configuration impl = project.getConfigurations().getByName(JavaPlugin.IMPLEMENTATION_CONFIGURATION_NAME);
    for (Dependency d : impl.getAllDependencies()) {
        if (!(d instanceof ModuleDependency)) {
            continue;
        }
        final ModuleDependency module = (ModuleDependency) d;
        final Category category = module.getAttributes().getAttribute(Category.CATEGORY_ATTRIBUTE);
        if (category != null && Category.ENFORCED_PLATFORM.equals(category.getName())) {
            directExtensionDeps.add(d);
        }
    }

    final List<AppDependency> userDeps = new ArrayList<>();
    Map<AppArtifactKey, AppDependency> versionMap = new HashMap<>();
    Map<ModuleIdentifier, ModuleVersionIdentifier> userModules = new HashMap<>();

    final String classpathConfigName = launchMode == LaunchMode.TEST ? JavaPlugin.TEST_RUNTIME_CLASSPATH_CONFIGURATION_NAME
            : JavaPlugin.RUNTIME_CLASSPATH_CONFIGURATION_NAME;

    collectDependencies(project.getConfigurations().getByName(classpathConfigName),
            appBuilder, directExtensionDeps, userDeps,
            versionMap, userModules);

    if (launchMode == LaunchMode.DEVELOPMENT) {
        collectDependencies(project.getConfigurations().getByName(JavaPlugin.COMPILE_ONLY_CONFIGURATION_NAME),
                appBuilder, directExtensionDeps, userDeps,
                versionMap, userModules);
    }

    final List<AppDependency> deploymentDeps = new ArrayList<>();
    final List<AppDependency> fullDeploymentDeps = new ArrayList<>(userDeps);
    if (!directExtensionDeps.isEmpty()) {
        final Configuration deploymentConfig = project.getConfigurations()
                .detachedConfiguration(directExtensionDeps.toArray(new Dependency[0]));
        final ResolvedConfiguration rc = deploymentConfig.getResolvedConfiguration();
        for (ResolvedArtifact a : rc.getResolvedArtifacts()) {
            final ModuleVersionIdentifier userVersion = userModules.get(getModuleId(a));
            if (userVersion != null || !isDependency(a)) {
                continue;
            }
            final AppDependency dependency = toAppDependency(a);
            fullDeploymentDeps.add(dependency);
            if (!userDeps.contains(dependency)) {
                AppDependency deploymentDep = alignVersion(dependency, versionMap);
                deploymentDeps.add(deploymentDep);
            }
        }
    }

    if (!appArtifact.isResolved()) {
        final Jar jarTask = (Jar) project.getTasks().findByName(JavaPlugin.JAR_TASK_NAME);
        if (jarTask == null) {
            throw new AppModelResolverException("Failed to locate task 'jar' in the project.");
        }
        if (jarTask.getDidWork()) {
            final Provider<RegularFile> jarProvider = jarTask.getArchiveFile();
            Path classesDir = null;
            if (jarProvider.isPresent()) {
                final File f = jarProvider.get().getAsFile();
                if (f.exists()) {
                    classesDir = f.toPath();
                }
            }
            if (classesDir == null) {
                throw new AppModelResolverException("Failed to locate classes directory for " + appArtifact);
            }
            appArtifact.setPaths(PathsCollection.of(classesDir));
        } else {
            final Convention convention = project.getConvention();
            JavaPluginConvention javaConvention = convention.findPlugin(JavaPluginConvention.class);
            if (javaConvention != null) {
                final SourceSet mainSourceSet = javaConvention.getSourceSets().getByName(SourceSet.MAIN_SOURCE_SET_NAME);
                PathsCollection.Builder paths = PathsCollection.builder();
                mainSourceSet.getOutput().filter(s -> s.exists()).forEach(f -> {
                    paths.add(f.toPath());
                });
                for (File resourcesDir : mainSourceSet.getResources().getSourceDirectories()) {
                    if (resourcesDir.exists()) {
                        paths.add(resourcesDir.toPath());
                    }
                }
                appArtifact.setPaths(paths.build());
            }
        }
    }

    appBuilder.addRuntimeDeps(userDeps)
            .addFullDeploymentDeps(fullDeploymentDeps)
            .addDeploymentDeps(deploymentDeps)
            .setAppArtifact(appArtifact);
    return this.appModel = appBuilder.build();
}
 
Example #26
Source File: ResolverResults.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public void failed(ResolvedConfiguration resolvedConfiguration, ResolveException failure) {
    this.resolvedConfiguration = resolvedConfiguration;
    this.resolutionResult = null;
    this.fatalFailure = failure;
}
 
Example #27
Source File: ResolverResults.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public void resolved(ResolvedConfiguration resolvedConfiguration, ResolutionResult resolutionResult) {
    this.resolvedConfiguration = resolvedConfiguration;
    this.resolutionResult = resolutionResult;
    this.fatalFailure = null;
}
 
Example #28
Source File: ResolverResults.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public void withResolvedConfiguration(ResolvedConfiguration resolvedConfiguration) {
    this.resolvedConfiguration = resolvedConfiguration;
}
 
Example #29
Source File: ResolverResults.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public ResolvedConfiguration getResolvedConfiguration() {
    assertHasResult();
    return resolvedConfiguration;
}
 
Example #30
Source File: ResolverResults.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public void failed(ResolvedConfiguration resolvedConfiguration, ResolveException failure) {
    this.resolvedConfiguration = resolvedConfiguration;
    this.resolutionResult = null;
    this.fatalFailure = failure;
}