Sprout Social’s Android cellular app is a strong native utility that retains our clients plugged in to their social media presence on the go. As a part of our Android app, we preserve over 35 dependencies managed by the open supply neighborhood that present helpful constructing blocks for our utility.
Our dependencies present myriad performance comparable to frameworks for making community calls, async picture loading, testing instruments and different present options that remedy frequent Android improvement challenges. A few of these dependencies are required to leverage core Android libraries whereas others assist remedy frequent software program challenges with out having to put in writing all of the code from scratch. Every dependency permits us to leverage performance with out having to reinvent the wheel.
On the similar time, every comes with a duty to maintain them present to make sure we all know of recent efficiency, safety, and have updates. This sounds nice on paper, however as any cellular developer is aware of, manually monitoring these updates is usually a actual burden.
One in all our values on Sprout’s engineering crew is to behave with function and focus. In that spirit, we determined to implement a wiser resolution so we might spend extra time constructing impactful options for our clients. To perform this, we used the automated dependency administration first celebration plugin, Dependabot. Dependabot reduces our quantity of outdated dependencies, simplifies the hassle wanted to replace them, and streamlines our total improvement course of.
Shifting away from guide dependency upkeep
In native Android improvement, dependencies are declared in a construct.gradle file. By specifying the dependency we’d like with its model, Gradle will resolve it from a central repository and retrieve it for us to have the ability to use throughout the utility. If an Android app is multi-module, every module has its personal construct.gradle file that declares the dependencies for that module.
Sustaining these dependencies effectively is crucial for a easy improvement course of and offering clients with an efficient social media administration utility that may sustain with the velocity of social. However protecting dependencies updated turns into a frightening process that requires an evaluation of labor, model compatibility checks, potential code adjustments and testing.
Earlier than Dependabot, we had a guide dependency administration course of. Because the complexity of our utility elevated, so did our time spent on dependency administration. It took important effort for the crew to establish the necessity for a dependency, then course of it by means of our agile improvement workflows to get it prioritized and updated. We’d typically uncover that dependencies wanted updates throughout function improvement, which launched the at all times dreaded undertaking scope-creep. We would have liked a greater means.
Introducing: Dependabot
Dependency administration will not be a brand new idea. Provided that a lot of the work required to handle dependencies is repetitive and monotonous, our crew thought this could be the proper candidate for one thing that may very well be automated (with out falling into the lure of getting to put in writing the automation ourselves).
We discovered Dependabot suited our wants nicely—it’s a GitHub first-party device that routinely detects newer variations of dependencies and accounts for any compatibility points which may be brought on by upgrading them. It surfaces any model upgrades as they grow to be out there and creates pull requests (PRs) containing details about the improve, which we had been in a position to seamlessly combine into our regular engineering workflow. Instantly, we didn’t need to spend lengthy hours manually ensuring the whole lot was present.
Implementation
Dependabot intelligently analyzes our construct.gradle recordsdata to find out our dependency tree and creates PRs for any dependencies that have to be up to date. To ensure that the implementation to be successful, we wanted a method to rigorously overview every PR and streamline the merges of the PRs.
Throughout any utility launch of our Android app, we assign a launch supervisor. We determined to combine this duty into the discharge supervisor’s course of, with the expectation that as much as 5 dependency upgrades be accomplished throughout every launch cycle. The discharge supervisor evaluations the dependency updates uncovered by Dependabot, ensures that our steady integration exams on the PR move and there are not any breaking library adjustments, then evaluations the upgrades offered by this model bump, and brings the listing of PRs to the crew for approval to be merged.
The advantages of automation
Automated dependency administration is a strong device that considerably enhances our improvement course of, and the standard of lifetime of our engineers. It additionally offers customers with excessive worth and the most recent options inside our native cellular utility. With a device like Dependabot, we streamlined the retrieval, integration and versioning of dependencies, decreasing the quantity of guide effort engineers need to spend and decreasing the possibility of conflicts in our dependency tree.
Because the complexity of Android tasks continues to develop, adopting automated dependency administration was a high-value step with a purpose to guarantee a world-class improvement course of for our crew, and a world-class Android utility for our clients.
To study extra about Sprout’s engineering crew and tradition, go to our careers website.