소스 검색

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: [