Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move from CocoaPod to SPM #9

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
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
File renamed without changes.
25 changes: 25 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// swift-tools-version:5.5
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we specify the test target in here?

name: "Swash",
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(
name: "Swash",
targets: ["Swash"]),
],
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages this package depends on.
.target(
name: "Swash",
dependencies: [])
]
)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
22 changes: 0 additions & 22 deletions Swash.podspec

This file was deleted.

60 changes: 33 additions & 27 deletions Swash.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@
224BAC75224FF65300316608 /* Swash.h in Headers */ = {isa = PBXBuildFile; fileRef = 224BAC06224F41F100316608 /* Swash.h */; settings = {ATTRIBUTES = (Public, ); }; };
224BAC76224FF65400316608 /* Swash.h in Headers */ = {isa = PBXBuildFile; fileRef = 224BAC06224F41F100316608 /* Swash.h */; settings = {ATTRIBUTES = (Public, ); }; };
22886BA8242C6E1C009871B7 /* CascadingFontProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = 22886BA7242C6E1C009871B7 /* CascadingFontProperties.swift */; };
22886BA9242C6E1C009871B7 /* CascadingFontProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = 22886BA7242C6E1C009871B7 /* CascadingFontProperties.swift */; };
22886BAA242C6E1C009871B7 /* CascadingFontProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = 22886BA7242C6E1C009871B7 /* CascadingFontProperties.swift */; };
22886BAB242C6E1C009871B7 /* CascadingFontProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = 22886BA7242C6E1C009871B7 /* CascadingFontProperties.swift */; };
22886BAC242C6E1C009871B7 /* CascadingFontProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = 22886BA7242C6E1C009871B7 /* CascadingFontProperties.swift */; };
/* End PBXBuildFile section */

Expand Down Expand Up @@ -78,11 +76,11 @@
224BAC42224FF35300316608 /* Swash.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Swash.framework; sourceTree = BUILT_PRODUCTS_DIR; };
224BAC4A224FF35400316608 /* Swash tvOS Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Swash tvOS Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
224BAC67224FF62200316608 /* Swash.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Swash.framework; sourceTree = BUILT_PRODUCTS_DIR; };
224BAC78224FF84600316608 /* Swash.podspec */ = {isa = PBXFileReference; lastKnownFileType = text; path = Swash.podspec; sourceTree = "<group>"; };
224BAC79224FF85D00316608 /* LICENSE */ = {isa = PBXFileReference; lastKnownFileType = text; path = LICENSE; sourceTree = "<group>"; };
224BAC98224FFE7400316608 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
224BAC99224FFEB900316608 /* CHANGELOG.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = CHANGELOG.md; sourceTree = "<group>"; };
22886BA7242C6E1C009871B7 /* CascadingFontProperties.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CascadingFontProperties.swift; sourceTree = "<group>"; };
CB8EBC112798670600CFBB98 /* Package.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Package.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -130,7 +128,7 @@
isa = PBXGroup;
children = (
224BAC77224FF82C00316608 /* Deployment */,
224BAC05224F41F100316608 /* Source */,
224BAC05224F41F100316608 /* Sources */,
224BAC34224F44AE00316608 /* Tests */,
224BAC04224F41F100316608 /* Products */,
);
Expand All @@ -148,17 +146,12 @@
name = Products;
sourceTree = "<group>";
};
224BAC05224F41F100316608 /* Source */ = {
224BAC05224F41F100316608 /* Sources */ = {
isa = PBXGroup;
children = (
224BAC2C224F443700316608 /* Font.swift */,
224BAC2A224F443700316608 /* SystemFont.swift */,
22886BA7242C6E1C009871B7 /* CascadingFontProperties.swift */,
224BAC2B224F443700316608 /* Utils.swift */,
224BAC20224F43F200316608 /* Default Sizes */,
224BAC33224F444B00316608 /* Supporting Files */,
CB8EBC102798665400CFBB98 /* Swash */,
);
path = Source;
path = Sources;
sourceTree = "<group>";
};
224BAC20224F43F200316608 /* Default Sizes */ = {
Expand All @@ -175,7 +168,6 @@
isa = PBXGroup;
children = (
224BAC06224F41F100316608 /* Swash.h */,
224BAC07224F41F100316608 /* Info.plist */,
);
path = "Supporting Files";
sourceTree = "<group>";
Expand All @@ -194,14 +186,28 @@
224BAC77224FF82C00316608 /* Deployment */ = {
isa = PBXGroup;
children = (
CB8EBC112798670600CFBB98 /* Package.swift */,
224BAC98224FFE7400316608 /* README.md */,
224BAC99224FFEB900316608 /* CHANGELOG.md */,
224BAC78224FF84600316608 /* Swash.podspec */,
224BAC79224FF85D00316608 /* LICENSE */,
224BAC07224F41F100316608 /* Info.plist */,
);
name = Deployment;
sourceTree = "<group>";
};
CB8EBC102798665400CFBB98 /* Swash */ = {
isa = PBXGroup;
children = (
224BAC2C224F443700316608 /* Font.swift */,
224BAC2A224F443700316608 /* SystemFont.swift */,
22886BA7242C6E1C009871B7 /* CascadingFontProperties.swift */,
224BAC2B224F443700316608 /* Utils.swift */,
224BAC20224F43F200316608 /* Default Sizes */,
224BAC33224F444B00316608 /* Supporting Files */,
);
path = Swash;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXHeadersBuildPhase section */
Expand Down Expand Up @@ -329,7 +335,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1020;
LastUpgradeCheck = 1020;
LastUpgradeCheck = 1320;
ORGANIZATIONNAME = Mindgrub;
TargetAttributes = {
224BAC02224F41F100316608 = {
Expand Down Expand Up @@ -430,7 +436,6 @@
buildActionMask = 2147483647;
files = (
224BAC3C224F459500316608 /* TestFonts.swift in Sources */,
22886BA9242C6E1C009871B7 /* CascadingFontProperties.swift in Sources */,
224BAC39224F44AE00316608 /* CustomFontTests.swift in Sources */,
224BAC38224F44AE00316608 /* SystemFontTests.swift in Sources */,
);
Expand All @@ -455,7 +460,6 @@
buildActionMask = 2147483647;
files = (
224BAC5F224FF4B500316608 /* TestFonts.swift in Sources */,
22886BAB242C6E1C009871B7 /* CascadingFontProperties.swift in Sources */,
224BAC61224FF4B500316608 /* CustomFontTests.swift in Sources */,
224BAC60224FF4B500316608 /* SystemFontTests.swift in Sources */,
);
Expand Down Expand Up @@ -517,6 +521,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
Expand Down Expand Up @@ -582,6 +587,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
Expand Down Expand Up @@ -626,9 +632,9 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "Source/Supporting Files/Info.plist";
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.2;
IPHONEOS_DEPLOYMENT_TARGET = 12.2;
Copy link
Contributor

Choose a reason for hiding this comment

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

Was upping the minimum version necessary for SPM support?

LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -655,9 +661,9 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "Source/Supporting Files/Info.plist";
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.2;
IPHONEOS_DEPLOYMENT_TARGET = 12.2;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -718,7 +724,7 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "Source/Supporting Files/Info.plist";
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -732,7 +738,7 @@
SKIP_INSTALL = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 9.0;
TVOS_DEPLOYMENT_TARGET = 12.2;
};
name = Debug;
};
Expand All @@ -746,7 +752,7 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "Source/Supporting Files/Info.plist";
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -760,7 +766,7 @@
SKIP_INSTALL = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 9.0;
TVOS_DEPLOYMENT_TARGET = 12.2;
};
name = Release;
};
Expand Down Expand Up @@ -814,7 +820,7 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "Source/Supporting Files/Info.plist";
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand Down Expand Up @@ -842,7 +848,7 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "Source/Supporting Files/Info.plist";
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1020"
LastUpgradeVersion = "1320"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 1 addition & 1 deletion Swash.xcodeproj/xcshareddata/xcschemes/Swash iOS.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1020"
LastUpgradeVersion = "1320"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1020"
LastUpgradeVersion = "1320"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 1 addition & 1 deletion Swash.xcodeproj/xcshareddata/xcschemes/Swash tvOS.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1020"
LastUpgradeVersion = "1320"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1020"
LastUpgradeVersion = "1320"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
10 changes: 0 additions & 10 deletions Swash.xcworkspace/contents.xcworkspacedata

This file was deleted.

8 changes: 0 additions & 8 deletions Swash.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist

This file was deleted.

5 changes: 0 additions & 5 deletions Swash.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings

This file was deleted.

6 changes: 3 additions & 3 deletions Tests/CustomFontTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,17 @@ class CustomFontTests: XCTestCase {
//MARK: - Dynamic Type - Deprecated in iOS 11

func testOfStyle() {
let font = Futura.medium.of(style: .title3)
let font = Futura.medium.of(textStyle: .title3)
Copy link
Contributor

Choose a reason for hiding this comment

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

If we are removing support for < iOS 12, these tests can be deleted along with the deprecated of(style:) function.

XCTAssertEqual(font.fontName, "Futura-Medium")
}

func testOfStyleMax() {
let font = Futura.medium.of(style: .title3, maxSize: 10)
let font = Futura.medium.of(textStyle: .title3, maxSize: 10)
XCTAssertEqual(font.fontName, "Futura-Medium")
}

func testInvalidOfStyle() {
let font = InvalidFont.doesNotExist.of(style: .caption1)
let font = InvalidFont.doesNotExist.of(textStyle: .caption1)
XCTAssertEqual(font.fontName, ".SFUI-Regular")
}

Expand Down