google / protobuf-gradle-plugin

Protobuf Plugin for Gradle
Other
1.77k stars 273 forks source link

Can't directly use plugin from MavenCentral - Plugin's marker isn't published. #763

Open timothyfroehlich opened 4 weeks ago

timothyfroehlich commented 4 weeks ago

I'm modifying my build to remove the Gradle Plugin Portal from my plugin repositories and the Protobuf plugin is the one giving me an issue. I'm unable to apply the plugin using the below block:

plugins {
  id "com.google.protobuf" version "0.9.4"
}

Instead I needed configure it the old way using buildscript:

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath("com.google.protobuf:protobuf-gradle-plugin:0.9.4")
    }

It seems like the plugin's marker artifact isn't being published to mavenCentral. If that can be fixed then I'd be able to remove the buildscript bit.

ejona86 commented 4 weeks ago

Is there a reason you aren't using the Gradle Plugin Portal? The Maven Central method has been maintained for older usages of the plugin.

timothyfroehlich commented 4 weeks ago

The short version is that we're looking to change our build to pull dependencies from a secured mirror, and that mirror doesn't currently pull from the Gradle Plugin Portal. Feel free to ping me if you'd like to know more about what we're up to.

ejona86 commented 4 weeks ago

I can follow that case. I figured you had your own mirror in some way. Aren't you going to have problems with many different plugins, or are plugins overall still publishing to Maven Central?

timothyfroehlich commented 4 weeks ago

That's the thing, I think the Protobuf plugin is the only one that we're using that couldn't be found on GMaven or MavenCentral. I was confirming that and found another plugin (Kotlin Gradle DSL) that's only on GPP, but I'm pretty confident I can get around that one.