Skip to content
This repository was archived by the owner on Jun 4, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# Nodes with values to reuse in the pipeline.
common_params:
plugins: &common_plugins
- &bash_cache automattic/bash-cache#2.9.0
- &bash_cache automattic/bash-cache#2.10.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New version with the SPM command. Nice!

env: &common_env
IMAGE_ID: xcode-14

steps:
#################
# Build and Test
#################
- label: "🧪 Build and Test"
########################
# Validate Swift Package
########################
- label: "🔬 Validate Swift Package"
key: "test"
command: |
build_and_test_pod
validate_swift_package
env: *common_env
plugins: *common_plugins

Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,5 @@ Pods/
fastlane/README.md
fastlane/report.xml
fastlane/test_output

.swiftpm
103 changes: 23 additions & 80 deletions Example/Example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,86 +3,68 @@
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objectVersion = 52;
objects = {

/* Begin PBXBuildFile section */
46B30DCD2583F63100A25E66 /* KeyboardAnimationsExampleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 46B30DCC2583F63100A25E66 /* KeyboardAnimationsExampleViewController.swift */; };
4AABCD6D2913A5F80014F4BB /* WordPressUI in Frameworks */ = {isa = PBXBuildFile; productRef = 4AABCD6C2913A5F80014F4BB /* WordPressUI */; };
F1C4EBE5218A37D700B8A9F7 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1C4EBE4218A37D700B8A9F7 /* AppDelegate.swift */; };
F1C4EBE7218A37D700B8A9F7 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1C4EBE6218A37D700B8A9F7 /* ViewController.swift */; };
F1C4EBEA218A37D700B8A9F7 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F1C4EBE8218A37D700B8A9F7 /* Main.storyboard */; };
F1C4EBEC218A37D800B8A9F7 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F1C4EBEB218A37D800B8A9F7 /* Assets.xcassets */; };
F1C4EBEF218A37D800B8A9F7 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F1C4EBED218A37D800B8A9F7 /* LaunchScreen.storyboard */; };
F1C4EC20218A386100B8A9F7 /* WordPressUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F1C4EC1A218A385100B8A9F7 /* WordPressUI.framework */; };
F1C61C80218B3E5300F30530 /* WordPressUI.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = F1C4EC1A218A385100B8A9F7 /* WordPressUI.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
F1C4EC19218A385100B8A9F7 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = F1C4EC14218A385100B8A9F7 /* WordPressUI.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = B59DCB5C202B146D00BEBD8A;
remoteInfo = WordPressUI;
};
F1C4EC1B218A385100B8A9F7 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = F1C4EC14218A385100B8A9F7 /* WordPressUI.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = B59DCB65202B146D00BEBD8A;
remoteInfo = WordPressUITests;
};
F1C4EC1D218A385A00B8A9F7 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = F1C4EC14218A385100B8A9F7 /* WordPressUI.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = B59DCB5B202B146D00BEBD8A;
remoteInfo = WordPressUI;
};
/* End PBXContainerItemProxy section */

/* Begin PBXCopyFilesBuildPhase section */
F1C61C7E218B3E4600F30530 /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
F1C61C80218B3E5300F30530 /* WordPressUI.framework in CopyFiles */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
46B30DCC2583F63100A25E66 /* KeyboardAnimationsExampleViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeyboardAnimationsExampleViewController.swift; sourceTree = "<group>"; };
4AABCD6B2913A5C90014F4BB /* WordPressUI-iOS */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = "WordPressUI-iOS"; path = ..; sourceTree = "<group>"; };
F1C4EBE1218A37D700B8A9F7 /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
F1C4EBE4218A37D700B8A9F7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
F1C4EBE6218A37D700B8A9F7 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
F1C4EBE9218A37D700B8A9F7 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
F1C4EBEB218A37D800B8A9F7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
F1C4EBEE218A37D800B8A9F7 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
F1C4EBF0218A37D800B8A9F7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
F1C4EC14218A385100B8A9F7 /* WordPressUI.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = WordPressUI.xcodeproj; path = ../WordPressUI.xcodeproj; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
F1C4EBDE218A37D700B8A9F7 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
F1C4EC20218A386100B8A9F7 /* WordPressUI.framework in Frameworks */,
4AABCD6D2913A5F80014F4BB /* WordPressUI in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
4AABCD6A2913A5C90014F4BB /* Packages */ = {
isa = PBXGroup;
children = (
4AABCD6B2913A5C90014F4BB /* WordPressUI-iOS */,
);
name = Packages;
sourceTree = "<group>";
};
F1C4EBD8218A37D700B8A9F7 = {
isa = PBXGroup;
children = (
4AABCD6A2913A5C90014F4BB /* Packages */,
F1C4EBE3218A37D700B8A9F7 /* Example */,
F1C4EC13218A384300B8A9F7 /* Dependencies */,
F1C4EBE2218A37D700B8A9F7 /* Products */,
F1C4EC1F218A386100B8A9F7 /* Frameworks */,
);
Expand Down Expand Up @@ -110,23 +92,6 @@
path = Example;
sourceTree = "<group>";
};
F1C4EC13218A384300B8A9F7 /* Dependencies */ = {
isa = PBXGroup;
children = (
F1C4EC14218A385100B8A9F7 /* WordPressUI.xcodeproj */,
);
name = Dependencies;
sourceTree = "<group>";
};
F1C4EC15218A385100B8A9F7 /* Products */ = {
isa = PBXGroup;
children = (
F1C4EC1A218A385100B8A9F7 /* WordPressUI.framework */,
F1C4EC1C218A385100B8A9F7 /* WordPressUITests.xctest */,
);
name = Products;
sourceTree = "<group>";
};
F1C4EC1F218A386100B8A9F7 /* Frameworks */ = {
isa = PBXGroup;
children = (
Expand All @@ -149,9 +114,11 @@
buildRules = (
);
dependencies = (
F1C4EC1E218A385A00B8A9F7 /* PBXTargetDependency */,
);
name = Example;
packageProductDependencies = (
4AABCD6C2913A5F80014F4BB /* WordPressUI */,
);
productName = Example;
productReference = F1C4EBE1218A37D700B8A9F7 /* Example.app */;
productType = "com.apple.product-type.application";
Expand Down Expand Up @@ -182,36 +149,13 @@
mainGroup = F1C4EBD8218A37D700B8A9F7;
productRefGroup = F1C4EBE2218A37D700B8A9F7 /* Products */;
projectDirPath = "";
projectReferences = (
{
ProductGroup = F1C4EC15218A385100B8A9F7 /* Products */;
ProjectRef = F1C4EC14218A385100B8A9F7 /* WordPressUI.xcodeproj */;
},
);
projectRoot = "";
targets = (
F1C4EBE0218A37D700B8A9F7 /* Example */,
);
};
/* End PBXProject section */

/* Begin PBXReferenceProxy section */
F1C4EC1A218A385100B8A9F7 /* WordPressUI.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = WordPressUI.framework;
remoteRef = F1C4EC19218A385100B8A9F7 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
F1C4EC1C218A385100B8A9F7 /* WordPressUITests.xctest */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
path = WordPressUITests.xctest;
remoteRef = F1C4EC1B218A385100B8A9F7 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
/* End PBXReferenceProxy section */

/* Begin PBXResourcesBuildPhase section */
F1C4EBDF218A37D700B8A9F7 /* Resources */ = {
isa = PBXResourcesBuildPhase;
Expand All @@ -238,14 +182,6 @@
};
/* End PBXSourcesBuildPhase section */

/* Begin PBXTargetDependency section */
F1C4EC1E218A385A00B8A9F7 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = WordPressUI;
targetProxy = F1C4EC1D218A385A00B8A9F7 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */

/* Begin PBXVariantGroup section */
F1C4EBE8218A37D700B8A9F7 /* Main.storyboard */ = {
isa = PBXVariantGroup;
Expand Down Expand Up @@ -440,6 +376,13 @@
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */

/* Begin XCSwiftPackageProductDependency section */
4AABCD6C2913A5F80014F4BB /* WordPressUI */ = {
isa = XCSwiftPackageProductDependency;
productName = WordPressUI;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = F1C4EBD9218A37D700B8A9F7 /* Project object */;
}
62 changes: 62 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
// swift-tools-version:5.5

import PackageDescription

let package = Package(
name: "WordPressUI",
platforms: [.iOS(.v11)],
products: [
.library(
name: "WordPressUI",
targets: [
"WordPressUIGravatar",
"WordPressUIGravatarObjC",
"WordPressUIObjCCategories",
"WordPressUI",
]
)
],
dependencies: [],
targets: [
.target(
name: "WordPressUIGravatar",
path: "WordPressUI/Extensions/Gravatar",
sources: ["Gravatar.swift"]
),
.target(
name: "WordPressUIGravatarObjC",
path: "WordPressUI/Extensions/Gravatar",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mokagio The warning about NSString+Gravatar.m not included in any target is a bit strange, as it should be included in this target. But I have a follow up PR to reorganize the folder structure, that warning will go away since the targets will also change.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

exclude: ["Gravatar.swift"],
publicHeadersPath: "."
),
.target(
name: "WordPressUIObjCCategories",
path: "WordPressUI/Categories",
publicHeadersPath: "."
),
.target(
name: "WordPressUI",
dependencies: [
.target(name: "WordPressUIGravatar"),
.target(name: "WordPressUIGravatarObjC"),
.target(name: "WordPressUIObjCCategories"),
],
path: "WordPressUI",
exclude: [
"WordPressUI.h",
"Extensions/Gravatar",
"Categories"
],
resources: [
.process("Resources"),
.process("FancyAlert/FancyAlerts.storyboard")
]
),
.testTarget(
name: "WordPressUITests",
dependencies: [.target(name: "WordPressUI")],
path: "WordPressUITests",
exclude: ["Info.plist"]
),
]
)
4 changes: 4 additions & 0 deletions WordPressUI.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,8 @@ Pod::Spec.new do |s|
]
}
s.header_dir = 'WordPressUI'

s.test_spec do |test|
test.source_files = ['WordPressUITests/**/*.{swift,h,m}']
end
end
Loading