aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com
diff options
context:
space:
mode:
authorGravatar jingwen <jingwen@google.com>2018-01-23 08:53:11 -0800
committerGravatar Copybara-Service <copybara-piper@google.com>2018-01-23 08:55:06 -0800
commit96a9a2baa31da9d11e3cdaf152241991ae832f35 (patch)
treee7acad49d63ef2b83e2846a077344ba75cec458d /src/main/java/com
parentd452163286e9e4936ed9e5a83ef2f009a3535df4 (diff)
Pass the correct path of aapt_binary and merge its data runfiles into android_instrumentation_test's runfiles.
GITHUB: #903 RELNOTES: None. PiperOrigin-RevId: 182940009
Diffstat (limited to 'src/main/java/com')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/android/AndroidInstrumentationTest.java3
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/android/android_instrumentation_test_template.txt2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidInstrumentationTest.java b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidInstrumentationTest.java
index 33dee6c938..96ea978498 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidInstrumentationTest.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidInstrumentationTest.java
@@ -85,7 +85,7 @@ public class AndroidInstrumentationTest implements RuleConfiguredTargetFactory {
.addTargets(runfilesDeps, RunfilesProvider.DEFAULT_RUNFILES)
.addTransitiveArtifacts(AndroidCommon.getSupportApks(ruleContext))
.addTransitiveArtifacts(getAdb(ruleContext).getFilesToRun())
- .addTransitiveArtifacts(getAapt(ruleContext).getFilesToRun())
+ .merge(getAapt(ruleContext).getRunfilesSupport())
.addArtifacts(getDataDeps(ruleContext))
.build();
@@ -121,6 +121,7 @@ public class AndroidInstrumentationTest implements RuleConfiguredTargetFactory {
.add(Substitution.of("%workspace%", ruleContext.getWorkspaceName()))
.add(Substitution.of("%test_label%", ruleContext.getLabel().getCanonicalForm()))
.add(executableSubstitution("%adb%", getAdb(ruleContext)))
+ .add(executableSubstitution("%aapt%", getAapt(ruleContext)))
.add(executableSubstitution("%device_script%", getTargetDevice(ruleContext)))
.add(executableSubstitution("%test_entry_point%", getTestEntryPoint(ruleContext)))
.add(artifactSubstitution("%target_apk%", getTargetApk(ruleContext)))
diff --git a/src/main/java/com/google/devtools/build/lib/rules/android/android_instrumentation_test_template.txt b/src/main/java/com/google/devtools/build/lib/rules/android/android_instrumentation_test_template.txt
index 07dd76ce6b..b2863c1f35 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/android/android_instrumentation_test_template.txt
+++ b/src/main/java/com/google/devtools/build/lib/rules/android/android_instrumentation_test_template.txt
@@ -44,7 +44,7 @@ test_entry_point="%test_entry_point%"
log_levels="%log_levels%"
WORKSPACE_DIR="${TEST_SRCDIR}/%workspace%"
adb="${WORKSPACE_DIR}/%adb%"
-aapt="${WORKSPACE_DIR}/../../external/androidsdk/aapt_binary"
+aapt="${WORKSPACE_DIR}/%aapt%"
device_script="${WORKSPACE_DIR}/%device_script%"
data_deps="%data_deps%"