I'm using AndroidStudio and I have the following:
- Main Android project: app
- Java Library: communication
I want to set up my "communication" module's gradle file to achieve the following:
As app module's gradle, I can setup variables for BuildConfig.java file, e.g.:
buildTypes { release { ... buildConfigField "String", "SERVER_URL", '"my_url"' } debug { buildConfigField "String", "SERVER_URL", '"my_url"' } }
and then I can use them using BuildConfig.SERVER_URL
The question is: How do I achieve this using a Java Library module?