This message was deleted.
# community-support
s
This message was deleted.
v
Indeed the clean and recommended solution is to publish
logger
too if you put it into its own project. If you really insist on not following the clean approach, you need to shade those classes into the
core
artifact, for example using the
shadow
plugin.
n
But isn't it where Gradle is changed from Maven. In Maven also we do same approach?
@Vampire Can you give some example for "you need to shade those classes into the
core
artifact, for example using the
shadow
plugin." this comment. Also it is better if I don't need to use shadow plugin?
v
No, I have no example, because I recommend publishing separately. 😉
🥲 1
But Google, or the docs of the shadow plugin should probably give you what you need.
a
there’s an example for merging dependencies into a single JAR in the Gradle docs https://docs.gradle.org/8.1.1/userguide/working_with_files.html#sec:creating_uber_jar_example but it’s pretty limited and it will probably cause issues
🤩 1
n
Just for clarification. Imagine that a Project structure will be like this
Task (root)
dataDir -> Inside this it has modules dataCmmon, dataType1, dataType2, dataType3
infoDir -> Inside this it has modules infoCommon, infoType1, infoType2, infoType3
So all modules in each directory is depend on common module in each directory and above structure can spread more and more. So still you suggestion Will be publishing each commonDir seperately and import it or any other method?
Thank You @Adam I will look into it
a
I’d prefer publishing the artifacts separately. Or, if it doesn’t make sense to publish them separately, then I’d just put the classes into a single subproject in a specific package. Splitting everything into lots of subprojects doesn’t always make sense :)
n
It means in simply create a common subProject which have all common methods of every directory and use it as a dependency