com.google.devtools.build.lib.actions.Artifact.TYPE - java examples

Here are the examples of the java api com.google.devtools.build.lib.actions.Artifact.TYPE taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

75 Examples 7

19 View Complete Implementation : ObjcProvider.java
Copyright Apache License 2.0
Author : bazelbuild
@Override
public Depset sourceForStarlark() {
    return Depset.of(Artifact.TYPE, source());
}

19 View Complete Implementation : ObjcProvider.java
Copyright Apache License 2.0
Author : bazelbuild
@Override
public Depset headerForStarlark() {
    return Depset.of(Artifact.TYPE, header());
}

19 View Complete Implementation : JavaInfo.java
Copyright Apache License 2.0
Author : bazelbuild
@Override
public Depset getTransitiveSourceJars() {
    return Depset.of(Artifact.TYPE, getProviderAsNestedSet(JavaSourceJarsProvider.clreplaced, JavaSourceJarsProvider::getTransitiveSourceJars));
}

19 View Complete Implementation : ObjcProvider.java
Copyright Apache License 2.0
Author : bazelbuild
@Override
public Depset linkmapFile() {
    return Depset.of(Artifact.TYPE, get(LINKMAP_FILE));
}

19 View Complete Implementation : ObjcProvider.java
Copyright Apache License 2.0
Author : bazelbuild
@Override
public Depset moduleMap() {
    return Depset.of(Artifact.TYPE, get(MODULE_MAP));
}

19 View Complete Implementation : CcToolchainProvider.java
Copyright Apache License 2.0
Author : bazelbuild
@Override
public Depset getAllFilesForStarlark() {
    return Depset.of(Artifact.TYPE, getAllFiles());
}

19 View Complete Implementation : ObjcProvider.java
Copyright Apache License 2.0
Author : bazelbuild
@Override
public Depset staticFrameworkFileForStarlark() {
    return Depset.of(Artifact.TYPE, staticFrameworkFile());
}

19 View Complete Implementation : CcLinkingContext.java
Copyright Apache License 2.0
Author : bazelbuild
@Override
public Depset getSkylarkNonCodeInputs() {
    return Depset.of(Artifact.TYPE, getNonCodeInputs());
}

19 View Complete Implementation : ObjcProvider.java
Copyright Apache License 2.0
Author : bazelbuild
@Override
public Depset importedLibrary() {
    return Depset.of(Artifact.TYPE, get(IMPORTED_LIBRARY));
}

19 View Complete Implementation : JavaInfo.java
Copyright Apache License 2.0
Author : bazelbuild
@Override
public Depset getCompileTimeJars() {
    NestedSet<Artifact> compileTimeJars = getProviderAsNestedSet(JavaCompilationArgsProvider.clreplaced, JavaCompilationArgsProvider::getDirectCompileTimeJars);
    return Depset.of(Artifact.TYPE, compileTimeJars);
}

19 View Complete Implementation : ObjcProvider.java
Copyright Apache License 2.0
Author : bazelbuild
@Override
public Depset multiArchLinkedArchives() {
    return Depset.of(Artifact.TYPE, get(MULTI_ARCH_LINKED_ARCHIVES));
}

19 View Complete Implementation : ObjcProvider.java
Copyright Apache License 2.0
Author : bazelbuild
@Override
public Depset library() {
    return Depset.of(Artifact.TYPE, get(LIBRARY));
}

19 View Complete Implementation : JavaToolchainProvider.java
Copyright Apache License 2.0
Author : bazelbuild
@Override
public Depset getSkylarkTools() {
    return Depset.of(Artifact.TYPE, getTools());
}

19 View Complete Implementation : ObjcProvider.java
Copyright Apache License 2.0
Author : bazelbuild
@Override
public Depset umbrellaHeader() {
    return Depset.of(Artifact.TYPE, get(UMBRELLA_HEADER));
}

19 View Complete Implementation : CcCompilationContext.java
Copyright Apache License 2.0
Author : bazelbuild
@Override
public Depset getSkylarkHeaders() {
    return Depset.of(Artifact.TYPE, getDeclaredIncludeSrcs());
}

19 View Complete Implementation : ObjcProvider.java
Copyright Apache License 2.0
Author : bazelbuild
@Override
public Depset multiArchLinkedBinaries() {
    return Depset.of(Artifact.TYPE, get(MULTI_ARCH_LINKED_BINARIES));
}

19 View Complete Implementation : CcToolchainProvider.java
Copyright Apache License 2.0
Author : bazelbuild
@Override
public Depset getDynamicRuntimeLibForStarlark(FeatureConfigurationForStarlark featureConfigurationForStarlark) throws EvalException {
    return Depset.of(Artifact.TYPE, getDynamicRuntimeLinkInputs(featureConfigurationForStarlark.getFeatureConfiguration()));
}

19 View Complete Implementation : ObjcProvider.java
Copyright Apache License 2.0
Author : bazelbuild
@Override
public Depset mergeZip() {
    return Depset.of(Artifact.TYPE, get(MERGE_ZIP));
}

19 View Complete Implementation : CcSkylarkApiProvider.java
Copyright Apache License 2.0
Author : bazelbuild
@Override
public Depset getLibrariesForStarlark() {
    return Depset.of(Artifact.TYPE, getLibraries());
}

19 View Complete Implementation : ObjcProvider.java
Copyright Apache License 2.0
Author : bazelbuild
@Override
public Depset forceLoadLibrary() {
    return Depset.of(Artifact.TYPE, get(FORCE_LOAD_LIBRARY));
}

19 View Complete Implementation : JavaInfo.java
Copyright Apache License 2.0
Author : bazelbuild
@Override
public Depset getFullCompileTimeJars() {
    NestedSet<Artifact> fullCompileTimeJars = getProviderAsNestedSet(JavaCompilationArgsProvider.clreplaced, JavaCompilationArgsProvider::getDirectFullCompileTimeJars);
    return Depset.of(Artifact.TYPE, fullCompileTimeJars);
}

19 View Complete Implementation : ObjcProvider.java
Copyright Apache License 2.0
Author : bazelbuild
@Override
public Depset linkInputs() {
    return Depset.of(Artifact.TYPE, get(LINK_INPUTS));
}

19 View Complete Implementation : Runfiles.java
Copyright Apache License 2.0
Author : bazelbuild
/**
 * Returns the collection of runfiles as artifacts, including both unconditional artifacts and
 * pruning manifest candidates.
 */
@Override
public Depset getArtifactsForStarlark() {
    return Depset.of(Artifact.TYPE, getArtifacts());
}

19 View Complete Implementation : ObjcProvider.java
Copyright Apache License 2.0
Author : bazelbuild
@Override
public Depset exportedDebugArtifacts() {
    return Depset.of(Artifact.TYPE, get(EXPORTED_DEBUG_ARTIFACTS));
}

19 View Complete Implementation : JavaInfo.java
Copyright Apache License 2.0
Author : bazelbuild
@Override
public Depset getTransitiveRuntimeDeps() {
    return Depset.of(Artifact.TYPE, getProviderAsNestedSet(JavaCompilationArgsProvider.clreplaced, JavaCompilationArgsProvider::getRuntimeJars));
}

19 View Complete Implementation : ObjcProvider.java
Copyright Apache License 2.0
Author : bazelbuild
@Override
public Depset dynamicFrameworkFileForStarlark() {
    return Depset.of(Artifact.TYPE, dynamicFrameworkFile());
}

19 View Complete Implementation : ObjcProvider.java
Copyright Apache License 2.0
Author : bazelbuild
@Override
public Depset j2objcLibrary() {
    return Depset.of(Artifact.TYPE, get(J2OBJC_LIBRARY));
}

19 View Complete Implementation : JavaToolchainProvider.java
Copyright Apache License 2.0
Author : bazelbuild
@Override
public Depset getSkylarkBootclreplacedpath() {
    return Depset.of(Artifact.TYPE, getBootclreplacedpath());
}

19 View Complete Implementation : ObjcProvider.java
Copyright Apache License 2.0
Author : bazelbuild
@Override
public Depset multiArchDynamicLibraries() {
    return Depset.of(Artifact.TYPE, get(MULTI_ARCH_DYNAMIC_LIBRARIES));
}

19 View Complete Implementation : CcToolchainProvider.java
Copyright Apache License 2.0
Author : bazelbuild
@Override
public Depset getStaticRuntimeLibForStarlark(FeatureConfigurationForStarlark featureConfigurationForStarlark) throws EvalException {
    return Depset.of(Artifact.TYPE, getStaticRuntimeLinkInputs(featureConfigurationForStarlark.getFeatureConfiguration()));
}

19 View Complete Implementation : ObjcProvider.java
Copyright Apache License 2.0
Author : bazelbuild
@Override
public Depset jreLibrary() {
    return Depset.of(Artifact.TYPE, get(JRE_LIBRARY));
}

19 View Complete Implementation : AppleSkylarkCommon.java
Copyright Apache License 2.0
Author : bazelbuild
/**
 * Creates a Skylark struct that contains the results of the {@code link_multi_arch_binary}
 * function.
 */
private StructImpl createAppleBinaryOutputSkylarkStruct(AppleBinaryOutput output, StarlarkThread thread) {
    Provider constructor = new NativeProvider<StructImpl>(StructImpl.clreplaced, "apple_binary_output") {
    };
    // We have to transform the output group dictionary into one that contains StarlarkValues
    // instead
    // of plain NestedSets because the Skylark caller may want to return this directly from their
    // implementation function.
    Map<String, StarlarkValue> outputGroups = Maps.transformValues(output.getOutputGroups(), v -> Depset.of(Artifact.TYPE, v));
    ImmutableMap<String, Object> fields = ImmutableMap.of("binary_provider", output.getBinaryInfoProvider(), "debug_outputs_provider", output.getDebugOutputsProvider(), "output_groups", Dict.copyOf(thread.mutability(), outputGroups));
    return SkylarkInfo.create(constructor, fields, Location.BUILTIN);
}

19 View Complete Implementation : ObjcProviderTest.java
Copyright Apache License 2.0
Author : bazelbuild
@Test
public void directFieldsAddFromSkylark() throws Exception {
    ImmutableList<Artifact> artifacts = ImmutableList.of(createArtifact("/foo"), createArtifact("/bar"));
    Depset set = Depset.of(Artifact.TYPE, NestedSetBuilder.wrap(Order.STABLE_ORDER, artifacts));
    ObjcProvider.Builder builder = objcProviderBuilder();
    builder.addElementsFromSkylark(ObjcProvider.SOURCE, set);
    builder.addElementsFromSkylark(ObjcProvider.HEADER, set);
    builder.addElementsFromSkylark(ObjcProvider.MODULE_MAP, set);
    ObjcProvider provider = builder.build();
    replacedertThat(provider.getDirect(ObjcProvider.SOURCE)).containsExactlyElementsIn(artifacts);
    replacedertThat(provider.getDirect(ObjcProvider.HEADER)).containsExactlyElementsIn(artifacts);
    replacedertThat(provider.getDirect(ObjcProvider.MODULE_MAP)).containsExactlyElementsIn(artifacts);
}

19 View Complete Implementation : AliasConfiguredTarget.java
Copyright Apache License 2.0
Author : bazelbuild
/* ClreplacedObject methods */
@Override
public Object getValue(String name) {
    if (name.equals(LABEL_FIELD)) {
        return getLabel();
    } else if (name.equals(FILES_FIELD)) {
        // A shortcut for files to build in Skylark. FileConfiguredTarget and RuleConfiguredTarget
        // always has FileProvider and Error- and PackageGroupConfiguredTarget-s shouldn't be
        // accessible in Skylark.
        return Depset.of(Artifact.TYPE, getProvider(FileProvider.clreplaced).getFilesToBuild());
    }
    return actual.getValue(name);
}

19 View Complete Implementation : DataBindingV2Provider.java
Copyright Apache License 2.0
Author : bazelbuild
@Override
public Depset getTransitiveBRFilesForStarlark() {
    return Depset.of(Artifact.TYPE, transitiveBRFiles);
}

19 View Complete Implementation : CcSkylarkApiProvider.java
Copyright Apache License 2.0
Author : bazelbuild
@Override
public Depset getTransitiveHeadersForStarlark() {
    return Depset.of(Artifact.TYPE, getTransitiveHeaders());
}

19 View Complete Implementation : JavaInfo.java
Copyright Apache License 2.0
Author : bazelbuild
@Override
public Depset getTransitiveDeps() {
    return Depset.of(Artifact.TYPE, getProviderAsNestedSet(JavaCompilationArgsProvider.clreplaced, JavaCompilationArgsProvider::getTransitiveCompileTimeJars));
}

19 View Complete Implementation : ObjcProvider.java
Copyright Apache License 2.0
Author : bazelbuild
@Override
public Depset linkedBinary() {
    return Depset.of(Artifact.TYPE, get(LINKED_BINARY));
}

18 View Complete Implementation : FileProvider.java
Copyright Apache License 2.0
Author : bazelbuild
/**
 * Returns the set of artifacts that are the "output" of this rule.
 *
 * <p>The term "output" is somewhat hazily defined; it is vaguely the set of files that are preplaceded
 * on to dependent rules that list the rule in their {@code srcs} attribute and the set of files
 * that are built when a rule is mentioned on the command line. It does <b>not</b> include the
 * runfiles; that is the bailiwick of {@code FilesToRunProvider}.
 *
 * <p>Note that the above definition is somewhat imprecise; in particular, when a rule is
 * mentioned on the command line, some other files are also built {@code TopLevelArtifactHelper}
 * and dependent rules are free to filter this set of artifacts e.g. based on their extension.
 *
 * <p>Also, some rules may generate artifacts that are not listed here by way of defining other
 * implicit targets, for example, deploy jars.
 */
@Override
public Depset getFilesToBuildForStarlark() {
    return Depset.of(Artifact.TYPE, filesToBuild);
}

18 View Complete Implementation : OutputGroupInfo.java
Copyright Apache License 2.0
Author : bazelbuild
@Override
public Object getValue(String name) {
    NestedSet<Artifact> result = outputGroups.get(name);
    if (result == null) {
        return null;
    }
    return Depset.of(Artifact.TYPE, result);
}

18 View Complete Implementation : OutputGroupInfo.java
Copyright Apache License 2.0
Author : bazelbuild
@Override
public Object getIndex(StarlarkSemantics semantics, Object key) throws EvalException {
    if (!(key instanceof String)) {
        throw Starlark.errorf("Output group names must be strings, got %s instead", Starlark.type(key));
    }
    NestedSet<Artifact> result = outputGroups.get(key);
    if (result != null) {
        return Depset.of(Artifact.TYPE, result);
    } else {
        throw Starlark.errorf("Output group %s not present", key);
    }
}

18 View Complete Implementation : AndroidAssetsInfo.java
Copyright Apache License 2.0
Author : bazelbuild
@Override
public Depset getreplacedetsForStarlark() {
    return Depset.of(Artifact.TYPE, transitivereplacedets);
}

18 View Complete Implementation : AndroidAssetsInfo.java
Copyright Apache License 2.0
Author : bazelbuild
@Override
public Depset getCompiledSymbolsForStarlark() {
    return Depset.of(Artifact.TYPE, transitiveCompiledSymbols);
}

18 View Complete Implementation : AndroidAssetsInfo.java
Copyright Apache License 2.0
Author : bazelbuild
@Override
public Depset getSymbolsForStarlark() {
    return Depset.of(Artifact.TYPE, transitiveSymbols);
}

18 View Complete Implementation : AndroidIdeInfoProvider.java
Copyright Apache License 2.0
Author : bazelbuild
@Override
public ImmutableMap<String, Depset> getNativeLibsSkylark() {
    ImmutableMap.Builder<String, Depset> builder = ImmutableMap.builder();
    for (Map.Entry<String, NestedSet<Artifact>> entry : getNativeLibs().entrySet()) {
        builder.put(entry.getKey(), Depset.of(Artifact.TYPE, entry.getValue()));
    }
    return builder.build();
}

18 View Complete Implementation : AndroidIdlProvider.java
Copyright Apache License 2.0
Author : bazelbuild
@Override
public Depset getTransitiveIdlJarsForStarlark() {
    return Depset.of(Artifact.TYPE, transitiveIdlJars);
}

18 View Complete Implementation : AndroidIdlProvider.java
Copyright Apache License 2.0
Author : bazelbuild
@Override
public Depset getTransitiveIdlPreprocessedForStarlark() {
    return Depset.of(Artifact.TYPE, transitiveIdlPreprocessed);
}

18 View Complete Implementation : AndroidIdlProvider.java
Copyright Apache License 2.0
Author : bazelbuild
@Override
public Depset getTransitiveIdlImportsForStarlark() {
    return Depset.of(Artifact.TYPE, transitiveIdlImports);
}

18 View Complete Implementation : AndroidLibraryAarInfo.java
Copyright Apache License 2.0
Author : bazelbuild
@Override
public Depset getTransitiveAarArtifactsForStarlark() {
    return Depset.of(Artifact.TYPE, transitiveAarArtifacts);
}

18 View Complete Implementation : AndroidLibraryResourceClassJarProvider.java
Copyright Apache License 2.0
Author : bazelbuild
@Override
public Depset getResourceClreplacedJarsForStarlark() {
    return Depset.of(Artifact.TYPE, resourceClreplacedJars);
}