简体   繁体   中英

Argument passed from Main App to Library project with Gradle

I have one library project which contains a ContentProvider, because there is no possibility to use the same AUTHORITY within multiple app (expected behavior) I am asking if there is a way that the library will use an argument given by the main app project. It will permits me to change dynamically the AUTHORITY string from the app project. But for now, I didn't find any trick to do such a thing with Gradle.

Is it possible, or am I obliged to create a buildVariant for each App within the library project ? Because it's the only trick I've found for now.

我没有找到使用Gradle进行此类操作的任何解决方案,但是由于此解决方案,我找到了一种可能的解决方法: https : //stackoverflow.com/a/14592121/1312889

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM