Thanks, madis. I will try this out.
BTW, the "variant filter" doesn't seem to be include in the guide link, is
it a new feature added recently.
York
On Tuesday, August 26, 2014 5:30:51 AM UTC+8, madisp wrote:
>
> You could use the variant filter to achieve this, say you have a method
> called "matches" in your buildscript that returns true for variants that
> should be included based on a passed in property called "myFilter":
>
> android.variantFilter { variant -> variant.setIgnore(!matches(variant)) }
>
> then you could just call something like "gradle assemble
> -PmyFilter=ama\*Release
>
> Cheers,
> -madis
>
> On Monday, 25 August 2014 12:33:44 UTC+2, Ye Wang wrote:
>>
>> At present the build tool can build either a specific flavor or all
>> flavors once a time:
>>
>> gradle clean assembleAmazonRelease ---> build flavor amazon
>>
>> gradle clean assembleRelease ---> build all flavors
>>
>> There is no way to build a number of flavors (we use some patterns for
>> flavor name), say if I try the following command:
>>
>> gradle clean assemble*-classARelease
>>
>> it is ended with an error message:
>>
>> FAILURE: Build failed with an exception.
>>
>> * What went wrong:
>> Task 'assembleAma*Release' not found in root project 'bla.bla.bla'.
>> Some candidates are: 'assembleBlaBlaBlaRelease' ... ...
>>
>> * Try:
>> Run gradle tasks to get a list of available tasks. Run with
>> --stacktrace option to get the stack trace. Run with --info
>> or
>> -
>> -debug
>> option to get more log output.
>>
>> BUILD FAILED
>>
>> Is it a good idea to let Gradle accept wildcard flavor name to allows
>> build a number of flavors, without manually modify build.gradle file every
>> time?
>>
>>
>> Thanks,
>> York
>>
>
--
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/d/optout.