Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve the generation of descriptor set files for "simple" Spine libraries #504

Merged
merged 2 commits into from
Jan 2, 2024

Conversation

armiol
Copy link
Contributor

@armiol armiol commented Jan 2, 2024

At the moment, not all Spine libraries are able to use Spine McJava plugin — due to the cyclic dependencies otherwise introduced. But simultaneously, libraries like tool-base and base-types provide their own Proto language, and hence, must bring respective descriptor set files with them.

This issue has been addressed very inconsistently throughout the repositories, leading to mis-interpretation of descriptor set files, or failures to locate them at all.

This changeset improves the descriptor set generation by doing the following.

  • For the descriptor set file name, a Maven coordinates of the respective artifact are used. Previously, we used known_types_{sourceSetName}.desc everywhere, which caused clashes.
  • Generate a new desc.ref file referencing the generated descriptor set file. So far, it was not done at all, leading to loss of the generated descriptor set files.

These changes are inspired by the corresponding code in McJava (see JavaProtocConfigurationPlugin). However, in this PR, the code is much simpler, and no extra Gradle tasks is created.

…t use McJava (due to dependencies):

- use per-maven-artifact strategy for naming the descriptor set file (and stop using the same `known_types_...` everywhere;
- generate `desc.ref` file referencing the generated descriptor set file (it has not been doing so far).
@armiol armiol self-assigned this Jan 2, 2024
@armiol
Copy link
Contributor Author

armiol commented Jan 2, 2024

@alexander-yevsyukov PTAL.

Copy link
Contributor

@alexander-yevsyukov alexander-yevsyukov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@armiol armiol merged commit 7b61368 into master Jan 2, 2024
2 checks passed
@armiol armiol deleted the desc-ref-for-simple-libraries branch January 2, 2024 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants