slugstack / slugstack-gradle-plugin

testing creating a plugin to configure common opinionated defaults. also tests publishing both to maven and gradlePluginPortal.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

slugstack-gradle-plugin

uploads snapshot, candidate, and final artifacts with opinionated defaults.

what this plugin applies

check the build.gradle.kts section of dependencies, or check the main plugin/src/main/../PublishingPlugin.java to see what will be applied.

consuming from maven central snapshots

assuming the plugin has been published to maven central snapshots, in the consuming project, update the settings.gradle.kts with

pluginManagement {
    repositories {
        // ...
        maven {
            url = uri("https://oss.sonatype.org/content/repositories/snapshots/")
        }
        // ...
        // you'll likely also need this if you don't have a pluginManagement section already:
        gradlePluginPortal()
        // ...
    }
}

and build.gradle.kts with

plugins {
    id("io.slugstack.oss.slugstack-gradle-plugin") version "0.3.0-SNAPSHOT"
    // or resolved dynamically to latest:
    // id("io.slugstack.oss.slugstack-gradle-plugin") version "latest.integration"
}

publishing to local

publish this plugin to maven local:

./gradlew publishToMavenLocal

and then in the consuming project, update the settings.gradle.kts with

pluginManagement {
    repositories {
        mavenLocal()
        gradlePluginPortal()
    }
}

and the build.gradle.kts with

buildscript {
    repositories {
        mavenLocal()
        gradlePluginPortal()
    }

    dependencies {
        classpath("io.slugstack.oss:slugstack-gradle-plugin:latest.release")
    }
}

apply(plugin = "io.slugstack.oss.slugstack-gradle-plugin")

About

testing creating a plugin to configure common opinionated defaults. also tests publishing both to maven and gradlePluginPortal.

License:Apache License 2.0


Languages

Language:Kotlin 49.5%Language:Java 31.8%Language:Groovy 18.7%