XcodeGen icon indicating copy to clipboard operation
XcodeGen copied to clipboard

set 'no group' for local packages

Open MartinP7r opened this issue 3 years ago • 7 comments

Is there a way to set no group for a local package?
At the moment there's the group option for local packages and localPackagesGroup, but neither can be set to something that allows a package to sit at the projects root without a group.

MartinP7r avatar Apr 17 '22 07:04 MartinP7r

I believe this has similarity to https://github.com/yonaskolb/XcodeGen/issues/1118

MartinP7r avatar Jul 07 '22 02:07 MartinP7r

I would like this behavior as well. Currently the best I can do is put the local packages in a top-level folder, like:

/MyProject
  /Packages
    /Package1
    /Package2

What I want is:

/MyProject
  /Package1
  /Package2

Looking at https://github.com/yonaskolb/XcodeGen/blob/26fc38a664cae9e2a76ec23566820a1dcfe4099c/Sources/XcodeGenKit/SourceGenerator.swift#L56-L88 I don't see a way to configure the package's group and localPackagesGroup that doesn't put it in at least one folder.

hiltonc avatar Oct 13 '23 13:10 hiltonc

I don't see an obvious change to the API, other than accepting "" for group or localPackageGroup. I'm not aware of that being a precedent anywhere else in the API though.

I'm willing to open a PR to add this capability if we can agree on a config option for it.

hiltonc avatar Oct 13 '23 13:10 hiltonc

@hiltonc I'm happy with that solution (setting group to "") or allowing options.localPackagesGroup to be "", if you'd like to make a PR

yonaskolb avatar Oct 31 '23 07:10 yonaskolb

@yonaskolb Thanks, I added support for both options in #1413.

hiltonc avatar Nov 06 '23 19:11 hiltonc

Thank you @hiltonc!

MartinP7r avatar Nov 27 '23 22:11 MartinP7r

@yonaskolb would you be able to review or assign/recommend someone able to review?

MartinP7r avatar Dec 06 '23 07:12 MartinP7r