Buck: robolectric_test()

robolectric_test()

A robolectric_test() rule is used to define a set of .java files that contain tests to run via JUnit with Robolectric test runner. It extends from java_test() rule.

Arguments

  • name (required) #

    The name of the rule.

  • robolectric_runtime_dependency (defaults to None) #

    Robolectric only runs in offline mode with buck. Specify the relative directory containing all the jars Robolectric uses at runtime.

  • robolectric_manifest (defaults to None) #

    An optional Android Manifest for the rule to declare any permissions or intents it may need or want to handle. May either be a file or a android_manifest target.

  • force_final_resource_ids (defaults to True) #

    Set it to false if using Robolectric version greater than 3.2 or higher as Robolectric requires resources id's to be non final.

  • extra_kotlinc_arguments (defaults to []) #

    List of additional arguments to pass into the Kotlin compiler.

  • 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.