Search in sources :

Example 1 with AliasProvider

use of com.google.devtools.build.lib.rules.AliasProvider in project bazel by bazelbuild.

the class LabelAndConfiguration method of.

public static LabelAndConfiguration of(ConfiguredTarget configuredTarget) {
    AliasProvider aliasProvider = configuredTarget.getProvider(AliasProvider.class);
    Label label = aliasProvider != null ? aliasProvider.getAliasChain().get(0) : configuredTarget.getLabel();
    return new LabelAndConfiguration(label, configuredTarget.getConfiguration());
}
Also used : AliasProvider(com.google.devtools.build.lib.rules.AliasProvider) Label(com.google.devtools.build.lib.cmdline.Label)

Aggregations

Label (com.google.devtools.build.lib.cmdline.Label)1 AliasProvider (com.google.devtools.build.lib.rules.AliasProvider)1