-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Sometimes, circumstances require the framework users to merge JAR files in a single, "fat" JAR. It includes all of the project modules and third-party dependencies. Typically, in Gradle, "fat" JARs are created using the Shadow plugin.
Spine uses Protobuf descriptor set files to make discover known Protobuf types. Since Protobuf descriptor set files are binary, they are hard to operate at build time: one would need to include Protobuf as a buildscript
dependency to be able to read and write descriptor files. For the needs of mering descriptor files from different JARs, we reference them via the desc.ref
file. Each Spine-based project may have a single desc.ref
file. The file contains names of the descriptor files shipped in that project separated by line breaks. So, the users may simply merge the desc.ref
files in separate JARs into a single desc.ref
and Spine will be able to make sense of it at runtime.
As the goal of the Bootstrap plugin is to simplify the Gradle configuration for the end user, we should merge the desc.ref
files automatically when possible. For that, we should detect the use of the Shadow plugin and configure it to merge desc.ref
files.