diff options
author | dannark <dannark@google.com> | 2018-02-10 21:54:35 -0800 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-02-10 21:56:02 -0800 |
commit | e3bbfdb839a483f1a418a94d857c25794006fbe0 (patch) | |
tree | 3791c9f9a70f152708e3af54c35c1803b67f0f9e /src/main/java/com | |
parent | f13a7ef7c9eb7ce400ffbbaca0bdc7945172a332 (diff) |
Add custom_package attribute to android_local_test.
android_local_test generates and R.class file and so this is necessary for projects that don't nest their BUILD files under a java/ or javatests/ root.
Fixes #4618
RELNOTES: None
PiperOrigin-RevId: 185281836
Diffstat (limited to 'src/main/java/com')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/android/AndroidLocalTestBaseRule.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidLocalTestBaseRule.java b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidLocalTestBaseRule.java index 0ef779b4f2..3d758f1fa9 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidLocalTestBaseRule.java +++ b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidLocalTestBaseRule.java @@ -129,6 +129,12 @@ public class AndroidLocalTestBaseRule implements RuleDefinition { the libraries under test have a <code>minSdkVersion</code> tag in them. <!-- #END_BLAZE_RULE.ATTRIBUTE --> */ .add(attr("manifest", LABEL).allowedFileTypes(FileTypeSet.ANY_FILE)) + /* <!-- #BLAZE_RULE($android_local_test_base).ATTRIBUTE(custom_package) --> + Java package in which the R class will be generated. By default the package is inferred + from the directory where the BUILD file containing the rule is. If you use this attribute, + you will likely need to use <code>test_class</code> as well. + <!-- #END_BLAZE_RULE.ATTRIBUTE --> */ + .add(attr("custom_package", STRING)) .add( attr("resource_files", LABEL_LIST) .allowedFileTypes(FileTypeSet.ANY_FILE) |