Lesson 36Build Automation with Gradle
While studying Java and trying to work on hands-on assignments, you’ve been compiling, deploying, and running Java programs in the integrated development environment (IDE). These actions were required to build projects. For a real-world project, the build process usually includes more steps before the application goes into production. For example:
- Running unit and integration tests
- Creating scripts for continuous integration
- Working with version control systems and code repositories
- Managing dependencies (ensuring that the right versions of the third-party libraries are linked to the code)
- Generating program documentation
- Deploying the application on development, quality assurance (QA), and production servers
- Sending notification e-mails about successful or failed builds
In the enterprise setup, creating, customizing and maintaining build scripts is a project in its own, which should be started in early stages of application development.
The build process should not depend on any particular IDE or on the presence of any guru-developer who knows how to compile all the code, link it with required libraries, and deploy it to the right computer. Compiling, building, and deploying the code should be run by scripts. A typical enterprise Java project consists of more than one software module and hundreds of classes, and it is developed by a team (or teams) of programmers, who may use different IDEs.
Continuous Integration (CI) is a practice ...
Get Java Programming 24-Hour Trainer, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.