Customizing a Gradle plugin

I am using a Gradle plugin that generates Java code. That plugin allows some customization by implementing its interface and adding it to the classpath of the plugin. What are the options for implementing this?

Optimally I would like the following:

  1. Implement the interface using Java in a separate “java” file
  2. The Java class will not require a separate module in my project.