user16522525
user16522525

Reputation:

Apply gradle custom module plugin

I created a plugin for gradle with java.I want to test it.

so, I created a another gradle project add I added my plugin as a module.

Now , How can I apply my module as a plugin in build.gradle file ?

My project structure

enter image description here

My plugin

        version '1.0.0'
        id = 'com.hello.first.plugin'
        implementationClass = 'com.hello.first.plugin'

Here I saw for applying jar as a plugin in gradle : ANSWER.

How can I add module as a plugin in build.gradle ?

Upvotes: 0

Views: 121

Answers (1)

Martin Zeitler
Martin Zeitler

Reputation: 76639

You need to make it a standalone project and publish it, at least to mavenLocal().

Then just add mavenLocal() into buildscript.dependencies and it should resolve.

A local flatDir repository should work, too.

Upvotes: 1

Related Questions