I am trying to configure with Gradle a project which contains some external libraries. With Gradle I can setup different Environmental Configuration (with a class inside a c
This is not possible with library projects as you yourself mentioned.
You could just change the library project to an application project. That seems to work fine (at least in theory, I haven't tested it myself).
The other way would be to override that class in your application project. Your application project class will be chosen when merging takes place and you'll have those values available.