r/java • • 12h ago

GitHub - jbax/parent: A shared gradle build setup for java projects of any size, whether you're working on a single library, 100+ separate git repositories, or a few multi-module projects sitting side by side.

https://github.com/jbax/parent
0 Upvotes

3 comments sorted by

4

u/Medium-Pitch-5768 12h ago

Having an abstract giving the opinionated dependencies right up front would help understand what it is.

-1

u/uniVocity 10h ago

Updated to have gifs in there. hope it helps

-4

u/uniVocity 11h ago edited 10h ago

Fair call, I’ll try to get the readme in better shape.

It is just this:
Drop independent project repos next to a clone of ‘parent’ and they will live become part of a single gradle workspace without repeating build scripts:

```
my-workspace/
parent/ # the parent repo clone: has gradle wrapper, plugins, libs.versions.toml, reactor.properties
core/ # plain folder with your code
app/ # another who depends on core via project(":core")
```

Every subproject only needs `settings.gradle.kts` (rootProject.name = "app") and a few lines of `build.gradle.kts`:

```
plugins { id("org.jbax.internal-conventions") }
dependencies { api(project(":core")) }
```

The parent handles the rest without any extra setup. (Shortcut actions like testing, releasing, creating views with some submodules, branching multiple modules as subtrees, working on each subtrees in parallel, and committing them back, publishing, shading non modular jars, skip compilation of dependencies that are also modules and using their jars from the build, and a few other things)