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

Package, publish and unpack avro schema artifact #18

Merged
merged 10 commits into from
Jun 18, 2020

Conversation

RustedBones
Copy link
Collaborator

@RustedBones RustedBones commented Apr 14, 2020

Add the possibility to package avro sources, publish and declare it as dependency.

To be worked on: In the future, it would be nice to also the support of artifacts without avro classifier as dependencies for the avroGenerate task

Extract avro schema from any desired dependency
@RustedBones
Copy link
Collaborator Author

Adding the avroDependencyIncludeFilter allows the user to tell the plugin which deps contain avro schemas. By default, it will only look in dependencies marked as source type with avro classifier

inStyle = FilesInfo.lastModified,
outStyle = FilesInfo.exists
) { deps =>
val moduleTarget = extractTarget / module.organization / module.name
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is a trade-off: Unpack on separate directories to avoid file name conflict between deps and fail avro generation in case avroUseNamespace is set. Or unpack all schemas in extractTarget but risk conflict

@nevillelyh
Copy link
Collaborator

Sorry I had to merge #23 first for another fix, which includes the avroGenerate / target change. Can you rebase?

@RustedBones RustedBones requested a review from nevillelyh May 15, 2020 08:58
@RustedBones
Copy link
Collaborator Author

@nevillelyh Can this have another look before merge ? ☺️

@nevillelyh nevillelyh merged commit 3d2d5ad into sbt:master Jun 18, 2020
nevillelyh added a commit that referenced this pull request Jun 18, 2020
* Package, publish and unpack avro schema artifact

* Update README

* Fix caching and use separate target directory

* Introduce avroDependencyIncludeFilter setting

Extract avro schema from any desired dependency

* Use target setting

* Unpack avro sources dependencies in sourceManaged folder

Co-authored-by: Neville Li <neville@spotify.com>
@RustedBones RustedBones deleted the package-avro branch September 16, 2020 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants