Hey,

Thanks for the answer. Actually the annotation processor runs after the
Gradle Android plugin generated resources etc.
So basically i am asking whether is there an indicator file which the
plugin generates and we can check.
Like we are already using the full manifest generated by the Android Gradle
plugin.


Csabi

On 4 November 2015 at 11:19, Michal Bendowski <[email protected]> wrote:

> You can imagine a build.gradle file with the following code:
>
> if (new Random().nextInt() > 42) {
>     apply plugin: 'com.android.application'
> } else {
>     apply plugin: 'com.android.library'
> }
>
>
> so there's no reliable way to check, unless you are being invoked by a
> Gradle task and the task passes that information to you somehow.
>
> HTH,
>
> Michal
>
> On Tuesday, November 3, 2015 at 8:58:31 AM UTC, Csaba Kozák wrote:
>>
>> We are writing an annotation processor and we want to know the currently
>> processed project is a library project or not.
>> In the old ways, we could just parse the project.properties file.
>> Is there a way to get this information in case of Gradle builds (without
>> parsing the whole build script)?
>>
>> Thanks, in advance!
>>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "adt-dev" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/adt-dev/MXg9G8oCceY/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.

Reply via email to