You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The default python plugin is able to generate code directly into a zipfile. It determines whether to do this by looking at the suffix of the output path (and if it sees a .zip, it assumes you want a zipped output). Could we add an option to the python plugin to support this behavior? I think currently the plugin makes all the output directories up to and including outputSubdir. So this behavior almost works without modification except at the last second it complains
<...>.zip: Is a directory
The text was updated successfully, but these errors were encountered:
Looks we only need to not create a directory for the leaf of the path given by outputSubDir if it ends with .jar or .zip, and things will be working out of the box. outputSubDir maps to the --builtin_out in protoc invocations.
This works great the first time I run the task, but all subsequent runs fail because the plugin makes the output zip itself a source directory:
Caused by: org.gradle.api.InvalidUserDataException: Source directory '.../build/generated-proto/main/cpp.zip' is not a directory.
at org.gradle.api.internal.file.DefaultSourceDirectorySet.getSourceTrees(DefaultSourceDirectorySet.java:273)
at org.gradle.api.internal.file.DefaultSourceDirectorySet.getSrcDirTrees(DefaultSourceDirectorySet.java:256)
at org.gradle.api.internal.file.DefaultSourceDirectorySet.getSrcDirs(DefaultSourceDirectorySet.java:114)
...
Any way to avoid creating a new source directory or maybe just remove it before the task runs?
https://developers.google.com/protocol-buffers/docs/reference/python-generated#invocation
The default python plugin is able to generate code directly into a zipfile. It determines whether to do this by looking at the suffix of the output path (and if it sees a .zip, it assumes you want a zipped output). Could we add an option to the python plugin to support this behavior? I think currently the plugin makes all the output directories up to and including
outputSubdir
. So this behavior almost works without modification except at the last second it complains<...>.zip: Is a directory
The text was updated successfully, but these errors were encountered: