Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
vlsi opened this issue Feb 14, 2021 · 4 comments

Comments

@vlsi
Copy link
Contributor

vlsi commented Feb 14, 2021

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 vlsi changed the title Publish plugin markers to Sonatype OSSRH (Maven Central) Unlock plugins {...} syntax: publish plugin markers to Sonatype OSSRH (Maven Central) Feb 14, 2021
@loosebazooka
Copy link
Contributor

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),

@vlsi
Copy link
Contributor Author

vlsi commented Feb 15, 2021

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

@jamesward
Copy link

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.

@Goooler
Copy link

Goooler commented Mar 26, 2023

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}")
      }
    }
  }
}

@JoeWang1127 JoeWang1127 transferred this issue from GoogleCloudPlatform/app-gradle-plugin Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants