Open tajobe opened 6 months ago
Today I learned about shadowDist
! I always thought the point of the shadow plugin was to just ship a shadow jar. This seems quite reasonable and within the scope of this plugin to add support for, but I don't envision myself getting to it anytime soon
The Gradle shadow plugin has the ability to create an equivalent distribution but using the shadowed dependencies: https://imperceptiblethoughts.com/shadow/application-plugin/#distributing-the-shadow-jar
This plugin seems to set the javaagent path specifically for the ApplicationPlugin's task, not any/all
CreateStartScripts
type tasks. It might be useful to add the same injection of the javaagent to theShadowApplicationPlugin.SHADOW_SCRIPTS_TASK_NAME
task so it can be used in conjunction with shadow.Working around this by basically recreating what the plugin does:
Edit: the workaround is a bit more complicated as the script generated using the above isn't usable...instead I'm manually mapping the javaagent files to jvm opts and working around gradle/gradle#19795 with a pattern/replace. It's a bit ugly...