How do I use the Gradle Shadow Plugin to merge spring.handlers and spring.schemas files of multiple Spring jar dependencies?

I tested it with the following configuration and was able to get it to work. By “work”, I mean the resultant files were correctly concatenated.

import com.github.jengelman.gradle.plugins.shadow.transformers.ServiceFileTransformer

shadowJar {

transform(ServiceFileTransformer) {

path = ‘META-INF’

include ‘spring.*’

}

}

2 Likes