Great Tools for Engineers: Refactoring Across Multiple Code Bases with Gradle and IntelliJ IDEA

LinkedIn Engineering Team
5 min readintermediate
--
View Original

Overview

The article discusses the importance of effective tooling for engineers at LinkedIn, focusing on the challenges and solutions for refactoring across multiple code bases using Gradle and IntelliJ IDEA. It highlights the multiproduct abstraction layer that allows for efficient development without direct interaction with the source control management system.

What You'll Learn

1

How to leverage Gradle Composite Builds for cross-repository development

2

Why multiproduct abstraction is beneficial for managing dependencies

3

How to integrate multiple code bases in IntelliJ IDEA for improved productivity

Prerequisites & Requirements

  • Understanding of source control management systems
  • Familiarity with Gradle and IntelliJ IDEA(optional)

Key Questions Answered

What is multiproduct abstraction and how does it work at LinkedIn?
Multiproduct abstraction at LinkedIn allows engineers to work with code that spans multiple repositories without directly interacting with the source control management system. This abstraction layer enables efficient building, testing, and releasing of software components while managing dependencies effectively.
How does Gradle Composite Builds enhance the developer experience?
Gradle Composite Builds connects separate Gradle builds into a single build process, allowing developers to treat multiple code bases as one. This integration facilitates cross-repository code navigation and refactoring within IntelliJ IDEA, significantly improving productivity.
What challenges arise from changes in shared libraries across multiproducts?
When a common library changes its API, clients that depend on it must be updated, leading to multiple independent changes and increased overhead. This includes publishing new library versions and updating client code, which complicates the development process.

Technologies & Tools

Build Tool
Gradle
Used as the core of the build automation framework for various software stacks at LinkedIn.
IDE
Intellij Idea
Enhanced with custom plugins to support cross-multiproduct development and improve developer experience.

Key Actionable Insights

1
Implementing Gradle Composite Builds can streamline your development process by allowing multiple code bases to be treated as a single unit.
This is particularly useful in large organizations where code is often spread across various repositories, enhancing collaboration and reducing integration issues.
2
Adopting a multiproduct abstraction can help manage dependencies more effectively, pushing teams to maintain a clean architecture.
This approach encourages thoughtful design of public APIs and dependency management, which can lead to better software architecture and reduced technical debt.

Common Pitfalls

1
Failing to manage dependencies effectively can lead to a complicated dependency graph and integration issues.
This often happens when teams neglect to consider the impact of shared libraries on client code, resulting in increased overhead and manual work.