How can I bundle my gradle plugin in my custom distribution and apply it automatically to settings scripts & build scripts? I’m interested in applying a bundled plugin as early as before kts extensions are generated or the build script classpath is “finalized”
t
Thomas Broyer
03/22/2024, 2:06 PM
Never used custom distributions but can't you put an init script in the distribution's
init.d
directory? From there, use
beforeSettings
and
beforeProject
to apply your plugin?
☝️ 3
e
efemoney
03/23/2024, 2:17 AM
Yeah this is what I do currently but somehow it doesnt work to add DSL early enough. Trying to ensure my org gradle users have a straightforward way of accessing our internal artifactory.
This does not work because the settings script classpath is determined very early
efemoney
03/23/2024, 2:24 AM
This is also about what is the best way to bundle and therefore read the plugin from the distribution contents.
We already have a distribution, absolutely no use in publishing a plugin externally to some repo just to download it again…