Home > Software engineering >  When working on a project and one of it's dependency in parallel how to load it from the file s
When working on a project and one of it's dependency in parallel how to load it from the file s

Time:10-19

I'm working on a java dependency that I publish on GitLab via gradle. In parallel I also work on some projects dependent of it.

When I need to do a change in the parent I have to wait for my CI/CD to be over before I can keep developing the childs. There is most certainly a way to tell gradle 'check there before online' but all I've found until now is to do that with local jar but not raw source files.

I tried most of the things in How to make Gradle repository point to local directory but without success as gradle is excepting a maven repo structure with some pom.xml files.

So how could I achieve something like this ?

CodePudding user response:

After rethinking the problem and studying a bit more gradle/maven I found the solution.

Just execute the task gradle publishToMavenLocal in the parent project. Then in the dependent project add mavenLocal() to your list of repo. That's all you have to do.

I'm still looking for a way to make gradle build and publish the parent automatically on the child's build. But it's already much more practical like this?

  • Related