diff options
author | Xavier Ducrohet <xav@android.com> | 2013-07-01 13:57:56 -0700 |
---|---|---|
committer | Xavier Ducrohet <xav@android.com> | 2013-07-01 14:18:41 -0700 |
commit | 4fae04bf8b99ace66b8970f6fa344e884e9ae4fe (patch) | |
tree | 2276e8dc719a04d722137c7e66d0b8f0a10fa409 /builder/src/main/java/com/android | |
parent | daca5425d02fe1706f060d76865e84ffcae80c42 (diff) | |
download | build-4fae04bf8b99ace66b8970f6fa344e884e9ae4fe.tar.gz |
Add the original bundle to the library model.
This gives access both to the aar file and the exploded
folder (which may not be exploded yet when the model is queried).
Change-Id: Ieeba1ab19a8746448b047c73bcd1dcb23b47ab11
Diffstat (limited to 'builder/src/main/java/com/android')
-rw-r--r-- | builder/src/main/java/com/android/builder/dependency/LibraryBundle.java | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/builder/src/main/java/com/android/builder/dependency/LibraryBundle.java b/builder/src/main/java/com/android/builder/dependency/LibraryBundle.java index aff858b..a6083ff 100644 --- a/builder/src/main/java/com/android/builder/dependency/LibraryBundle.java +++ b/builder/src/main/java/com/android/builder/dependency/LibraryBundle.java @@ -34,20 +34,26 @@ public abstract class LibraryBundle implements LibraryDependency { public static final String FN_PROGUARD_TXT = "proguard.txt"; private final String mName; + private final File mBundle; private final File mBundleFolder; /** * Creates the bundle dependency with an optional name - * @param bundleFolder the folder containing the library + * + * @param bundle the library's aar bundle file + * @param bundleFolder the folder containing the unarchived library content * @param name an optional name */ - protected LibraryBundle(@NonNull File bundleFolder, @Nullable String name) { - mName = name; + protected LibraryBundle(@NonNull File bundle, + @NonNull File bundleFolder, + @Nullable String name) { + mBundle = bundle; mBundleFolder = bundleFolder; + mName = name; } - protected LibraryBundle(@NonNull File bundleFolder) { - this(bundleFolder, null); + protected LibraryBundle(@NonNull File bundle, @NonNull File bundleFolder) { + this(bundle, bundleFolder, null); } public String getName() { @@ -73,6 +79,12 @@ public abstract class LibraryBundle implements LibraryDependency { @Override @NonNull + public File getBundle() { + return mBundle; + } + + @Override + @NonNull public File getFolder() { return mBundleFolder; } |