aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/tools/android/java/com/google/devtools/build/android/aapt2/PackagedResources.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/android/java/com/google/devtools/build/android/aapt2/PackagedResources.java')
-rw-r--r--src/tools/android/java/com/google/devtools/build/android/aapt2/PackagedResources.java45
1 files changed, 8 insertions, 37 deletions
diff --git a/src/tools/android/java/com/google/devtools/build/android/aapt2/PackagedResources.java b/src/tools/android/java/com/google/devtools/build/android/aapt2/PackagedResources.java
index 2d92b4e071..faad2cd868 100644
--- a/src/tools/android/java/com/google/devtools/build/android/aapt2/PackagedResources.java
+++ b/src/tools/android/java/com/google/devtools/build/android/aapt2/PackagedResources.java
@@ -14,7 +14,6 @@
package com.google.devtools.build.android.aapt2;
import com.google.devtools.build.android.AndroidResourceOutputs;
-import com.google.devtools.build.android.ResourcesZip;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
@@ -24,64 +23,47 @@ import javax.annotation.Nullable;
public class PackagedResources {
private final Path apk;
- private final Path proto;
private final Path rTxt;
private final Path proguardConfig;
private final Path mainDexProguard;
private final Path javaSourceDirectory;
private final Path resourceIds;
- private final Path attributes;
private PackagedResources(
Path apk,
- Path proto,
Path rTxt,
Path proguardConfig,
Path mainDexProguard,
Path javaSourceDirectory,
- Path resourceIds,
- Path attributes) {
+ Path resourceIds) {
this.apk = apk;
- this.proto = proto;
this.rTxt = rTxt;
this.proguardConfig = proguardConfig;
this.mainDexProguard = mainDexProguard;
this.javaSourceDirectory = javaSourceDirectory;
this.resourceIds = resourceIds;
- this.attributes = attributes;
}
public static PackagedResources of(
Path outPath,
- Path protoPath,
Path rTxt,
Path proguardConfig,
Path mainDexProguard,
Path javaSourceDirectory,
- Path resourceIds,
- Path attributes)
+ Path resourceIds)
throws IOException {
return new PackagedResources(
- outPath,
- protoPath,
- rTxt,
- proguardConfig,
- mainDexProguard,
- javaSourceDirectory,
- resourceIds,
- attributes);
+ outPath, rTxt, proguardConfig, mainDexProguard, javaSourceDirectory, resourceIds);
}
public PackagedResources copyPackageTo(Path packagePath) throws IOException {
return of(
copy(apk, packagePath),
- proto,
rTxt,
proguardConfig,
mainDexProguard,
javaSourceDirectory,
- resourceIds,
- attributes);
+ resourceIds);
}
public PackagedResources copyRTxtTo(Path rOutput) throws IOException {
@@ -90,13 +72,11 @@ public class PackagedResources {
}
return new PackagedResources(
apk,
- proto,
copy(rTxt, rOutput),
proguardConfig,
mainDexProguard,
javaSourceDirectory,
- resourceIds,
- attributes);
+ resourceIds);
}
private Path copy(Path from, Path out) throws IOException {
@@ -111,13 +91,11 @@ public class PackagedResources {
}
return of(
apk,
- proto,
rTxt,
copy(proguardConfig, proguardOut),
mainDexProguard,
javaSourceDirectory,
- resourceIds,
- attributes);
+ resourceIds);
}
public PackagedResources copyMainDexProguardTo(Path mainDexProguardOut) throws IOException {
@@ -126,13 +104,11 @@ public class PackagedResources {
}
return of(
apk,
- proto,
rTxt,
proguardConfig,
copy(mainDexProguard, mainDexProguardOut),
javaSourceDirectory,
- resourceIds,
- attributes);
+ resourceIds);
}
public PackagedResources createSourceJar(@Nullable Path sourceJarPath) throws IOException {
@@ -140,12 +116,7 @@ public class PackagedResources {
return this;
}
AndroidResourceOutputs.createSrcJar(javaSourceDirectory, sourceJarPath, false);
- return of(
- apk, proto, rTxt, proguardConfig, mainDexProguard, sourceJarPath, resourceIds, attributes);
- }
-
- public ResourcesZip packageWith(Path resourceRoot) {
- return ResourcesZip.fromApkWithProto(proto, attributes, resourceRoot, apk, resourceIds);
+ return of(apk, rTxt, proguardConfig, mainDexProguard, sourceJarPath, resourceIds);
}
public Path getResourceIds() {