Skip to content

Merge descriptor reference files automatically #71

@dmdashenkov

Description

@dmdashenkov

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions