ソースを参照

Support build docc from SPM

onevcat 3 年 前
コミット
3f49e3f06a
3 ファイル変更28 行追加0 行削除
  1. 5 0
      .spi.yml
  2. 16 0
      Package.resolved
  3. 7 0
      Package.swift

+ 5 - 0
.spi.yml

@@ -0,0 +1,5 @@
+version: 1
+builder:
+  configs:
+    - platform: ios
+      documentation_targets: [Kingfisher]

+ 16 - 0
Package.resolved

@@ -0,0 +1,16 @@
+{
+  "object": {
+    "pins": [
+      {
+        "package": "SwiftDocCPlugin",
+        "repositoryURL": "https://github.com/apple/swift-docc-plugin",
+        "state": {
+          "branch": null,
+          "revision": "3303b164430d9a7055ba484c8ead67a52f7b74f6",
+          "version": "1.0.0"
+        }
+      }
+    ]
+  },
+  "version": 1
+}

+ 7 - 0
Package.swift

@@ -14,3 +14,10 @@ let package = Package(
         )
         )
     ]
     ]
 )
 )
+
+#if swift(>=5.6)
+  // Add the documentation compiler plugin if possible
+  package.dependencies.append(
+    .package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0")
+  )
+#endif