Open eunikolsky opened 9 years ago
ZeroConfDiscoveryProvider
be in core
or AirPlay
module, considering it's currently used in AirPlay
only?For extra flexibility and improving build times, all third-party frameworks (GCDWebServer
, XMLWriter
, etc.) could be extracted into their own static libraries.
A PoC project is available here: https://github.com/ConnectSDK/Connect-SDK-iOS/tree/poc/165_better_modules
The ConnectSDKDefaultPlatforms.h
file would have to include all supported platforms. Currently, the DiscoveryManager
silently ignores missing classes. We can change it to log a note that this class is not available, you may want to compile extra modules.
We can merge submodules back into the main repo saving the history with this tip: http://stackoverflow.com/a/23328223/635603 !
An example of how such a system can work is the ShareKit
library project. And here is the description: https://github.com/ShareKit/ShareKit/wiki/Granular-install
We currently have two projects (
Full
andLite
) and three submodules (core
,google-cast
, andsamsung-multiscreen
). Five repositories! As we're adding more modules, it'll get harder to maintain. Plus, what if our users want WebOS, DLNA, Cast, and Multiscreen support only? Either remove classes fromFull
version, or add modules manually toLite
version.Here's a suggested better solution: Use one project and one repository for everything, and define targets for different platforms. That is,
core
(analogous to currentLite
) would include WebOS, Netcast, smth else;roku
would buildRoku
-classes only;airplay
would buildAirplay
support only; etc. Each of them produces a static library and a set of headers (or a framework), and the user can linkcore
,cast
, androku
libraries to their app, getting only those platforms. Effectively, that's how CocoaPods works now. It would be easy to define subspecs in ourpodspec
.Check:
It should be possible to do the similar thing on Android with gradle's flavors.