Sharing project properties between different modules in Android Studio -


Inside the Android Studio Project, I'm writing Android 2 apps that share a library that they write to a library.
  project / - app1 / - app2 / - mylibrary/   

Therefore, in the build1 the grade of app1 and app2, I need to include a dependency For Mylibrary's compilation

  Dependency {// Compiled Shared Library Compilation Project (': mylibrary') / / local binary dependency compiled fileTree (dir: 'libs', includes: ['* .jar'] )}   

So far, everything is working fine.

Then, I'm creating both app1 and app2 with 2 different scripts and I am including some custom standards during each building. For example, the building script for app1 will be:

  collect CD app1 ./gradlew Reaction -excoded = $ VERSION_CODE -PversionName = $ VERSION_NAME -PWS_URL = $ WS_URL   

I can access versionName, versionCode and WS_URL parameters from propen.property in build.gradle of "app1", but in the problem I can not do with build.gradle of "mylibrary" and share it with me Information Needed

Is there any way to share this information in both "Ep 1" and "My Library"?

Thanks in advance!

is a way to access the properties of another project by using the project (: name) method, where : name is the identifier for the project you want to access. You can find more information about this.

In your specific case, you can define your 'app1' attribute in something like 'mylibrary' by something like project (: mylibrary). is using the property ('some') and project (: mylibrary) .property ('some'), or 'app1' in 'mylibrary': App1) Instead

You can store -PversionCode in ext to make the code cleaner and easy to use (like project (: App 1) .ext.versionCode .

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -