current buildType

1,665 views
Skip to first unread message

Tomáš Procházka

unread,
Oct 6, 2014, 11:41:06 AM10/6/14
to adt...@googlegroups.com
Hi.

Is possible to check which buildType is actually builded?

When I check

android.applicationVariants.all { variant ->
    variant.outputs.each { output ->


it will always contain all output files, independently on the current buildType.
I mean that it contain debug and release also when I run gradlew assembleDebug or also when I run only gradlew tasks.



Jake Wharton

unread,
Oct 6, 2014, 12:11:13 PM10/6/14
to adt...@googlegroups.com
Add a task which depends on each assembleXxx task. If it's invoked, the build type was built.

--
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 adt-dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Xavier Ducrohet

unread,
Oct 6, 2014, 12:30:03 PM10/6/14
to adt...@googlegroups.com
android.applicationVariants.all { variant ->
    variant.outputs.each { output ->
    }
}

is not specific to what task(s) you are about to run. This about project configuration and this includes all configurations whether they will be built or not.

On Mon, Oct 6, 2014 at 8:41 AM, Tomáš Procházka <tomas.p...@gmail.com> wrote:

--
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 adt-dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



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

Please do not send me questions directly. Thanks!

Jake Wharton

unread,
Oct 6, 2014, 12:39:13 PM10/6/14
to adt...@googlegroups.com
On Mon, Oct 6, 2014 at 9:10 AM, Jake Wharton <jakew...@gmail.com> wrote:
Add a task which depends on each assembleXxx task. If it's invoked, the build type was built.

Sorry I meant the reverse: add a task for each build type and make each respective assembleXxx depend on it. If that task is run then the build type was assembled.

Tomáš Procházka

unread,
Oct 7, 2014, 3:58:19 AM10/7/14
to adt...@googlegroups.com
Thanks. It should work.

Dne pondělí, 6. října 2014 18:39:13 UTC+2 Jake Wharton napsal(a):
Reply all
Reply to author
Forward
0 new messages