Gradle for Java-Based Applications and Libraries

Gradle for Java-Based Applications and Libraries

57mIntermediate2021-01-05

Authors

Benjamin Muschko

Benjamin Muschko

Software Engineer, Consultant, and Trainer

Course details

Gradle makes building and testing Java programs easy with its compelling feature set. This course teaches the typical tasks needed to work with a Java project, including compiling code, adding dependencies, running tests, and building a JAR file. You will need a basic knowledge of the Java programming language to complete this course. Instructor Benjamin Muschko walks you through the project structure and source code of a simple Java project, then shows how to apply and explore the Java plugin for Gradle. The course explains how to generate Javadocs for a Java project. Benjamin covers the basics of dependency management. He steps through each task you need to complete, to test a Java project and fix a failed test suite. Plus, Benjamin provides some additional learning resources to deepen your Gradle knowledge.

Skills covered

GradleJavaOracleSoftware Development ToolsProgramming LanguagesOpen SourceSoftware DevelopmentOne-Off

Concepts

Introduction

  • Building a Java project simplified
  • What you should know

Building a Java Project

  • Anatomy of a simple Java project
  • Applying the Java plugin
  • Compiling Java source code
  • Packaging a JAR file
  • Exploring the Java Application plugin
  • Challenge Generating Javadocs for a Java project
  • Solution Generating Javadocs for a Java project

Dependency Management Basics

  • Mechanics of dependency management
  • Declaring a dependency on an external library
  • Rendering the dependency tree
  • Declaring a project dependency
  • Using the Maven Publish plugin to publish a library
  • Challenge Consuming an external dependency
  • Solution Consuming an external dependency

Testing a Java Project

  • Using the JUnit 5 test framework
  • Declaring JUnit dependencies
  • Executing tests and inspecting the results
  • Challenge Fix a failed test suite
  • Solution Fix a failed test suite

Conclusion

  • Next steps
40,000 Toman