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