z17 z17 - 1 year ago 113
Java Question

How can I use gradle submodule as a library in another modules?

I try to write my project with four microservices, where every service need to have opportunity to call any another.

Thus I need a some client module, wich will be able to call any service. And I want to use this module as a library in my services.

How can I do this?

z17 z17
Answer Source

Ok, You just need to create new module, then set it in settings.gradle:

include 'service-client'

And then in build.gradle of submodule where you need, add this dependency:

compile project(':service-client')
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download