SlideShare uma empresa Scribd logo
1 de 78
Baixar para ler offline
Keeping your build
tool updated in a
multi repository
world
April 10, 2024
Roberto Perez Alcolea
Senior Software Engineer @ Net
fl
ix
JVM Ecosystem Team
rperezalcolea@net
fl
ix.com
@rpalcolea
⚠ ⚠ Spoiler Alert ⚠ ⚠
vs
Not a “the best build tool” talk
But some learnings might apply for other tools
Usage of
— Why care about the build tool?
— Why Netflix uses Gradle
— Challenges of using Gradle
— How do we address the
challenges
— Few tips
— Q&A
Agenda
Why care
about the
build tool?
Flow State
Image from https://about.sourcegraph.com/blog/developer-productivity-thoughts
Mental context switches =
out of Flow state
Image from https://about.sourcegraph.com/blog/developer-productivity-thoughts
💡 It’s all about providing
the best developer
experience and improve
productivity 💡
But also…
⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠
Free and Open Source
Software (FOSS)
constitutes 70-90% of any
given piece of modern
software solutions
⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠ ⚠
A Summary of Census II: Open Source Software Application Libraries the World Depends On
Images from https://www.sonatype.com/state-of-the-software-supply-chain/introduction
There are risks…
Examples…
— Resources Downloaded over
Insecure Protocol
(CVE-2021-26291)
— Arbitrary code execution via
specially crafted environment
variables (CVE-2021-32751)
— Dependencies used by external
plugins or the plugins
themselves
🔐 You should follow Jonathan Leitschuh’s (@JLLeitschuh) work! 🔐
Why Netflix
uses Gradle
In 2013, Netflix software was built using
an Ant and Ivy based solution we called CBF (Common
Build Framework)
🚀 🚀 🚀 🚀 🚀 🚀 🚀 🚀 🚀 🚀
Netflix accelerated growth
🚀 🚀 🚀 🚀 🚀 🚀 🚀 🚀 🚀 🚀
We started looking for a build tool that:
— Better dependency management
Enabled testability
— Provided first class support for
Java applications
— Rich community and ecosystem
— Allowed us to vastly simplify build
files
years…
JVM Ecosystem landscape
— ~4.2k repositories
— ~1.1k developers using
JVM languages
— Thousands of applications
— Microservices with fat
clients
— Binary integration (JARs)
JVM Ecosystem landscape
JVM Ecosystem landscape
— Build stats
• ~215k JVM Builds per
week
• ~91k local
• ~124k on CI
Gradle continues providing
amazing features
— Build Caching
— Configuration Caching
— Advanced Dependency
Management
— Incremental Builds
— Incremental Tasks
— Filesystem Watching
— Toolchains
Challenges of
using Gradle
“at scale”
Developers might not want to learn
build tools
Duplicated logic across projects
Keeping up with the release cadence
— Latest: Gradle 8.7 (March 2024)
— Aiming for:
• Major release every year
• Gradle 9.x ~Q3 2024
• Minor release every 6 weeks
• The major version before the
previous one to become end-of-
life (EOL)
Breaking changes
Be aware of the feature states!
• Internal (don’t use them)
• Incubating (provide feedback)
• Public (safe to use)
• Deprecated (act as soon as
possible)
Adopting new features
• How fast can you adopt
new features?
• Should you adopt all of
them?
Java Compatibility
Image from https://docs.gradle.org/current/userguide/compatibility.html
Compatibility varies for:
— Compile and test code
— Running Gradle
• Groovy or Kotlin DSL
• Plugins
Plugin ecosystem
There are more than 7000 plugins in the Gradle Plugin portal
Plugin ecosystem
— New version support
— Backwards compatibility
— Usage of deprecated APIs/
Features
— Third-party plugins can be
abandoned
🤔 Most likely similar
problems as with any
other framework or tool 🤔
How do we
address the
challenges
Create project plugins for common tasks
Good for:
— Packaging
— Publishing
— Compilation/Test opinions
— Static code analysis
— Bundle other plugins
— Versioning
Create project plugins for common tasks
Types of plugins:
— Script
— Convention
— Binary (great for
multiple repositories)
Create Settings plugins
Good for:
— Configure Develocity
features
— Java Toolchain resolvers
— Plugin Management
opinions
Create Settings plugins
Example from https://github.com/gradle/foojay-toolchains
Create Init plugins
Good for:
— Add dependencies to build
script classpath
— Modify repositories for all
projects
— Any settings that apply
globally to all builds on a
machine
Example from https://github.com/gradle/foojay-toolchains
Create Init plugins
And you end with…
🤔
💡 You should consider a
company gradle
distribution 💡
We created
💥 Nebula is collection of
project, settings and init
plugins bundled as a
custom distribution 💥
Example from https://github.com/gradle/foojay-toolchains
What developers see
What developers get
— Linting
— Dependency Locking
— Resolution Rules
— Dependency Graph Manifests
— Develocity configuration
— And many more…
— Spring Boot plugin default
configurations
— Debian generation
— Docker image generation
Versioning
— Internal Repositories
— Testing opinions
— Publishing credentials and
configuration
— Static code analysis defaults
Example from https://github.com/gradle/foojay-toolchains
Custom Distribution isn’t as complex as it sounds
Creating a custom distribution is in a
nutshell
- Download Gradle
- Unzip it
- Copy your init script and
gradle.properties files to init.d
- Zip it again
- Use it
It isn’t as complex as it sounds
This is thanks to Gradle init script management
Content from https://docs.gradle.org/current/userguide/init_scripts.html
How to create it then?
Demo can be found in https://github.com/rpalcolea/devnexus-2024-demos/tree/main/custom-distribution-demo
There is a custom-gradle-dist-gradle plugin!
But even with all the
plugins in the world, you
still need to maintain
build scripts…
Linting build files
Demo can be found in https://github.com/rpalcolea/devnexus-2024-demos/tree/main/nebula-lint-demo
And we need to make
sure things work
Acceptance testing
Niagara clones every repository and
runs some commands to:
— Upgrade Nebula (Gradle)
• Candidates
• Snapshots
— Upgrade Gradle for OSS plugins
that we use
Acceptance testing
And still, we need to
upgrade our ~4k
repositories
Automating changes
Nightly or on-demand pull requests for:
- Dependencies
- Nebula Wrapper
- Lint
What if you don’t want to build this?
If you use Build Scans
Find deprecation warnings to address them
Use performance information to decide
where to invest
If you use Develocity
(formerly Gradle
Enterprise)
Use failure analytics to understand
potential regressions from your plugins
Example can be found in https://ge.gradle.org/scans/failures
Take advantage of the Export API
You can learn which and how plugins are used
Take advantage of the Export API
Understanding the long tail of versions for plugins is important
Few tips
Define your commitment
- Trying out snapshots and RCs
really helps Gradle team to
identify issues but not everyone
have the time to do it and that is
fine.
- You can have different
approaches based on the release
type (e.g. adopt minor and patch
release quickly but major versions
take more time)
Write plugins in Java
You might thank me later! 😉
Gradle TestKit is your friend
Test your plugin with
multiple Gradle versions
The Gradle Test plugin extends the power that the new GradleTestKit brings
without having to actually author code!
⚠ Only introduce incubating
APIs in your plugins if you
know that all your
consumers are compatible ⚠
Similar to other projects,
avoid adding third party
dependencies when they are
not necessary
Same applies to plugins, look
at the activity of them before
introducing to your builds,
they can be a major blocker
for evolving your toolkit
Gradle Community
Images from https://gradle.org/fellowship/
- Join the Gradle Community Slack
https://gradle.org/slack-invite/
- Gradle Fellowship: these folks are
very active in the slack community
and also generate a lot of
educational material
Nebula plugins
- https://github.com/nebula-plugins
- Notable plugins:
- gradle-int-plugin
- gradle-esolution-rules-plugin
- gradle-jakartaee-migration-
plugin
Reiterating a bit…
— Gradle is a build tool with many
great features but you might not
need all of them, invest where
possible
— From project plugins to custom
distribution, there are ways to
abstract complexity and
standardize build tooling for
teams/orgs
— Keeping Gradle up to date can be
challenging but it is important not
only for the developer experience
but also for security concerns.
Prioritize accordingly
Questions?
Thank
You.
Roberto Perez Alcolea
rperezalcolea@net
fl
ix.com

Mais conteúdo relacionado

Semelhante a Keeping your build tool updated in a multi repository world

Gradle(the innovation continues)
Gradle(the innovation continues)Gradle(the innovation continues)
Gradle(the innovation continues)
Sejong Park
 
Kelly potvin nosurprises_odtug_oow12
Kelly potvin nosurprises_odtug_oow12Kelly potvin nosurprises_odtug_oow12
Kelly potvin nosurprises_odtug_oow12
Enkitec
 
What's new with tooling for Spring, Grails, and the Cloud
What's new with tooling for Spring, Grails, and the CloudWhat's new with tooling for Spring, Grails, and the Cloud
What's new with tooling for Spring, Grails, and the Cloud
martinlippert
 
Curious Coders Java Web Frameworks Comparison
Curious Coders Java Web Frameworks ComparisonCurious Coders Java Web Frameworks Comparison
Curious Coders Java Web Frameworks Comparison
Hamed Hatami
 
Szczepan.faber.gradle
Szczepan.faber.gradleSzczepan.faber.gradle
Szczepan.faber.gradle
magda3695
 

Semelhante a Keeping your build tool updated in a multi repository world (20)

GitOps Testing in Kubernetes with Flux and Testkube.pdf
GitOps Testing in Kubernetes with Flux and Testkube.pdfGitOps Testing in Kubernetes with Flux and Testkube.pdf
GitOps Testing in Kubernetes with Flux and Testkube.pdf
 
Gradle(the innovation continues)
Gradle(the innovation continues)Gradle(the innovation continues)
Gradle(the innovation continues)
 
Continuous integration and delivery for java based web applications
Continuous integration and delivery for java based web applicationsContinuous integration and delivery for java based web applications
Continuous integration and delivery for java based web applications
 
Android gradle-build-system-overview
Android gradle-build-system-overviewAndroid gradle-build-system-overview
Android gradle-build-system-overview
 
Kelly potvin nosurprises_odtug_oow12
Kelly potvin nosurprises_odtug_oow12Kelly potvin nosurprises_odtug_oow12
Kelly potvin nosurprises_odtug_oow12
 
Node.js what's next (Index 2018)
Node.js what's next (Index 2018)Node.js what's next (Index 2018)
Node.js what's next (Index 2018)
 
What's new with tooling for Spring, Grails, and the Cloud
What's new with tooling for Spring, Grails, and the CloudWhat's new with tooling for Spring, Grails, and the Cloud
What's new with tooling for Spring, Grails, and the Cloud
 
Exploring the power of Gradle in android studio - Basics & Beyond
Exploring the power of Gradle in android studio - Basics & BeyondExploring the power of Gradle in android studio - Basics & Beyond
Exploring the power of Gradle in android studio - Basics & Beyond
 
Webinar: Capabilities, Confidence and Community – What Flux GA Means for You
Webinar: Capabilities, Confidence and Community – What Flux GA Means for YouWebinar: Capabilities, Confidence and Community – What Flux GA Means for You
Webinar: Capabilities, Confidence and Community – What Flux GA Means for You
 
Curious Coders Java Web Frameworks Comparison
Curious Coders Java Web Frameworks ComparisonCurious Coders Java Web Frameworks Comparison
Curious Coders Java Web Frameworks Comparison
 
Szczepan.faber.gradle
Szczepan.faber.gradleSzczepan.faber.gradle
Szczepan.faber.gradle
 
Alfresco DevCon 2018: SDK 3 Multi Module project using Nexus 3 for releases a...
Alfresco DevCon 2018: SDK 3 Multi Module project using Nexus 3 for releases a...Alfresco DevCon 2018: SDK 3 Multi Module project using Nexus 3 for releases a...
Alfresco DevCon 2018: SDK 3 Multi Module project using Nexus 3 for releases a...
 
7 maven vsgradle
7 maven vsgradle7 maven vsgradle
7 maven vsgradle
 
8 Principles for Enabling Build/Measure/Learn: Lean Engineering in Action
8 Principles for Enabling Build/Measure/Learn: Lean Engineering in Action8 Principles for Enabling Build/Measure/Learn: Lean Engineering in Action
8 Principles for Enabling Build/Measure/Learn: Lean Engineering in Action
 
Modern Web-site Development Pipeline
Modern Web-site Development PipelineModern Web-site Development Pipeline
Modern Web-site Development Pipeline
 
Gradle - the Enterprise Automation Tool
Gradle  - the Enterprise Automation ToolGradle  - the Enterprise Automation Tool
Gradle - the Enterprise Automation Tool
 
Taking your code to production
Taking your code to productionTaking your code to production
Taking your code to production
 
ICONUK 2015 - Gradle Up!
ICONUK 2015 - Gradle Up!ICONUK 2015 - Gradle Up!
ICONUK 2015 - Gradle Up!
 
Simplified CI/CD Flows for Salesforce via SFDX - Downunder Dreamin - Sydney
Simplified CI/CD Flows for Salesforce via SFDX - Downunder Dreamin - SydneySimplified CI/CD Flows for Salesforce via SFDX - Downunder Dreamin - Sydney
Simplified CI/CD Flows for Salesforce via SFDX - Downunder Dreamin - Sydney
 
Developing Microservices Directly in AKS/Kubernetes
Developing Microservices Directly in AKS/KubernetesDeveloping Microservices Directly in AKS/Kubernetes
Developing Microservices Directly in AKS/Kubernetes
 

Mais de Roberto Pérez Alcolea

Escaping Dependency Hell: A deep dive into Gradle's dependency management fea...
Escaping Dependency Hell: A deep dive into Gradle's dependency management fea...Escaping Dependency Hell: A deep dive into Gradle's dependency management fea...
Escaping Dependency Hell: A deep dive into Gradle's dependency management fea...
Roberto Pérez Alcolea
 
Dependency Management in a Complex World (JConf Chicago 2022)
Dependency Management in a Complex World (JConf Chicago 2022)Dependency Management in a Complex World (JConf Chicago 2022)
Dependency Management in a Complex World (JConf Chicago 2022)
Roberto Pérez Alcolea
 
Leveraging Gradle @ Netflix (Madrid GUG Feb 2, 2021)
Leveraging Gradle @ Netflix (Madrid GUG Feb 2, 2021)Leveraging Gradle @ Netflix (Madrid GUG Feb 2, 2021)
Leveraging Gradle @ Netflix (Madrid GUG Feb 2, 2021)
Roberto Pérez Alcolea
 
Dependency Management at Scale @ JConf Centroamérica 2020
Dependency Management at Scale @ JConf Centroamérica 2020Dependency Management at Scale @ JConf Centroamérica 2020
Dependency Management at Scale @ JConf Centroamérica 2020
Roberto Pérez Alcolea
 
Dependency Management at Scale
Dependency Management at ScaleDependency Management at Scale
Dependency Management at Scale
Roberto Pérez Alcolea
 

Mais de Roberto Pérez Alcolea (11)

Escaping Dependency Hell: A deep dive into Gradle's dependency management fea...
Escaping Dependency Hell: A deep dive into Gradle's dependency management fea...Escaping Dependency Hell: A deep dive into Gradle's dependency management fea...
Escaping Dependency Hell: A deep dive into Gradle's dependency management fea...
 
[DPE Summit] How Improving the Testing Experience Goes Beyond Quality: A Deve...
[DPE Summit] How Improving the Testing Experience Goes Beyond Quality: A Deve...[DPE Summit] How Improving the Testing Experience Goes Beyond Quality: A Deve...
[DPE Summit] How Improving the Testing Experience Goes Beyond Quality: A Deve...
 
DPE Summit - A More Integrated Build and CI to Accelerate Builds at Netflix
DPE Summit - A More Integrated Build and CI to Accelerate Builds at NetflixDPE Summit - A More Integrated Build and CI to Accelerate Builds at Netflix
DPE Summit - A More Integrated Build and CI to Accelerate Builds at Netflix
 
Dependency Management in a Complex World (JConf Chicago 2022)
Dependency Management in a Complex World (JConf Chicago 2022)Dependency Management in a Complex World (JConf Chicago 2022)
Dependency Management in a Complex World (JConf Chicago 2022)
 
Leveraging Gradle @ Netflix (Guadalajara JUG Feb 25, 2021)
Leveraging Gradle @ Netflix (Guadalajara JUG Feb 25, 2021)Leveraging Gradle @ Netflix (Guadalajara JUG Feb 25, 2021)
Leveraging Gradle @ Netflix (Guadalajara JUG Feb 25, 2021)
 
Leveraging Gradle @ Netflix (Madrid GUG Feb 2, 2021)
Leveraging Gradle @ Netflix (Madrid GUG Feb 2, 2021)Leveraging Gradle @ Netflix (Madrid GUG Feb 2, 2021)
Leveraging Gradle @ Netflix (Madrid GUG Feb 2, 2021)
 
Dependency Management at Scale @ JConf Centroamérica 2020
Dependency Management at Scale @ JConf Centroamérica 2020Dependency Management at Scale @ JConf Centroamérica 2020
Dependency Management at Scale @ JConf Centroamérica 2020
 
Dependency Management at Scale
Dependency Management at ScaleDependency Management at Scale
Dependency Management at Scale
 
GR8ConfUS 2018 - High Scalable Streaming Microservices with Kafka Streams
GR8ConfUS 2018 - High Scalable Streaming Microservices with Kafka StreamsGR8ConfUS 2018 - High Scalable Streaming Microservices with Kafka Streams
GR8ConfUS 2018 - High Scalable Streaming Microservices with Kafka Streams
 
GR8ConfUS 2018 - High performant in-memory datasets with Netflix H0110W
GR8ConfUS 2018 - High performant in-memory datasets with Netflix H0110WGR8ConfUS 2018 - High performant in-memory datasets with Netflix H0110W
GR8ConfUS 2018 - High performant in-memory datasets with Netflix H0110W
 
GR8ConfUS 2017 - Real Time Traffic Visualization with Vizceral and Hystrix
GR8ConfUS 2017 - Real Time Traffic Visualization with Vizceral and HystrixGR8ConfUS 2017 - Real Time Traffic Visualization with Vizceral and Hystrix
GR8ConfUS 2017 - Real Time Traffic Visualization with Vizceral and Hystrix
 

Último

JustNaik Solution Deck (stage bus sector)
JustNaik Solution Deck (stage bus sector)JustNaik Solution Deck (stage bus sector)
JustNaik Solution Deck (stage bus sector)
Max Lee
 

Último (20)

Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
 
CompTIA Security+ (Study Notes) for cs.pdf
CompTIA Security+ (Study Notes) for cs.pdfCompTIA Security+ (Study Notes) for cs.pdf
CompTIA Security+ (Study Notes) for cs.pdf
 
INGKA DIGITAL: Linked Metadata by Design
INGKA DIGITAL: Linked Metadata by DesignINGKA DIGITAL: Linked Metadata by Design
INGKA DIGITAL: Linked Metadata by Design
 
how-to-download-files-safely-from-the-internet.pdf
how-to-download-files-safely-from-the-internet.pdfhow-to-download-files-safely-from-the-internet.pdf
how-to-download-files-safely-from-the-internet.pdf
 
5 Reasons Driving Warehouse Management Systems Demand
5 Reasons Driving Warehouse Management Systems Demand5 Reasons Driving Warehouse Management Systems Demand
5 Reasons Driving Warehouse Management Systems Demand
 
AI/ML Infra Meetup | ML explainability in Michelangelo
AI/ML Infra Meetup | ML explainability in MichelangeloAI/ML Infra Meetup | ML explainability in Michelangelo
AI/ML Infra Meetup | ML explainability in Michelangelo
 
Workforce Efficiency with Employee Time Tracking Software.pdf
Workforce Efficiency with Employee Time Tracking Software.pdfWorkforce Efficiency with Employee Time Tracking Software.pdf
Workforce Efficiency with Employee Time Tracking Software.pdf
 
COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...
COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...
COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...
 
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdf
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdfImplementing KPIs and Right Metrics for Agile Delivery Teams.pdf
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdf
 
AI Hackathon.pptx
AI                        Hackathon.pptxAI                        Hackathon.pptx
AI Hackathon.pptx
 
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
 
Top Mobile App Development Companies 2024
Top Mobile App Development Companies 2024Top Mobile App Development Companies 2024
Top Mobile App Development Companies 2024
 
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAGAI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
 
How to install and activate eGrabber JobGrabber
How to install and activate eGrabber JobGrabberHow to install and activate eGrabber JobGrabber
How to install and activate eGrabber JobGrabber
 
JustNaik Solution Deck (stage bus sector)
JustNaik Solution Deck (stage bus sector)JustNaik Solution Deck (stage bus sector)
JustNaik Solution Deck (stage bus sector)
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
Crafting the Perfect Measurement Sheet with PLM Integration
Crafting the Perfect Measurement Sheet with PLM IntegrationCrafting the Perfect Measurement Sheet with PLM Integration
Crafting the Perfect Measurement Sheet with PLM Integration
 
AI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning FrameworkAI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning Framework
 
The Impact of PLM Software on Fashion Production
The Impact of PLM Software on Fashion ProductionThe Impact of PLM Software on Fashion Production
The Impact of PLM Software on Fashion Production
 
A Guideline to Zendesk to Re:amaze Data Migration
A Guideline to Zendesk to Re:amaze Data MigrationA Guideline to Zendesk to Re:amaze Data Migration
A Guideline to Zendesk to Re:amaze Data Migration
 

Keeping your build tool updated in a multi repository world