When does the BuildConfig package name get set?

1,163 views
Skip to first unread message

Joe Blubaugh

unread,
Oct 24, 2014, 8:35:49 PM10/24/14
to adt...@googlegroups.com
I'm trying to customize the bundling of a dependency in a gradle build by "shadowing" all the class files as a different package.

The library is set up as an android library project and has the package name
com.example.lib.*

I plan to bundle it wiht the package:
shadow.com.example.lib.*

I'm able generate an AAR (and jar) with the package name shadowed but the generated BuildConfig.java is still being created with the class name
com.example.lib.BuildConfig

Where does the BuildConfig's package name come from? I've tried modifying the applicationId in the library's build.gradle but still see BuildConfig generated with the original package name.

Xavier Ducrohet

unread,
Oct 24, 2014, 8:48:03 PM10/24/14
to adt...@googlegroups.com
It comes from the manifest.

We actually disallow changing the applicationId for a library because it wouldn't work. In the next version of the plugin we're making the build break if you call applicationId on a library project.

--
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 adt-dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.
http://developer.android.com | http://tools.android.com

Please do not send me questions directly. Thanks!
Reply all
Reply to author
Forward
0 new messages