So I have four outputs in my build : grpc, grpckt, java and kotlin an kotlin is the only one to fail with the following error :
Execution failed for task ':stub:generateProto'.
> protoc: stdout: . stderr: cc/arduino/cli/commands/v1/BoardKt.kt: Tried to write the same file twice.
I have tried a lot of things but I really don't know how to work around this error, especially because it work with every other languages.
If it can help, here is the command that the gradle plugin execute and the one that the arduino team execute to build their Go sources :
Gradle :
```
D:\Vivien\AppData\.gradle\caches\modules-2\files-2.1\com.google.protobuf\protoc\3.24.1\3052022638437eefd2645963518be582bb24273a\protoc-3.24.1-windows-x86_64.exe, -ID:\Vivien\Projects\Idea\intellino\stub\build\extracted-protos\main, -ID:\Vivien\Projects\Idea\intellino\stub\build\extracted-include-protos\main, --java_out=D:\Vivien\Projects\Idea\intellino\stub\build\generated\source\proto/main/java, --kotlin_out=D:\Vivien\Projects\Idea\intellino\stub\build\generated\source\proto/main/kotlin, --plugin=protoc-gen-grpc=D:\Vivien\AppData\.gradle\caches\modules-2\files-2.1\io.grpc\protoc-gen-grpc-java\1.57.2\5670558169ce74039d210781b06c8d8136c0868f\protoc-gen-grpc-java-1.57.2-windows-x86_64.exe, --grpc_out=D:\Vivien\Projects\Idea\intellino\stub\build\generated\source\proto/main/grpc, --plugin=protoc-gen-grpckt=D:\Vivien\Projects\Idea\intellino\stub\build\scripts\protoc-gen-grpc-kotlin-1.4.0-jdk8-generateProto-trampoline.bat, --grpckt_out=D:\Vivien\Projects\Idea\intellino\stub\build\generated\source\proto/main/grpckt, D:\Vivien\Projects\Idea\intellino\stub\build\extracted-protos\main\cc\arduino\cli\commands\v1\board.proto, D:\Vivien\Projects\Idea\intellino\stub\build\extracted-protos\main\cc\arduino\cli\commands\v1\commands.proto, D:\Vivien\Projects\Idea\intellino\stub\build\extracted-protos\main\cc\arduino\cli\commands\v1\common.proto, D:\Vivien\Projects\Idea\intellino\stub\build\extracted-protos\main\cc\arduino\cli\commands\v1\compile.proto, D:\Vivien\Projects\Idea\intellino\stub\build\extracted-protos\main\cc\arduino\cli\commands\v1\core.proto, D:\Vivien\Projects\Idea\intellino\stub\build\extracted-protos\main\cc\arduino\cli\commands\v1\debug.proto, D:\Vivien\Projects\Idea\intellino\stub\build\extracted-protos\main\cc\arduino\cli\commands\v1\lib.proto, D:\Vivien\Projects\Idea\intellino\stub\build\extracted-protos\main\cc\arduino\cli\commands\v1\monitor.proto, D:\Vivien\Projects\Idea\intellino\stub\build\extracted-protos\main\cc\arduino\cli\commands\v1\port.proto, D:\Vivien\Projects\Idea\intellino\stub\build\extracted-protos\main\cc\arduino\cli\commands\v1\upload.proto, D:\Vivien\Projects\Idea\intellino\stub\build\extracted-protos\main\cc\arduino\cli\settings\v1\settings.proto
```
Arduino (from their github repo)
```
protoc --proto_path=rpc --go_out=./rpc --go_opt=paths=source_relative --go-grpc_out=./rpc --go-grpc_opt=paths=source_relative ./rpc/cc/arduino/cli/commands/v1/*.proto'
protoc --proto_path=rpc --go_out=./rpc --go_opt=paths=source_relative --go-grpc_out=./rpc --go-grpc_opt=paths=source_relative ./rpc/cc/arduino/cli/settings/v1/*.proto'
```
Thanks in advance, - Vivien