Skip to content

Commit

Permalink
Tweak the shell text munging expression used to figure out a relative…
Browse files Browse the repository at this point in the history
… path to aapt.

Turns out, it does the wrong thing when using --nodistinct_host_configuration. Not that option should ever be used, but still.

Fixes #523. Probably.

--
MOS_MIGRATED_REVID=110232316
  • Loading branch information
lberki authored and dslomov committed Dec 15, 2015
1 parent 64fa351 commit c0310fe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ public SkyValue fetch(Rule rule, Path outputDirectory, Environment env)
}

String buildFile = template
.replaceAll("%repository_name%", rule.getName())
.replaceAll("%build_tools_version%", buildToolsVersion)
.replaceAll("%api_level%", apiLevel.toString());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,9 @@ filegroup(
srcs = [],
cmd = "\n".join(["cat > $@ << 'EOF'",
"#!/bin/bash -eu",
"BINARY=$${0##*-out/host/bin/}",
"DIRNAME=$$(dirname $$BINARY)",
"SDK=$${0}.runfiles/$${DIRNAME}",
# The tools under build-tools/VERSION require the libraries under build-tools/VERSION/lib,
# so we can't simply depend on them as a file like we do with aapt.
"SDK=$${0}.runfiles/external/%repository_name%",
"exec $${SDK}/build-tools/%build_tools_version%/" + tool + " $$*",
"EOF\n"]),
) for tool in ["aapt", "aidl", "zipalign"]]
Expand Down

0 comments on commit c0310fe

Please sign in to comment.