Преглед на файлове

Make the first plugin build step build only the template encoder, as template.swift does not exist at that time.
In the second step, we then only need to build the actual plugin.

(Also removes the plugin's dependency from the template encoder, as the plugin's code does not actually depend on the template encoder.)

Daniel Alm преди 7 години
родител
ревизия
3f7052e964
променени са 2 файла, в които са добавени 3 реда и са изтрити 6 реда
  1. 2 2
      Plugin/Makefile
  2. 1 4
      Plugin/Package.swift

+ 2 - 2
Plugin/Makefile

@@ -2,9 +2,9 @@
 default:	build
 
 build:  clear
-	swift build # This run is to build the template encoder
+	swift build --product TemplateEncoder
 	.build/debug/TemplateEncoder > Sources/protoc-gen-swiftgrpc/templates.swift
-	swift build # This run is to build the plugin
+	swift build --product protoc-gen-swiftgrpc
 	cp .build/debug/protoc-gen-swiftgrpc .
 	cp .build/debug/protoc-gen-swift .
 

+ 1 - 4
Plugin/Package.swift

@@ -18,10 +18,7 @@ import PackageDescription
 let package = Package(
   name: "SwiftGRPCPlugin",
   targets: [
-    Target(name: "protoc-gen-swiftgrpc",
-           dependencies: [
-            "TemplateEncoder",
-            ]),
+    Target(name: "protoc-gen-swiftgrpc"),
     Target(name: "TemplateEncoder")
   ],
   dependencies: [