JVM Builds with Gradle Build Tool

Setting up JVM projects with modern best practices

February 28, 2023

9:00 AM - 1:00 PM PST


Description:

Build systems have evolved over time to provide more features to developers. In this course we will go beyond the basics of managing JVM based projects with the Gradle Build Tool. We will cover best practices that increase the quality and efficiency of building your projects.

We will cover how these best practices can be used for projects written in Java, Kotlin, Groovy and Scala. There will be hands-on exercises to help you use what you learn in your projects.

Duration:

4 hours training session including time for hands-on exercises and Q&A.

Audience:

Users that manage projects written in Java, Kotlin, Groovy and Scala with the Gradle build tool.

Prerequisites:

  • Gradle Build Tool experience
    • Knowledge of core concepts
    • Authoring Gradle build files
    • Executing common tasks to compile, test and package
  • Kotlin experience is a plus but not required
  • Experience with software development with a JVM language
    • Either Java, Kotlin, Groovy or Scala

Objectives:

After this training the participants will be able to:

  • Deeper understanding of JVM projects
  • Use modern best practices to boost productivity

Course Outline:

  • Evolution of Build Systems
    • Provides context of topics covered in the training
  • Gradle JVM plugins
    • Java plugins
    • Kotlin plugin
    • Groovy plugin
    • Scala plugin
  • Source organization
    • SourceSet concept
    • Handling generated sources
    • Creating separate SourceSets
    • Hands-on exercise 1
  • Compilation
    • Specifying Java version using Toolchains
    • Using different Java version for specific tasks
    • Dependency management: api vs implementation
    • Declared vs Resolvable dependencies
    • Hands-on exercise 2
  • Verification
    • Testing
      • Testing pyramid and test grouping
      • Measuring and enforcing test coverage
      • Hands-on exercise 3
    • Compliance & code quality
      • Enforcing code style
      • Using static code analysis
  • Packaging
    • Creating standalone Jars
    • Dealing with dependency conflicts using shadowing
    • Hands-on exercise 4