Where are the http4k connect gradle plugins actual...
# http4k
a
Where are the http4k connect gradle plugins actually published? I think the example repo is just using the locally built plugins.
d
Not sure what you mean here?
the KSP generator is here: mvnrepository.com/artifact/org.http4k/http4k-connect-ksp-generator/6.55.0.0 and you apply it with
Copy code
ksp("org.http4k:http4k-connect-ksp-generator:${project.property("http4kVersion")}")
... but that's not a gradle plugin per se
we also have custom gradle plugins in the main repo of course, but I don't think you mean this? 🙂
a
I'm specifically looking for the plugin that processes the
@Http4kConnectClient
actions. But I'm not actually sure if it's intended for use externally 😅
d
it's just the KSP plugin, so in the examples repo:
Copy code
plugins {
    alias(libs.plugins.ksp)
}
the KSP generator is applied in the gradle to the source set (main/test/testFixtures etc) and all registered generators are invoked for each
a
Well, the example module has these plugins. I feel like if I just add KSP to my project, it won't pick up the custom KSP generator, hence the need for the http4k-connect "plugin".
Copy code
id("org.http4k.conventions")
id("org.http4k.connect.module")
id("org.http4k.connect.client")
I assume what I want is the
client
plugin. But, if I assume the plugins have the same versioning scheme, I use
Copy code
id("org.http4k.connect.client") version "6.55.0.0"
Which just results in an error
Copy code
Plugin [id: 'org.http4k.connect.client', version: '6.55.0.0'] was not found in any of the following sources:
My assumption is that this plugin isn't actually published anywhere.
d
ah - you're talking about the main repo. The "plug-ins" that exist in the gradle folder are indeed just custom plugins for the repo and do not get published anywhere
Copy code
id("org.http4k.connect.client") version "6.55.0.0"
^^ so this won't work.
are you trying to write an equivalent set of plugins for your own repo (as opposed to anything to do with the http4k connect functionalities)?
a
Yeah. I was just hoping to build a completely unrelated client in the style of http4k-connect. No worries that it's unsupported.
d
so are you looking to publish an actual gradle plugin?
a
No. I was just hoping one already existed.
d
if you add KSP and register the generator it should pick up the generator
a
Ah, that makes sense. Import the
ksp-generator
module and then run
ksp
on it. That's exactly what the gradle conventions plugin for connect does. Except, trying to run the generator module gives me a KSP error. I believe I'm running the same versions as http4k, so that's not the issue 🤔.
Copy code
Unable to load class 'com.google.devtools.ksp.impl.KotlinSymbolProcessing$ExitCode'.
d
hmmm - that does smells like something "version-y"
a
You would think so
d
set the bot on it?
claude likes smashing it's head against gradle 😂
a
It thinks ksp is still coupled to the kotlin version 😢 . Could try a smarter one though.
Well, you've given me everything I need at this point. I'll try to work it out on my own, but not a big deal if I can't get the autogenerated extension functions. Thanks for the help!
Well Gemini 3 flash and a cloud 4.5 opus both think ksp versions are still coupled to kotlin versions. I tried claude 4.8 opus next, and specifically told it not to make that same mistake. Turns out the problem was that my dependency catalog entry was pointing to
http4k-core
laugh cry face palm
Well... I don't think Onvif/SOAP fits nicely into http4k-connect, since the request body sometimes requires the credentials. But this is still useful knowledge for later.
d
well if it's something like:
Copy code
<wrapper user="asd" password="pw"><body/></wrapper>
and the body varies then you can always inject the body into the action and then synthesize the entire thing in the underlying adapter
a
Yeah... in fact I already do something similar in another onvif client.