solonovamax
03/28/2024, 7:02 PMAbstractMavenPublisher, isn't accessible when using implementation(gradleApi()) (even though other internal classes are..?) for some reasonVampire
03/28/2024, 7:22 PMsolonovamax
03/28/2024, 7:23 PMsolonovamax
03/28/2024, 7:25 PMsolonovamax
03/28/2024, 7:26 PMMavenRemotePublisher, I can then navigate to it (it is a subclass of AbstractMavenPublishersolonovamax
03/28/2024, 7:26 PMsolonovamax
03/28/2024, 7:27 PMVampire
03/28/2024, 7:35 PMsolonovamax
03/28/2024, 7:35 PMMavenRepository as well as a custom publisher for it that will create the artifacts, bundle them into a zip, and then upload thatVampire
03/28/2024, 7:37 PMsolonovamax
03/28/2024, 7:37 PMVampire
03/28/2024, 7:37 PMsolonovamax
03/28/2024, 7:38 PMVampire
03/28/2024, 7:38 PMsolonovamax
03/28/2024, 7:39 PMsolonovamax
03/28/2024, 7:39 PMMavenArtifact and then use thatsolonovamax
03/28/2024, 7:40 PMMavenPublication implementation, and then my own custom publisherVampire
03/28/2024, 7:41 PMsolonovamax
03/28/2024, 7:42 PMVampire
03/28/2024, 7:45 PMsolonovamax
03/28/2024, 7:46 PMsolonovamax
03/28/2024, 7:48 PM[module]-[version]-[classifier].[extension] (iirc)solonovamax
03/28/2024, 7:48 PMjar task outputs in this format, however, I have noticed many projects before which will go and change this default behaviour to something elseVampire
03/28/2024, 7:49 PMsolonovamax
03/28/2024, 7:50 PMjar task.
so, I need some other way to get the module/version/classifier/extension and ensure the file has that name format.
which is part of the MavenArtifact, as such it would be best to consume thatsolonovamax
03/28/2024, 7:51 PMMavenRepository, so I'd have to either hijack an existing repository to publish to it, or have my own dummy repository that I hijackVampire
03/28/2024, 7:51 PMsolonovamax
03/28/2024, 7:53 PMsolonovamax
03/28/2024, 7:56 PMMavenPublication, and doing so requires the use of internal apisVampire
03/28/2024, 7:58 PMMavenPublication.
Can't you just process a configured MavenPublication?
And if not, there is probably also no problem to even make an own Publication subclass that users could then configure.
Or if you need all from MavenPublication plus some more, maybe a MavenPublication subclass.solonovamax
03/28/2024, 7:59 PMsolonovamax
03/28/2024, 8:00 PMMavenPublisher, and all existing implementations of it use AbstractMavenPublisher , so I probably should as well so I can benefit from any code changes to itsolonovamax
03/28/2024, 8:03 PMorg.gradle.api.publish.maven.internal.publisher packageVampire
03/28/2024, 8:10 PMbecause there is no way to tell a maven publication to "not upload files and then just give them to me so I can deal with them", so I need my own oneIt's task that do it, so you could either replace the actions of those tasks by using
actions.clear() (or taskActions.clear(), don't remember right now) and then registering own task actions with doLast or just leave the task without action.Vampire
03/28/2024, 8:12 PMMavenPublisher? MavenPublication does nowhere have MavenPublisher in its API, does it?solonovamax
03/28/2024, 8:13 PMPublishToMavenRepository task which uses a MavenPublisher , to perform the publication, so it's probably best for me to use that as well, to keep my code similar to gradle'sVampire
03/28/2024, 8:15 PMVampire
03/28/2024, 8:16 PMsolonovamax
03/28/2024, 8:17 PM