Open natario1 opened 4 years ago
@natario1 it's actually one package per subproject: you can have multiple subprojects in the same Gradle project, each (or at least more than one) of them publishing to Bintray (see here for some caveats and tricks)
Thanks - edited my request.
@natario1 I do not work for Bintray, so editing your request won't help :) I merely meant to suggest that to avoid contortion you describe, you may want to try splitting your project into subprojects in such a way that each subproject publishes no more than one package, and then you can configure the plugin normally, using the extension...
My edit makes it clear that I want to publish multiple packages from the same subproject. Which right now is possible (see links in original post), but only with a reflection call. By changing just a few lines in BintrayPublishTask
, this behavior could be allowed in a more elegant way.
The design of this plugin does not cover many use-cases in the public API (the extension), but at least the plugin internals (like BintrayPublishTask
) could be made open enough for advanced usages (like mine) to happen without weird tricks.
Hi, In order to support publishing multiple packages from the same Gradle subproject, I have to use
BintrayUploadTask
directly instead of configuring the extension.https://github.com/natario1/MavenPublisher/blob/81f3f070d9e4f2cd6a211b13b4e525172c71d144/publisher/src/main/kotlin/com/otaliastudios/tools/publisher/bintray/BintrayPublicationHandler.kt#L53-L76
It works fine, but the artifact is not really published in the Bintray website - you have to manually go there and approve it. This is because we also need to run a
BintrayPublishTask
.But currently there is no way to run
BintrayPublishTask
with our ownBintrayUploadTask
, so I have to use reflection on thepublishVersion()
method like so:https://github.com/natario1/MavenPublisher/blob/81f3f070d9e4f2cd6a211b13b4e525172c71d144/publisher/src/main/kotlin/com/otaliastudios/tools/publisher/bintray/BintrayPublicationHandler.kt#L78-L86
This is really dirty and I would like to avoid it in the long run. Can
BintrayPublishTask
be rewritten in such a way that it can be run on user providedBintrayUploadTask
? It could be as simple as having it accept a list of input upload tasks. If list is empty, it could fallback to the default behavior of finding tasks by name.Without this small fix, the Bintray Gradle Plugin can literally only be used from the extension, which means one package per subproject.