Prateek
Prateek

Reputation: 1072

BuildConfig file in android - Purpose and Possibilities

Android has a flag called DEBUG in BuildConfig.java. Can someone please explain how is this file created? What is the purpose of having an auto-generated file with a single variable in it?

Is it possible to have something besides DEBUG flag inside this class? What if I want a configuration other than development and release configuration? How can I achieve it?

Upvotes: 29

Views: 37823

Answers (1)

Miki Franko
Miki Franko

Reputation: 687

BuildConfig.java is generated automatically by Android build tools, and is placed into the gen folder.

Upvotes: 19

Related Questions