-
Notifications
You must be signed in to change notification settings - Fork 9
How to release with Bintray
Bintray allows you to synchronize your releases with Maven Central, so that every time you publish a package you can also send it to Maven Central and make it available to the world.
This feature is optional, but enabled by default for releases via tag. If you only want to sync Maven Central for stable releases, don't change this setting.
If you want to disable synchronize to Maven Central, scope this at the project or global level:
// build.sbt
releaseEarlyEnableSyncToMaven := false
If you want to synchronize to Maven Central for all the versions, change it to:
// build.sbt
releaseEarlyEnableSyncToMaven := true
- Create a Maven Bintray repository.
- After you have released your first package, ever, synchronize
your Bintray package with JCenter.
Then, the following will happen:
- The Bintray team will accept your package into the JCenter repository (~1-2 hours).
- You will get a notification when your package can be synchronized to Maven Central, like:
After these manual steps, releaseEarly
will do its job. If gpg keys are
accessible to the CI and releaseEarlyEnableSyncToMaven
is true,
synchronization to Maven Central will happen every time you execute
releaseEarly
.
Bintray has several disadvantages:
- It requires an extra account.
- Synchronizing to Maven Central requires a Sonatype account and is done per package, meaning that if you want to synchronize to Maven Central several packages you'll need to ask for permissions for each one. This takes up some non-negligible time.
- You cannot synchronize sbt plugins to Maven Central because they do not support permissive layouts. Related issues here and here. The Bintray team has said that they will fix it but it has not promised a timeline.
- Requires the setup of specific Bintray resolvers.
Read up on Sonatype's disadvantages if you're interested to see how it fares.
This is a Scala Center project, originally created by jvican. It now powers the Scala Platform sbt plugin and several Scala Center projects. If you find it useful, give the Center a shout-out in our official Twitter account or let us know in our Gitter channel. Your feedback is important and motivates us to keep improving this plugin.