0PricingLogin
Groovy & Gradle: JVM Automation and Build Engineering · Lesson

Building Binary Plugins

Develop standalone binary plugins using Groovy or Java, and package them for distribution.

Why Binary Plugins?

Welcome! In this lesson, we'll dive into building binary plugins for Gradle. Unlike simpler script plugins, binary plugins are compiled code (Java or Groovy) that offer superior reusability and structure.

  • Reusability: Easily share across many projects.
  • Encapsulation: Keep your build logic clean and organized.
  • Testability: Easier to unit test complex logic.

Setting Up Your Plugin Project

A binary plugin is typically developed in its own Gradle project. For local development, a common approach is to place your plugin source code within the buildSrc directory of your main project.

The standard structure looks like this:

  • rootProject/
  • buildSrc/
  • src/main/groovy/com/coddykit/plugins/
  • MyPlugin.groovy
  • build.gradle
  • build.gradle (for the consumer project)

All lessons in this course

  1. Understanding Gradle Plugins
  2. Building Binary Plugins
  3. Applying & Publishing Plugins
  4. Plugin Extensions & Configurable DSLs
← Back to Groovy & Gradle: JVM Automation and Build Engineering