17. “Java is nice… but I also have some "Go" in my project…”
Build all kinds of projects
17
... plugins to the rescue!
18. Use a community plugin to build a Go project
Build all kinds of projects
18
19. Use a community plugin to build a Go project
Build all kinds of projects
19
20. “What if there is no community plugin that fits my needs?”
Build all kinds of projects
20
… extract your build logic to a custom plugin
21. Build all kinds of projects
21
buildUIDPage
Inputs Outputs
.json + .js .html + .css + .js
Call build Get page
22. Build all kinds of projects
22
Go module: community plugin
UID page: custom plugin
App distrib: depends on other
modules and packages them
Java module: provided plugins
23. “Ok I can build all kind of technologies with Gradle…
but why should I?”
Build all kind of projects
23
25. “Do I still need to install Node, npm and Go locally?”
Plugins download distributions if required
Enjoy the benefits of Gradle
25
26. “Do I still need to install Gradle?”
Use the Gradle wrapper
You only need a JVM on your environment and on your CI
Enjoy the benefits of Gradle
26
27. Work avoidance
Enjoy the benefits of Gradle
27
TaskInputs Outputs
Source files Files produced
Compare hash of
source files from
previous build Same hash: Skip the task
Hash changed: Execute
the task
28. Work avoidance
First build
Enjoy the benefits of Gradle
28
Java dev
Go
Java
UID
Distribution
1. Build
3. Compile
5. Zip all
2. Compile
4. Compile
My project
29. Work avoidance
Second build
Enjoy the benefits of Gradle
29
Java dev
Go
Java
UID
Distribution
1. Build
again 3. Compile
5. Zip all
2. Compile
4. Compile
My project
UP-TO-DATE
UP-TO-DATE
UP-TO-DATE
UP-TO-DATE
30. Work avoidance
Third build with code change
Enjoy the benefits of Gradle
30
Java dev
Go
Java
UID
Distribution
1. Modify
Java
code and
build
3. Compile
5. Zip all
2. Compile
4. Compile
My project
UP-TO-DATE
UP-TO-DATE
32. Back to our multi-techno build. What happens in real life?
Enjoy the benefits of Gradle
32
Java dev
Go
Java
UID
Distribution
1. Update
+ build 3. Compile
5. Zip all
2. Compile
4. Compile
My project
33. Back to our multi-techno build. What happens in real life?
Enjoy the benefits of Gradle
33
Java dev
Remote
cache
Go
Java
UID
Distribution
1. Update
+ build
2. Retrieve
from cache
5. Zip all
2. Compile
3. Compile
4. Compile
My project
34. Enjoy the benefits of Gradle
34
Our Java developer never had to build Go or UID modules
35. Build time gained @ Bonitasoft on a small Java project
Enjoy the benefits of Gradle
35
Without cache
With cache
36. Enjoy the benefits of Gradle
36
Without cache
With cache
Build time gained @ Bonitasoft on a project with
30 modules: Java + react + custom
37. No tools to install
Gradle distribution and other tooling
are downloaded and cached
Enjoy the benefits of Gradle
37
38. Each developer can focus on what matters to them
Don't need to rebuild everything locally
Enjoy the benefits of Gradle
38
39. No need to read setup
documentation on every project
Just run ./gradlew build
Enjoy the benefits of Gradle
39
40. Yes we can build everything with gradle!
Yes it is useful when mixing technologies!
Use the build cache!
Conclusion
40