Can a custom plugin apply another plugin when applied to a project?

My custom plugin, when applied, needs some properties that come from other plugins. For example, I would like to get access to the project’s jar properties from my custom plugin. My plugin is useless without the java plugin.

How can make sure that projects that use my plugin, also have the java plugin applied as well?

In your plugin’s apply method, simply call project.apply(<other plugin>) just like you would in a build.gradle.

I’m glad it was this easy. Thanks for the help.