Răsfoiți Sursa

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 ani în urmă
părinte
comite
3f7052e964
2 a modificat fișierele cu 3 adăugiri și 6 ștergeri
  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: [