Within my Android projects I can specify Gradle constants as follows:
buildConfigField 'Boolean', 'analyticsEnabled', 'false'
and access them in my Android application like this:-
public boolean isAnalyticsEnabled() {
return BuildConfig.analyticsEnabled;
}
How can I get the same functionality within a Java library Gradle build script?
To be more precise, I am developing a custom annotation processor as a pure Java project (library) that my Android application is dependant on.
I would like to define constants within my Java Gradle build file that are accessible by my annotation processor.
If this is possible, then how to I achieve it?