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

Use maven publish plugin for central publishing #256

Closed
wants to merge 5 commits into from

Conversation

ZacSweers
Copy link
Contributor

@ZacSweers ZacSweers commented Aug 8, 2020

This simplifies setup using the gradle maven publish plugin for publishing to central. This removes jcenter publishing, but publishing just to central covers jcenter since it proxies it anyway.

https://github.com/vanniktech/gradle-maven-publish-plugin

This requires added local gradle properties (recommended to put them in your ~/.gradle/gradle.properties) for signing and auth, described here: https://github.com/vanniktech/gradle-maven-publish-plugin#where-to-upload-to

Most significantly, this automatically handles publishing the gradle plugin marker artifact as well so that it can be used directly in plugins {...}

This also makes snapshots development (./gradlew uploadArchives when the version ends in -SNAPSHOT) and local development ./gradlew install) easier

Resolves #267

This simplifies setup using the gradle maven publish plugin for publishing to central. This removes jcenter publishing, but publishing just to central covers jcenter since it proxies it anyway.

https://github.com/vanniktech/gradle-maven-publish-plugin

This requires added local gradle properties (recommended to put them in your ~/.gradle/gradle.properties) for signing and auth, described here: https://github.com/vanniktech/gradle-maven-publish-plugin#where-to-upload-to

Most significantly, this automatically handles publishing the gradle plugin marker artifact as well so that it can be used directly in `plugins {...}`
@ZacSweers
Copy link
Contributor Author

This is... an interesting error

* What went wrong:
A problem occurred configuring root project 'app'.
> Could not resolve all artifacts for configuration ':classpath'.
   > Could not find com.bugsnag:bugsnag-android-gradle-plugin:9000.0.0-test.
     Searched in the following locations:
       - file:/home/travis/.m2/repository/com/bugsnag/bugsnag-android-gradle-plugin/9000.0.0-test/bugsnag-android-gradle-plugin-9000.0.0-test.pom
       - file:/home/travis/.m2/repository/com/bugsnag/bugsnag-android-gradle-plugin/9000.0.0-test/bugsnag-android-gradle-plugin-9000.0.0-test.jar
       - https://dl.google.com/dl/android/maven2/com/bugsnag/bugsnag-android-gradle-plugin/9000.0.0-test/bugsnag-android-gradle-plugin-9000.0.0-test.pom
       - https://dl.google.com/dl/android/maven2/com/bugsnag/bugsnag-android-gradle-plugin/9000.0.0-test/bugsnag-android-gradle-plugin-9000.0.0-test.jar
       - https://jcenter.bintray.com/com/bugsnag/bugsnag-android-gradle-plugin/9000.0.0-test/bugsnag-android-gradle-plugin-9000.0.0-test.pom
       - https://jcenter.bintray.com/com/bugsnag/bugsnag-android-gradle-plugin/9000.0.0-test/bugsnag-android-gradle-plugin-9000.0.0-test.jar
     Required by:
         project :

Copy link
Contributor

@fractalwrench fractalwrench left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good, just one query about whether it's still possible to publish to Bintray. CI also appears to be broken, potentially it might be the case of setting this flag to disable signing on CI: vanniktech/gradle-maven-publish-plugin#114

build.gradle Show resolved Hide resolved
@xljones xljones added backlog We hope to fix this feature/bug in the future feature request Request for a new feature labels Aug 11, 2020
@ZacSweers
Copy link
Contributor Author

Looks like it's working now 👍 . Would be worth exploring enabling snapshots btw, makes it easy for people to try new versions. This plugin handles it well too as long at the version ends in -SNAPSHOT

@ZacSweers ZacSweers deleted the z/uploads branch August 21, 2020 04:53
@johnkiely1 johnkiely1 removed backlog We hope to fix this feature/bug in the future feature request Request for a new feature labels Jun 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants