slugstack-publishing-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 *PublishingPlugin.groovy to see what will be applied.
publishing to maven central snapshots
assuming the plugin has been published to maven central snapshots, in the consuming project, update the settings.gradle.kts with
pluginManagement {
resolutionStrategy {
eachPlugin {
if (requested.id.namespace == "io.slugstack") {
useModule("io.slugstack.oss:slugstack-publishing-plugin:${requested.version}")
}
}
}
repositories {
gradlePluginPortal()
mavenCentral()
maven {
url = uri("https://oss.sonatype.org/content/repositories/snapshots/")
}
mavenLocal()
}
}
and build.gradle.kts with
plugins {
id("io.slugstack.publishing-plugin") version "0.1.0-SNAPSHOT"
}
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-publishing-plugin:latest.release")
}
}
apply(plugin = "io.slugstack.publishing-plugin")