Publishing Plugin support for testing/mavenLocal()?

I just wanted to know if it’s possible to use the org.gradle.plugin-publish to publish my plugin to mavenLocal() or locally?!

I know I can use the maven-publish to do that. But I really don’t want to apply and configure both plugins. One for testing (locally) and one for the plugin portal.

So, it is possible to say “dryRun” or define a local directory as repo for testing?! :thinking:

Ok, just found out that I simply have to add the maven-publish plugin and “everything is done automatically”…

This configuration creates a publishPluginMavenPublicationToMavenLocal which could be then simply used for testing.

plugins {
    kotlin("jvm") version ("1.2.30")
    id("java-gradle-plugin")
    id("maven-publish")
}

repositories {
    jcenter()
}

dependencies {
    implementation(kotlin("stdlib-jdk8"))
}

group = "my.super.group"
version = "0.0.1"
gradlePlugin {
    plugins {
        create("gloc") {
            id = "my.super.id"
            implementationClass = "my.package.Plugin"
        }
    }
}

Have nothing to do with the Publishing Plugin. But I think that is somehow related to it :joy:

1 Like