What you could do:

- loop on variant and add a doLast on the apk generating(*) task of each
that adds the generated file (variant.getOutputFile()) to a list that's a
project property (e.g. project.ext.generatedFiles). This will only run when
the task generating the file is run.

- You can also create a task that runs after all the apk generating tasks
that reads the list and does whatever with it (see Gradle's mustRunAfter
mechanism)

(*) the apk generating task is going to depend on a few things.
- is the apk signed?
- is the apk zipaligned?
Depending on this you'll have to use one of these tasks:
- variant.packageApplication (for signed and unsigned, unless you do custom
signing)
- variant.zipAlign
(Maybe I should add a shortcut to this)






On Fri, Jan 10, 2014 at 11:18 AM, Stefan Hoth <[email protected]>wrote:

> Hi there,
>
> I'm currently playing around with a CI server and an Android project. So
> far I could get it to work but I want to automate more.
>
> One of the problems I couldn't solve is how I know which apk-files have
> been created in this particular build and how to find them. I know where
> there are ( ./app/build/apk/*.apk ) but I don't know how they are called
> and which ones in there might be there from a previous build.
>
> Always doing a clean before the build slows down the build, too, so I want
> to avoid that.
>
> Best would be, from the CI-server perspective, if I could access a
> variable that contains all final names with their full path.
>
> How do I do that so I can do further stuff like archiving certain build
> files etc?
>
> Thanks and have a great weekend,
> Stefan
>
> --
> You received this message because you are subscribed to the Google Groups
> "adt-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.
http://developer.android.com | http://tools.android.com

Please do not send me questions directly. Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to