diff options
author | Googler <noreply@google.com> | 2016-03-24 20:33:51 +0000 |
---|---|---|
committer | Kristina Chodorow <kchodorow@google.com> | 2016-03-25 22:00:18 +0000 |
commit | efe9bc3d05353dea293838fc961d4f16e1274050 (patch) | |
tree | bf7b9d773d28052ca4c843f3697e5596f130dadc /src/tools/android/java/com/google/devtools/build/android/DataResource.java | |
parent | 68e193288e2306c763a719102531da65bf417cbc (diff) |
Part 3.5 of 5: Assets
Adds support for parsing and merging assets. This introduces the DataKey and DataAsset interfaces which allow reuse of the FileDataResource for assets, the RelativeAssetPath which acts as a DataKey for assets (the relative asset path is the path that the asset will reside inside the final apk.) It also extends the AndroidDataSetBuilder to handle the creation of assets, and cleans up the interface a little.
--
MOS_MIGRATED_REVID=118060379
Diffstat (limited to 'src/tools/android/java/com/google/devtools/build/android/DataResource.java')
-rw-r--r-- | src/tools/android/java/com/google/devtools/build/android/DataResource.java | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/tools/android/java/com/google/devtools/build/android/DataResource.java b/src/tools/android/java/com/google/devtools/build/android/DataResource.java index 4e64fb7ae3..877a701258 100644 --- a/src/tools/android/java/com/google/devtools/build/android/DataResource.java +++ b/src/tools/android/java/com/google/devtools/build/android/DataResource.java @@ -19,12 +19,12 @@ import java.nio.file.Path; /** * Represents an Android Resource parsed from an xml or binary file. */ -public interface DataResource extends Comparable<DataResource> { +public interface DataResource { /** - * Provides the FullyQualifiedName of the DataResource + * Provides the FullyQualifiedName of the DataResource. */ - FullyQualifiedName fullyQualifiedName(); + DataKey dataKey(); /** * Provides the Path to the file from which the DataResource was derived. @@ -37,4 +37,11 @@ public interface DataResource extends Comparable<DataResource> { * @throws IOException if there are issues with writing the resource. */ void write(Path newResourceDirectory) throws IOException; + + /** + * Compares one data resource to another. + * + * Not implementing Comparable as it would conlfict with DataAsset. + */ + int compareTo(DataResource other); } |