Don't allow swift grpc generation on swift.

Swift on Windows isn't great atm.
This commit is contained in:
Piv
2020-05-19 18:40:29 +09:30
parent 92f82c0d33
commit a7fdbf3f6e
3 changed files with 16 additions and 10 deletions

View File

@@ -16,7 +16,8 @@ task copyPythonCode(type: Copy, dependsOn: configurations.python){
}
task build(type: Exec, dependsOn: copyPythonCode) {
commandLine 'python3', 'setup.py', 'bdist_wheel'
executable 'python3'
args 'setup.py', 'bdist_wheel'
}
task clean {

View File

@@ -6,3 +6,4 @@ u-msgpack-python
grpcio-tools
rplidar
pyzmq
wheel

View File

@@ -22,19 +22,21 @@ configurations {
protobuf {
protoc { artifact = 'com.google.protobuf:protoc:3.11.0' }
plugins {
swift {
path = "$projectDir/grpc_plugins/protoc-gen-swift"
}
grpc {
artifact = 'io.grpc:protoc-gen-grpc-java:1.28.1' // CURRENT_GRPC_VERSION
}
grpc_python {
path = "$projectDir/grpc_plugins/grpc_python_plugin_1.28.1-${osdetector.classifier}"
}
if(osdetector.os != 'windows'){
swift {
path = "$projectDir/grpc_plugins/protoc-gen-swift"
}
grpc_swift {
path = "$projectDir/grpc_plugins/protoc-gen-grpc-swift-$osdetector.classifier"
}
}
}
generateProtoTasks {
all().each { task ->
task.builtins {
@@ -43,19 +45,21 @@ protobuf {
python {}
}
task.plugins {
swift{}
grpc { // Options added to --grpc_out
option 'lite'
}
grpc_python {
outputSubDir = 'python'
}
if(osdetector.os != 'windows'){
swift{}
grpc_swift {
outputSubDir = 'swift'
}
}
}
}
}
}
task packPythonGrpc(type: Zip, dependsOn: protobuf.generateProtoTasks.all()) {