Uploading snapshot versions to the plugin portal

There are really two issues here in terms of different workflows. Yes, there’s the difference in publishing plugins, which requires different configurations and conditionals so that snapshots aren’t pushed to the plugin portal.

But this also requires two different workflows for projects that use the plugin as a dependency, one for using release versions and one for using the plugin portal version. And not only does it require two different workflows, it requires two separate build.gradle files, since you can’t do something like this:

// For plugin portal
plugins {
    id "org.foo.bar" version "1.0"
}

buildscript {
    repositories {
        mavenLocal()
        maven { url 'http://snapshot.repo.com' }
    }
    dependencies {
        classpath "org.foo:bar-plugin:1.0-SNAPSHOT"
    }
}

apply plugin: 'foobar'

These are incompatible and there’s no way to conditionalize the plugins block, since that has to be the first element in the configuration.

Basically the formats of the different ways of including plugins are different enough that not supporting development workflows through the portal basically means using the portal will remain an afterthought to developers. I mean, I was psyched to use it, immediately ran into this problem, and am now reverting all my changes and probably won’t look at it again.

On a related note, my snapshot version plugin was installed easily enough on the portal, but when I try to reference it in my build.gradle, I get a message that “snapshot plugin versions are not supported”. That’s fine (well, it’s not but it’s understandable), but the portal should probably block snapshot versions from even being published if that’s the case.

1 Like