Josh
1
Question or problem
With XcodeGen can generate structure local packages
Packages
│
└───Common
│ │
│ └───CommonUI
│ └───CommonCore
│
└───Main
│ │
│ └───FeatureA
│ └───FeatureB
...
Tuist generate structure:
Packages
│
└───CommonUI
└───CommonCore
└───FeatureA
└───FeatureB
...
Expectation
How to generate custom folders structure with Tuist?
Packages
│
└───Common
│ │
│ └───CommonUI
│ └───CommonCore
│
└───Main
│ │
│ └───FeatureA
│ └───FeatureB
...
Context
Reproduction (mandatory for problems)
- Create project
- init Tuist
- add local SPM module
- configure dependencies in Project.swift
- generate project
Hey @Josh
Are you using the XcodeProj-based integration or Xcode’s default integration? Dependencies · Projects · Develop · Guides · Tuist
If you could provide a sample of the project you’re trying to have, that would help as well
Josh
3
Sure here is sample project on Github
I will be only glad, If you have any ideas on how to achieve the expected result
Note: Root folder name Modules
or Packages
doesn’t matter, main thing to keep layered structure of local SPM modules (Common, Shared, Flows and etc.)
Expected result:
Josh
4
Hi @marekfort
Is there any updates?) or any suggestions on this topic?
Hey @Josh
I took a look and this is currently not possible. However, we’d love to take a contribution if you want to take a stab at it.
The issue is the Packages
group is currently hardcoded here.
To preserve the package’s location, we’d need to add a group based on the package’s path, as XcodeGen is doing: XcodeGen/Sources/XcodeGenKit/SourceGenerator.swift at 126339f1c8ad9a78a4270f243ad7840cf626aa11 · yonaskolb/XcodeGen · GitHub
All the necessary changes should happen in the linked generateSwiftPackageReferences
, so the scope of the PR should be relatively small.