Buck: gen_aidl()
Support Ukraine. Help Provide Humanitarian Aid to Ukraine.

gen_aidl()

A gen_aidl() rule is used to generate .java files from .aidl files.

Arguments

  • name (required) #

    The short name for this build target.

  • aidl (required) #

    The path to an .aidl file to convert to a .java file.

  • import_path (required) #

    The search path for import statements for the aidl command. (This is the -I argument when invoking aidl from the command line. For many apps it will be the base dir where all aidl files are, with project root as its parent, e.g. app/src/main/aidl.). This is the same as the path to the aidl file relative to what would be returned from buck root.

  • aidl_srcs (defaults to []) #

    Path to .aidl files the target aidl file imports.

  • deps (defaults to []) #

    A list of rules that must be built before this rule.

  • visibility (defaults to []) #

    List of build target patterns that identify the build rules that can include this rule as a dependency, for example, by listing it in their deps or exported_deps attributes. For more information, see visibility.

  • licenses (defaults to []) #

    Set of license files for this library. To get the list of license files for a given build rule and all of its dependencies, you can use buck query.

  • labels (defaults to []) #

    Set of arbitrary strings which allow you to annotate a build rule with tags that can be searched for over an entire dependency tree using buck query attrfilter().

Examples

android_library(
  name = 'lib',
  srcs = glob(['**/*.java']) + [':aidl'],
  manifest = '//res/org/opencv:manifest',
  deps = [
    '//res/org/opencv:res',
  ],
  visibility = [ 'PUBLIC' ],
)

gen_aidl(
    name = 'aidl',
    aidl = 'engine/OpenCVEngineInterface.aidl',
    import_path = 'java/',
)