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

Recommend files() instead of fileTree() in protobuf dependency #294

Merged
merged 4 commits into from
Jan 18, 2019

Conversation

zhangkun83
Copy link
Collaborator

We incorrectly recommended the use of:

protobuf fileTree("ext/")

With this syntax Gradle will collect all files under the given directory and emit them as individual files, leaving the plugin unable to tell what the root directory is, thus dumping the files under the same directory.

If we just pass the directory to the configuration, the current implementation will correctly handle the copying of a whole directory, preserving its structure:

protobuf files("ext/")

This PR includes a test to reproduce the issue, and updates tests and examples to use the latter syntax. A warning will be printed if the former syntax is detected.

Resolves #248

@zhangkun83 zhangkun83 requested a review from ejona86 January 17, 2019 01:07
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