appengine-plugins icon indicating copy to clipboard operation
appengine-plugins copied to clipboard

Unlock plugins {...} syntax: publish plugin markers to Sonatype OSSRH (Maven Central)

Open vlsi opened this issue 4 years ago • 4 comments

Gradle plugins are usable with plugins {...} syntax if they have plugin markers Currently app-gradle-plugin does not publish one, so the users struggle.

It would be great if the markers were published.


Currently, app-gradle-plugin uses maven to publish to Nexus. maven is deprecated for a long time, and it is probably time to migrate to maven-publish


I don't know the way you publish/release, and I don't want to interrupt workflows, however, I guess the following might be a sane plan:

  • Bump Gradle (e.g. to 6.8.2)
  • Use maven-publish for publishing
  • Use Gradle's java-gradle-plugin for plugin marker generation
  • Use https://github.com/gradle-nexus/publish-plugin for Nexus staging. Just in case, staging enables you to create a "staging" repository, push multiple artifacts and release them at once (or drop the staged repo)
  • Use Kotlin DSL for Gradle for less magic and better autocomplete

WDYT?

vlsi avatar Feb 14 '21 21:02 vlsi

Sorry, we're always a little slow during the weekends. So we actually have a special release process where we sign with the google open source key (which must be done out of the standard build process). So we do not publish directly using the maven (or maven-publish),

loosebazooka avatar Feb 15 '21 18:02 loosebazooka

Long story short: I want to migrate my Python-Google App Engine-based app to Kotlin. The samples are there, however, it turns out they are out of date :(. I thought I could reduce the friction, so I created a PR to refresh kotlin-samples and a PR to refresh app-gradle-plugin

Of course, now I got the sample working. I hope the publication of the plugin markers and updating the samples would ease the learning curve and it won't disrupt your workflows much.

/cc @jamesward

vlsi avatar Feb 15 '21 22:02 vlsi

Thanks for the heads up. I've just been working on the Cloud Run Kotlin samples not the App Engine ones. Sorry I'm not more helpful on this.

jamesward avatar Feb 17 '21 23:02 jamesward

Workaround in settings.gradle.kts:

pluginManagement {
  resolutionStrategy {
    eachPlugin {
      if (requested.id.id == "com.google.cloud.tools.appengine") {
        useModule("com.google.cloud.tools:appengine-gradle-plugin:${requested.version}")
      }
    }
  }
}

Goooler avatar Mar 26 '23 11:03 Goooler