From 77dff59d3842217da7d042d49a4f766b114ed7d4 Mon Sep 17 00:00:00 2001 From: Piv <18462828+Piv200@users.noreply.github.com> Date: Wed, 29 Apr 2020 19:10:07 +0930 Subject: [PATCH] Generate and copy swift grpc/protobuf code --- CarControlleriOS/CarController/Podfile | 1 - CarControlleriOS/build.gradle | 16 ++++++++++++++++ settings.gradle | 1 + 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/CarControlleriOS/CarController/Podfile b/CarControlleriOS/CarController/Podfile index 215eb47..ac4cb24 100644 --- a/CarControlleriOS/CarController/Podfile +++ b/CarControlleriOS/CarController/Podfile @@ -8,5 +8,4 @@ target 'CarController' do # Pods for CarController pod 'gRPC-Swift', '1.0.0-alpha.11' pod 'SwiftyZeroMQ5' - pod 'SwiftProtobuf', '~> 1.0' end diff --git a/CarControlleriOS/build.gradle b/CarControlleriOS/build.gradle index e69de29..ea6f5da 100644 --- a/CarControlleriOS/build.gradle +++ b/CarControlleriOS/build.gradle @@ -0,0 +1,16 @@ +configurations{ + swift { + canBeConsumed = false + canBeResolved = true + } +} + +dependencies { + swift project(path: ':protobuf', configuration: 'swift') +} + +task copySwiftCode(type: Copy, dependsOn: configurations.swift) { + // Copy python protobuf code from proto project. + from zipTree(configurations.swift.asPath) + into './CarController/CarController' +} \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index 06d1ba1..553d966 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,4 +1,5 @@ include ':app' include ':protobuf' include 'car' +include 'CarControlleriOS' rootProject.name='CarController'