# Publishing multiple artifacts to plugin registry

**URL:** <https://discuss.gradle.org/t/publishing-multiple-artifacts-to-plugin-registry/27158>\
**Category:** Plugin Portal\
**Created:** [May 29, 2018, 10:58pm UTC](https://discuss.gradle.org/t/publishing-multiple-artifacts-to-plugin-registry/27158 "2018-05-29T22:58:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Oraculo](https://avatars.discourse-cdn.com/v4/letter/o/d2c977/32.png) [@Oraculo](https://discuss.gradle.org/u/Oraculo)\
**Post date:** [May 29, 2018, 10:58pm UTC](https://discuss.gradle.org/t/publishing-multiple-artifacts-to-plugin-registry/27158/1 "2018-05-29T22:58:36Z")

</div>

Good afternoon,

We want to open source an internal plugin which includes 3 different parts:

- Core library (used by other 2 parts, plus can be used to develop plugins for other build tools)
- Back end application
- Gradle plugin

Gradle plugin depends on core library which complicates plugin publishing. Is there any preferred way to to publish this?

Thanks

---

<div class="post-metadata">

**Author:** ![eriwen](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/eriwen/32/4786_2.png) [@eriwen](https://discuss.gradle.org/u/eriwen)\
**Post date:** [August 1, 2018, 9:23pm UTC](https://discuss.gradle.org/t/publishing-multiple-artifacts-to-plugin-registry/27158/2 "2018-08-01T21:23:14Z")

</div>

Hey Alex,

I’m sorry I missed this post until someone pointed me to it.

Since the plugin portal doesn’t host libraries, I suggest publishing the library to Bintray, then declaring a dependency on that library in your plugin. If the library is needed at runtime, you should consider _not_ declaring the `jcenter()` repository in your plugin, allowing the user to use their own internal repo.

If your situation is more nuanced such that you cannot do this, please provide a bit more detail and I promise our follow up will be more prompt.

Cheers,  
Eric

---

<div class="post-metadata">

**Author:** ![Oraculo](https://avatars.discourse-cdn.com/v4/letter/o/d2c977/32.png) [@Oraculo](https://discuss.gradle.org/u/Oraculo)\
**Post date:** [August 2, 2018, 9:20pm UTC](https://discuss.gradle.org/t/publishing-multiple-artifacts-to-plugin-registry/27158/3 "2018-08-02T21:20:07Z")

</div>

Good afternoon Eric,

Thanks for reply, but I ended up publishing everything to Maven Central. Thus users can fetch everything from one location or rely on internal cache repositories. You need to host repository or it’s fork on Bintray to deploy to JCenter, which is not convenient as we have organization on GitHub:

> **[PandoraMedia/hydra](https://github.com/PandoraMedia/hydra)**
>
> hydra - High performance parallel testing plugin for Gradle

  
[http://central.maven.org/maven2/com/pandora/hydra/](http://central.maven.org/maven2/com/pandora/hydra/)

---

<div class="post-metadata">

**Author:** ![eriwen](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/eriwen/32/4786_2.png) [@eriwen](https://discuss.gradle.org/u/eriwen)\
**Post date:** [August 3, 2018, 11:12pm UTC](https://discuss.gradle.org/t/publishing-multiple-artifacts-to-plugin-registry/27158/4 "2018-08-03T23:12:41Z")

</div>

Okay. It may be notable that JCenter mirrors Maven Central. Note also that the Gradle Plugin Portal currently relays requests it cannot handle to JCenter.

Glad you got this stuff out there, though. I’ll link to this plugin in the next [Gradle newsletter](https://newsletter.gradle.com).

---

<div class="post-metadata">

**Author:** ![Oraculo](https://avatars.discourse-cdn.com/v4/letter/o/d2c977/32.png) [@Oraculo](https://discuss.gradle.org/u/Oraculo)\
**Post date:** [August 11, 2018, 12:15am UTC](https://discuss.gradle.org/t/publishing-multiple-artifacts-to-plugin-registry/27158/5 "2018-08-11T00:15:32Z")

</div>

Eric,  
Yeah, that was a workaround, so developers should not even need to customize build script repositories list.  
Thanks a lot, it would be really great to get more exposure.
