Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restrict getOutputSourceDirectorySet() to directories only
#480 allows `outputPath` to be a zip/jar file, but it's not excluded from the `SourceDirectorySet` in that case. Therefore, when the source set gets evaluated, it leads to this exception in Gradle 7.2: ``` Caused by: org.gradle.api.InvalidUserDataException: Source directory '<redacted>/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) at jdk.internal.reflect.GeneratedMethodAccessor2253.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at com.google.protobuf.gradle.ProtobufPlugin$_addSourcesToIde_closure31.doCall(ProtobufPlugin.groovy:554) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at com.google.protobuf.gradle.ProtobufPlugin.addSourcesToIde(ProtobufPlugin.groovy:553) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at com.google.protobuf.gradle.ProtobufPlugin$_doApply_closure5.doCall(ProtobufPlugin.groovy:159) ... ```
- Loading branch information