diff --git a/.gitignore b/.gitignore index 5d781f8..bd3e4d6 100644 --- a/.gitignore +++ b/.gitignore @@ -20,4 +20,15 @@ build __pycache__ Pods -CarControlleriOS/**/car \ No newline at end of file +CarControlleriOS/**/car +car/.idea + +.build +SwiftyCar/Packages +SwiftyCar/*.xcodeproj +SwiftyCar/Sources/Generated +SwiftyCar/xcuserdata/ +xcuserdata/ +.settings +.project +.classpath \ No newline at end of file diff --git a/SwiftyCar/Package.resolved b/SwiftyCar/Package.resolved new file mode 100644 index 0000000..12fe0a3 --- /dev/null +++ b/SwiftyCar/Package.resolved @@ -0,0 +1,70 @@ +{ + "object": { + "pins": [ + { + "package": "grpc-swift", + "repositoryURL": "https://github.com/grpc/grpc-swift.git", + "state": { + "branch": null, + "revision": "373ffd54c1c1a319d0ddac9476d13be9023584bb", + "version": "1.0.0-alpha.11" + } + }, + { + "package": "swift-log", + "repositoryURL": "https://github.com/apple/swift-log.git", + "state": { + "branch": null, + "revision": "74d7b91ceebc85daf387ebb206003f78813f71aa", + "version": "1.2.0" + } + }, + { + "package": "swift-nio", + "repositoryURL": "https://github.com/apple/swift-nio.git", + "state": { + "branch": null, + "revision": "40bdad80882d307abe2c0bb36cf3bd4d3e03fe04", + "version": "2.16.1" + } + }, + { + "package": "swift-nio-http2", + "repositoryURL": "https://github.com/apple/swift-nio-http2.git", + "state": { + "branch": null, + "revision": "82eb3fa0974b838358ee46bc6c5381e5ae5de6b9", + "version": "1.11.0" + } + }, + { + "package": "swift-nio-ssl", + "repositoryURL": "https://github.com/apple/swift-nio-ssl.git", + "state": { + "branch": null, + "revision": "ae213938e151964aa691f0e902462fbe06baeeb6", + "version": "2.7.1" + } + }, + { + "package": "swift-nio-transport-services", + "repositoryURL": "https://github.com/apple/swift-nio-transport-services.git", + "state": { + "branch": null, + "revision": "85a67aea7caf5396ed599543dd23cffeb6dbbf96", + "version": "1.5.1" + } + }, + { + "package": "SwiftProtobuf", + "repositoryURL": "https://github.com/apple/swift-protobuf.git", + "state": { + "branch": null, + "revision": "7790acf0a81d08429cb20375bf42a8c7d279c5fe", + "version": "1.8.0" + } + } + ] + }, + "version": 1 +} diff --git a/SwiftyCar/Package.swift b/SwiftyCar/Package.swift index 5a6fb5e..ff4bc2e 100644 --- a/SwiftyCar/Package.swift +++ b/SwiftyCar/Package.swift @@ -7,20 +7,21 @@ let package = Package( name: "SwiftyCar", products: [ // Products define the executables and libraries produced by a package, and make them visible to other packages. - .library( - name: "SwiftyCar", - targets: ["SwiftyCar"]), ], dependencies: [ // Dependencies declare other packages that this package depends on. // .package(url: /* package url */, from: "1.0.0"), + .package(url: "https://github.com/grpc/grpc-swift.git", from: "1.0.0-alpha.11") ], targets: [ // Targets are the basic building blocks of a package. A target can define a module or a test suite. // Targets can depend on other targets in this package, and on products in packages which this package depends on. + .target( + name: "Generated", + dependencies: [.product(name: "GRPC", package: "grpc-swift")]), .target( name: "SwiftyCar", - dependencies: []), + dependencies: ["Generated"]), .testTarget( name: "SwiftyCarTests", dependencies: ["SwiftyCar"]), diff --git a/SwiftyCar/Sources/SwiftyCar/SwiftyCar.swift b/SwiftyCar/Sources/SwiftyCar/SwiftyCar.swift deleted file mode 100644 index d091fe7..0000000 --- a/SwiftyCar/Sources/SwiftyCar/SwiftyCar.swift +++ /dev/null @@ -1,3 +0,0 @@ -struct SwiftyCar { - var text = "Hello, World!" -} diff --git a/SwiftyCar/Sources/SwiftyCar/main.swift b/SwiftyCar/Sources/SwiftyCar/main.swift new file mode 100644 index 0000000..115b18d --- /dev/null +++ b/SwiftyCar/Sources/SwiftyCar/main.swift @@ -0,0 +1,10 @@ +// +// main.swift +// +// +// Created by Michael Pivato on 8/5/20. +// + +// Entry-Point to the Swift Car Controller +print("Hello World!") + diff --git a/SwiftyCar/build.gradle b/SwiftyCar/build.gradle new file mode 100644 index 0000000..158e34f --- /dev/null +++ b/SwiftyCar/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 './Sources/Generated' +} \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index 553d966..1b5247a 100644 --- a/settings.gradle +++ b/settings.gradle @@ -2,4 +2,5 @@ include ':app' include ':protobuf' include 'car' include 'CarControlleriOS' +include 'SwiftyCar' rootProject.name='CarController'