public class AndroidPrebuiltAarDescription extends Object implements DescriptionWithTargetGraph<AndroidPrebuiltAarDescriptionArg>, Flavored, ImplicitDepsInferringDescription<AndroidPrebuiltAarDescriptionArg>
BuildRule
that wraps an .aar
file as an Android dependency.
This represents an Android Library Project packaged as an .aar
bundle as specified by:
https://developer.android.com/studio/projects/android-library#aar-contents. When it is in the
packageable deps of an AndroidBinary
, its contents will be included in the generated APK.
Note that the aar
may be specified as a SourcePath
, so it could be either a
binary .aar
file checked into version control, or a zip file that conforms to the .aar
specification that is generated by another build rule.
Modifier and Type | Field and Description |
---|---|
static Flavor |
AAR_UNZIP_FLAVOR |
Constructor and Description |
---|
AndroidPrebuiltAarDescription(ToolchainProvider toolchainProvider,
AndroidBuckConfig androidBuckConfig) |
Modifier and Type | Method and Description |
---|---|
BuildRule |
createBuildRule(BuildRuleCreationContextWithTargetGraph context,
BuildTarget buildTarget,
BuildRuleParams params,
AndroidPrebuiltAarDescriptionArg args)
Create a
BuildRule for the given BuildRuleParams . |
void |
findDepsForTargetFromConstructorArgs(BuildTarget buildTarget,
CellNameResolver cellRoots,
AndroidPrebuiltAarDescriptionArg constructorArg,
com.google.common.collect.ImmutableCollection.Builder<BuildTarget> extraDepsBuilder,
com.google.common.collect.ImmutableCollection.Builder<BuildTarget> targetGraphOnlyDepsBuilder) |
Class<AndroidPrebuiltAarDescriptionArg> |
getConstructorArgType()
The type of the constructor argument that is used by this description to create a rule
|
boolean |
hasFlavors(com.google.common.collect.ImmutableSet<Flavor> flavors,
TargetConfiguration toolchainTargetConfiguration) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
producesCacheableSubgraph
getConfigurationDeps
flavorDomains
public static final Flavor AAR_UNZIP_FLAVOR
public AndroidPrebuiltAarDescription(ToolchainProvider toolchainProvider, AndroidBuckConfig androidBuckConfig)
public boolean hasFlavors(com.google.common.collect.ImmutableSet<Flavor> flavors, TargetConfiguration toolchainTargetConfiguration)
hasFlavors
in interface Flavored
flavors
- The set of Flavor
s to consider. All must match.BuildRule
of the given Flavor
can be created.public Class<AndroidPrebuiltAarDescriptionArg> getConstructorArgType()
BaseDescription
getConstructorArgType
in interface BaseDescription<AndroidPrebuiltAarDescriptionArg>
public BuildRule createBuildRule(BuildRuleCreationContextWithTargetGraph context, BuildTarget buildTarget, BuildRuleParams params, AndroidPrebuiltAarDescriptionArg args)
DescriptionWithTargetGraph
BuildRule
for the given BuildRuleParams
. Note that the BuildTarget
referred to in the params
contains the Flavor
to create.createBuildRule
in interface DescriptionWithTargetGraph<AndroidPrebuiltAarDescriptionArg>
args
- A constructor argument, of type as returned by BaseDescription.getConstructorArgType()
.BuildRule
that describes the default flavour of the rule being described.public void findDepsForTargetFromConstructorArgs(BuildTarget buildTarget, CellNameResolver cellRoots, AndroidPrebuiltAarDescriptionArg constructorArg, com.google.common.collect.ImmutableCollection.Builder<BuildTarget> extraDepsBuilder, com.google.common.collect.ImmutableCollection.Builder<BuildTarget> targetGraphOnlyDepsBuilder)
findDepsForTargetFromConstructorArgs
in interface ImplicitDepsInferringDescription<AndroidPrebuiltAarDescriptionArg>