This message was deleted.
# community-support
s
This message was deleted.
2️⃣ 1
e
IMO 1 is definitely the way to go if you are publishing anything; it's just less confusing if the
my.group:foo-api
and
my.group:foo-impl
come from
foo-api
and
foo-impl
projects
👍 1
no, I would not do 3. I find it easier when every project is a leaf in the tree structure and you don't have to think about projects being parents of other projects. it also creates issues such as https://github.com/gradle/gradle/issues/4823
v
hm, why the leaf comment? I have a big build of 4 apps + shared code, and nesting is I think a big help
Copy code
:rootSharedModule1
	:contract
	:impl
:rootSharedModule2
	:contract
	:impl
...
100modules..
...
app1
	:app1SharedModule1
		:contract
		:impl
	...
	20 modules

:app2
	:app2SharedModule1
		:contract
		:impl
	...
	20 modules
...
so you’d rather have
:app1-sharedModule1-contract
? i.e. 200 modules flat in root?
anyways, my point mostly being .. why even tell consumers this is only a api? should they care? .. granted when there are still modules which are not split .. leading to confusion I think
t
I agree that 3 is a bad idea for purely practical reasons. source-containing modules should not be parents of other modules. I speak from experience, as I manage a build with 4000 modules.
1
☝️ 1
we use 2 ourselves.
d
we use combination of 1 and 2 like this:
Copy code
:foo
    :foo-api
    :foo-impl
so in settings it is like:
Copy code
include(":foo:foo-api", ":foo:foo-impl")
this has a little drawback of creating project foo in gradle. if you don't need the project you can put projects foo-api and foo-impl in foo folder in git but include only subprojects in settings.gradle like this:
Copy code
include(":foo-api", ":foo-impl")
project(":foo-api").projectDir = file("foo/foo-api")
project(":foo-impl").projectDir = file("foo/foo-impl")
v
@tony what if foo has some ui related stuff that can be shared, would you then nest is like this ?
Copy code
:foo
	:contract
	:impl
	:ui
or
Copy code
:foo
	:contract
	:impl
:foo-ui
I’m not super happy with either, we established that folders mean nesting, not dashes .. yet it doesnt really fit insode the foo, as its not on the same level .. possible if I were to stick some subfolder there like
Copy code
:foo
	:data
		:contract
		:impl
	:ui
but I’d hate to deal with git conflicts if this ‘data’ folder insert were to happen