Skip to content
This repository was archived by the owner on Jan 11, 2024. It is now read-only.

Commit 755380e

Browse files
committed
chore: add future cocoapods docc support preparation
1 parent f60c90c commit 755380e

6 files changed

Lines changed: 15 additions & 57 deletions

File tree

DynamicCodableKit.podspec

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,13 @@ Pod::Spec.new do |s|
2828
s.watchos.deployment_target = '2.0'
2929
s.osx.deployment_target = '10.10'
3030

31-
s.source_files = "Sources/#{s.name}/**/*.swift"
31+
s.source_files = "Sources/#{s.name}/**/*.swift", "Sources/#{s.name}/*.docc"
3232
s.preserve_paths = "{Sources,Tests}/#{s.name}*/**/*", "*.md"
33+
s.pod_target_xcconfig = {
34+
'CLANG_WARN_DOCUMENTATION_COMMENTS' => 'YES',
35+
'RUN_DOCUMENTATION_COMPILER' => 'YES'
36+
}
37+
3338
s.test_spec do |ts|
3439
ts.source_files = "Tests/#{s.name}Tests/**/*.swift"
3540
ts.resources = "Tests/#{s.name}Tests/**/*.json"

Helpers/DynamicCodableKit.podspec

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,10 @@ Pod::Spec.new do |s|
2929
s.osx.deployment_target = '10.10'
3030

3131
s.vendored_frameworks = "#{s.name}.xcframework"
32+
# @todo: Enable when CocoaPods starts supporting docc
33+
# s.source_files = "#{s.name}.docc"
34+
# s.pod_target_xcconfig = {
35+
# 'CLANG_WARN_DOCUMENTATION_COMMENTS' => 'YES',
36+
# 'RUN_DOCUMENTATION_COMPILER' => 'YES'
37+
# }
3238
end

Scripts/archive.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ xcframeworkGlobberer.on(
4848
const output = fs.createWriteStream(`${archiveName}.xcframework.zip`);
4949
const archive = archiver('zip');
5050
archive.directory(m.absolute, xcframework);
51+
archive.directory(`Sources/${name}/${name}.docc`, `${name}.docc`);
5152
archive.file('package.json');
5253
archive.file('LICENSE');
5354
archive.file(`Helpers/${name}.podspec`, { name: `${name}.podspec` });

Scripts/build-doc.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
const fs = require('node:fs');
33
const path = require('node:path');
44
const process = require('node:process');
5-
const semver = require('semver');
65
const archiver = require('archiver');
76
const readdirGlob = require('readdir-glob');
87
const { execSync } = require('node:child_process');

package-lock.json

Lines changed: 1 addition & 53 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@
2020
"archiver": "^5.3.1",
2121
"conventional-changelog-conventionalcommits": "^4.6.3",
2222
"open": "^8.4.0",
23-
"plist": "^3.0.5",
24-
"semver": "^7.3.7"
23+
"plist": "^3.0.5"
2524
},
2625
"scripts": {
2726
"build": "Scripts/build.js",

0 commit comments

Comments
 (0)