This message was deleted.
# plugin-development
s
This message was deleted.
m
publish your library to a local maven repo and declare that local maven repo in your test projects
s
Thanks for the tip @Martin !
👍 1
j
the answer to your original question is Yes, you can do that. you can use
withPluginClasspath()
and pass in the Files that you need to include from your library (such as the files in
build/classes/groovy/main
m
Yea, I used to do that and got bitten multiple times. Especially when you start relocating your plugin, etc... The local maven solution is as close as possible to what users are doing so I like this better. But whatever floats your boat!
s
@John just for me to understand better: I was on that path but I got stuck on fetching the list of paths with the compilation output. How do I do that in a safe way? (ie a programmatic way that's robust to relocations and path customization)
e
you can customize what gets pulled in by
withPluginClasspath()
with
Copy code
tasks.pluginUnderTestMetadata {
    pluginClasspath.from(...)
}
(in the plugin project's build script, not the plugin or test itself)
s
Thanks @ephemient I'll give it a try :)