Comments (6)
Sorry about that. I will add some readme as soon as I find the time.
In general this project what it does is adding the gradle dependencies to the project based on a configuration file and not hardcoded in the app gradle file. You can take a look to this file:
https://github.com/pablichjenkov/PluginManager/blob/master/app/build.gradle
and you will have an idea of what the project is about.
For example, lets say you have a common base code that is used for several customers. Then one customer wants to use Picasso Image Loader whilst another customer wish to use Glide.
In this case what you do is to define a common ImageLoaderIntf interface and create one Picasso implementation and one Glide implementation that conforms to that interface. However, in the gradle file you will have to include both external libraries dependencies. That could make your project have unnecessary dependencies that will never be used, bloating the size of your apk/lib. So the solution is to add only the dependencies that your specific Image loader library needs. That is done programmatically at build time when the app gradle is executed, based on the plugin configuration file in the assets directory.
from pluginmanager.
Why not have the implementations in separate modules?
Eg
ImageLoaderIntf-glide
ImageLoaderIntf-picasso
from pluginmanager.
You can have both implementations in separate modules. However, in the app using one of the implementations you will have to "manually" change/touch the gradle file per custom build. When the amount of plugins grow a little bit, it becomes a bit uncomfortable having to manually select the plugins.
In this project it does that by using a plugin_config.json file which contains the information of specific dependencies for specific build. So there is no need to touch the gradle file.
from pluginmanager.
You can have both implementations in separate modules. However, in the app using one of the implementations you will have to "manually" change/touch the gradle file per custom build. When the amount of plugins grow a little bit, it becomes a bit uncomfortable having to manually select the plugins.
In this project it does that by using a plugin_config.json file which contains the information of specific dependencies for specific build. So there is no need to touch the gradle file.
Hmmm what if you want certain modules as api
and others as implementation
from pluginmanager.
You still will have to manually modify the build.gradle file
from pluginmanager.
Sorry about that. I will add some readme as soon as I find the time.
In general this project what it does is adding the gradle dependencies to the project based on a configuration file and not hardcoded in the app gradle file. You can take a look to this file:https://github.com/pablichjenkov/PluginManager/blob/master/app/build.gradle
and you will have an idea of what the project is about.
For example, lets say you have a common base code that is used for several customers. Then one customer wants to use Picasso Image Loader whilst another customer wish to use Glide.
In this case what you do is to define a common ImageLoaderIntf interface and create one Picasso implementation and one Glide implementation that conforms to that interface. However, in the gradle file you will have to include both external libraries dependencies. That could make your project have unnecessary dependencies that will never be used, bloating the size of your apk/lib. So the solution is to add only the dependencies that your specific Image loader library needs. That is done programmatically at build time when the app gradle is executed, based on the plugin configuration file in the assets directory.
Please let me know when you add a readme :)
from pluginmanager.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pluginmanager.