what directory structure do you trully preffer? :o...
# random
a
what directory structure do you trully preffer? 1️⃣
src/common/main
2️⃣
src/commonMain
🙅🏾 1
2️⃣ 6
e
beyond 2️⃣ being general convention, my reasoning is that neither {common/main, common/test, jvm/main, jvm/test} nor {main/common, main/jvm, test/common, test/jvm} captures the fact that the source sets aren't a tree, they're a DAG
a
What means a DAG ?
e
directed acyclic graph, they show up everywhere in computer science
👍🏾 2
👍 1
d
Basically a tree where a child can have multiple parents.
r
My preference is to separate by module / gradle project rather than source set, and then within a project to have:
Copy code
src/
src-resources/
tests/
tests-resources/
I like things pretty flat.
But then I like really tightly focussed modules - I'd expect to have several "common" modules, several "js" modules and several "jvm" modules in a single project, so I can use the dependencies between them to control visibility, and I can name them in a focussed manner.