mockito / shipkit

Toolkit for shipping it used by Mockito library
http://shipkit.org
MIT License
158 stars 35 forks source link

Multimodule project publicationRepository #655

Closed ashdavies closed 6 years ago

ashdavies commented 6 years ago

I've been trying to use shipkit to deploy a library, the configuration is a project with two modules, one containing the library (and the shipkit plugin) and one sample implementation module (not to be published).

I've followed the documentation as best I can identify, but each build fails to find the specified property publicationRepository, which is specified in the project level gradle/shipkit.gradle, I've tried specifying this in allprojects and in the module itself with no joy.

Additionally, I noticed that version.properties needs to be in the module also, and it can't be inherited from the project level, is there a better way of achieving this?

Any clues to what I'm doing wrong here?

epeee commented 6 years ago

Hi, you are using the "org.shipkit.java" plugin, right? If so, this plugin is intended to be applied to the root project. Using the initShipkit task should make it easy to get a basic config for your project. You mentioned that you just would like to publish one project of your multi project build. We are also doing so in the mockito project by using bintrayUpload.enabled = false and enable bintrayUpload just for the projects you'd like to publish (bintrayUpload.enabled = true). Furthermore, applying the shipkit java plugin to the rootproject should also solve your problem with the version.properties file. Is your project open source? I can have a quick look at your current config if so.

ashdavies commented 6 years ago

Yeah, I'm using the Java plugin, is there a default value for bintrayUpload.enabled, it seems odd that deployment would be an "opt-out" kind of deal, I'll give what you mentioned a go to see if it works.

The project is open source yep, https://github.com/ashdavies/rx-tasks/

mockitoguy commented 6 years ago

Hey @ashdavies! Thank you for trying out Shipkit! What's the status? Do you still need help?

mockitoguy commented 6 years ago

Let's improve the behavior of our top level plugins ("java" and "gradle-plugin") so that they provide a graceful message when the plugin is not applied to the root project.

In addition, let's add "faq.md" document with a very first question: how to prevent releasing of a submodule.

This way we can close the ticket. @ashdavies, let us know if you need further help!

mockitoguy commented 6 years ago

Opened a separate ticket to validate if plugin is applied to the root project: #671

Closing this ticket. Thank you @ashdavies for using Shipkit!