aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/tools/android/java/com/google/devtools/build/android/aapt2/ResourceLinker.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/android/java/com/google/devtools/build/android/aapt2/ResourceLinker.java')
-rw-r--r--src/tools/android/java/com/google/devtools/build/android/aapt2/ResourceLinker.java25
1 files changed, 2 insertions, 23 deletions
diff --git a/src/tools/android/java/com/google/devtools/build/android/aapt2/ResourceLinker.java b/src/tools/android/java/com/google/devtools/build/android/aapt2/ResourceLinker.java
index 32590f2a7e..2bd13aba59 100644
--- a/src/tools/android/java/com/google/devtools/build/android/aapt2/ResourceLinker.java
+++ b/src/tools/android/java/com/google/devtools/build/android/aapt2/ResourceLinker.java
@@ -72,7 +72,7 @@ import java.util.stream.Stream;
public class ResourceLinker {
private static final Predicate<String> IS_JAR = s -> s.endsWith(".jar");
- private static final String PROTO_EXTENSION = "pb-apk";
+ private static final String PROTO_EXTENSION = "-pb.apk";
private static final String BINARY_EXTENSION = "apk";
private boolean debug;
private static final Predicate<DirectoryEntry> IS_FLAT_FILE =
@@ -348,27 +348,6 @@ public class ResourceLinker {
return fileName.substring(0, lastIndex).concat(".").concat(newExtension);
}
- private Path convertToBinary(ProtoApk apk) {
- Path apkPath = apk.asApkPath();
- try {
- profiler.startTask("convertToBinary");
- final Path outPath =
- workingDirectory.resolveSibling(
- replaceExtension(apkPath.getFileName().toString(), BINARY_EXTENSION));
- logger.fine(
- new AaptCommandBuilder(aapt2)
- .add("convert")
- .add("-o", outPath)
- .add("--output-format", "binary")
- .add(apkPath.toString())
- .execute("Converting " + apkPath));
- profiler.recordEndOf("convertToBinary");
- return outPath;
- } catch (IOException e) {
- throw new LinkError(e);
- }
- }
-
private ProtoApk linkProtoApk(
CompiledResources compiled,
Path rTxt,
@@ -571,7 +550,7 @@ public class ResourceLinker {
.add("--stable-ids", resourceIds)
.add("--manifest", manifest)
.addRepeated("-I", StaticLibrary.toPathStrings(linkAgainst))
- .add("-R", convertToBinary(protoApk))
+ .add("-R", protoApk.asApkPath())
.add("-o", apk.toString())
.execute(String.format("Re-linking %s", protoApkPath)));
return combineApks(protoApkPath, apk, working);