Fix multi-apk logic to use versionCode.

The store logic does not actually look for a best
match, but instead look for all compatible devices
and then simply select the one with the highest versionCode.

Changed the model to add the versionCode to the SplitOutput
so that the logic can use it.

Change-Id: I15717a4261b6697eb491cf51679d4dbe5ad57806
(cherry picked from commit 6e986752c1f9696ad81658eace4381d758b5e7af)
Merge "Fix multi-apk logic to use versionCode." into idea133-milestone
Fix proguard's handling of config files. again.

My previous fix setup the proguard files with all
possible config files, not knowing which one would
exist or not. It turns out that the tests we have
for this didn't include a case where an aar does not
have a config file.

Proguard requires all files passed during setup to actually
exist during executions.

As a first fix, I'm moving the setup in the doFirst of the
task where we know that the files either exist or don't. I
also fixed our test project to better test this area.

However this uncovered an issue that using doFirst means
that that proguard task will not use changes in config
files to trigger a task execution. If only config files
are changed, the task is considered up to date. This is
a bigger problem to fix that will come in a later fix.

Change-Id: Iecafa7181b0f827eb9f78418acaf98df8e632839
(cherry picked from commit 0416ab8279f1d4b46bd3d256f1e2837c33a994ec)
Merge "Fix proguard's handling of config files. again." into idea133-milestone
Use a closure to setup proguard's config files.

This allows to compute the list only when the
task is about the run and to properly handle cases where
only the config files are touched (and trigger a new task
execution).

Change-Id: I55aa4d7bdfc4ef95532757a009921de653f20ced
(cherry picked from commit 89b3a4234b00f4f57011c1a3e6450607f26a57b2)
Merge "Use a closure to setup proguard's config files." into idea133-milestone