|
|
|
|
|
by justoreply
1144 days ago
|
|
given a project split in several modules, we don't want to build them separately, we want to type check at compile time that everything works and we have a single build system managed by Gradle. Gradle is smart enough that if we are changing a module, we can build all the dependent ones, and only them. The cache system comes into play when someone is changing something: when a developer is updating the code locally with changes from other developers, they don't have to compile and run tests of modules they are not changing locally, as gradle is downloading automatically the changes from the build cache. * Developer 1 changes module A
* code is pushed
* CI pipeline is running and uploading all the artifacts (final production code, final test code, test results)
* Developer 2 pull code locally
* gradle find changes from the last local run, it tries to compile/run the tests of updated modules but results are downloaded from the cache, instead of running locally |
|
I rarely build big projects, we usually create multiple small ones instead and if necessary reuse through artifactory or something, but unless I misunderstand you, this is exactly the same as Maven does in a multi module project, isn't it?
> The cache system comes into play when someone is changing something: when a developer is updating the code locally with changes from other developers, they don't have to compile and run tests of modules they are not changing locally, as gradle is downloading automatically the changes from the build cache.
But why should other developers have a relation to the source of dependencies except for debugging?
Isn't it better to upload the packaged jars to some kind of artifact repository at the end of their build pipeline?