tuist / microfeatures-example

đŸ“ŠđŸ“± Example of iOS app built using the uFeatures architecture
MIT License
193 stars 27 forks source link

More detailed elaboration on project structure #14

Open nugmanoff opened 4 years ago

nugmanoff commented 4 years ago

Hello!

First of all, thanks for such a great demonstration of an amazing approach!

But can you please elaborate and give more details about serving dependencies:

đŸ„‘ App dependencies fetched with CocoaPods. 🍒 Core dependencies fetched with Carthage. What are the App dependencies and what are Core dependencies and what is the difference between them?

I am trying to structure my monorepository which contains several projects and I'd love to use your approach. But I have a few questions:

Let's assume that I want to structure my monorepository (containing multiple apps) as follows:

AppX
AppY
Development Frameworks
Third-party Frameworks

Where development frameworks are my privately developed and reusable across applications pieces of functionality.

What do I want to achieve?

I want to have Carthage build artifacts to be shared among applications and development frameworks. Something like this:

AppX
AppY
Carthage (Third-party Frameworks)
Development Frameworks

The best way to do it that I found so far is this gist. But how reliable & scalable is it?

I want to be able to use Rome caching on top of shared build artifacts. Some advice on this would appreciated :)

There is one last (but big problem). Let's suppose I have following structure:

AppX/
AppY/
- Third-party framework A
Development Frameworks/
- Development Framework Z
- - Third-party framework A
Carthage/

I want to be to do it the way that both AppY and Development Framework Z leverage the usage of the same version of Third-party framework A.

‱ Both AppX and AppY have different Cartfile & Cartfile.resolved ‱ Carthage is the directory produced by Carthage itself (with Checkouts/ and Build/). It stores Third-party Dependencies that are added using Carthage. ‱ Development Frameworks contain my private local frameworks that are shared between AppX & AppY. They are just basically .xcodeproj projects. But they can have their own Cartfile & Cartfile.resolved.

Idea is that Third-party Dependencies that are added using Carthage will be stored in one folder only and shared across Apps & Development Frameworks that refer to them using Cartfile.

Is it possible to serve private foundation modules (like networking, analytics) that are shared between several apps using some Cocoapods or Carthage?