Closed LarsBodewig closed 1 week ago
In AbstractByteBuddyTask
, there is already a static method apply
that allows to trigger a transformation. From this, you could create a custom Task
type that fulfills your needs. If you wanted to write a generic one that I can add to Byte Buddy, I am happy to take it into the library! You could take the Maven task as an example. If you do not find the time, I might find it some time in the future, you are right that this should be easier.
I try to transform multiple JAR files using the ByteBuddyJarTask of the gradle plugin. Since the task only accepts one source and target file, I have to create a separate task for each JAR file.
This might be more of a general gradle issue, but creating a separate task for each file is very cumbersome if the files are not available at configuration time. Currently I invoke a second gradle build after the files are available like this:
build.gradle
byteBuddy.gradle
This seems like a bad way to use gradle.
If the ByteBuddyJarTask was changed or if there was another task that takes a directory as source and target, it would work with a dynamic list of JAR files.