Publish both static & dynamic libraries

This commit is contained in:
Matt Robinson 2022-12-20 12:59:40 -06:00
parent 31bd74383d
commit 6b041abd6f
2 changed files with 40 additions and 32 deletions

View File

@ -75,11 +75,11 @@
2DAC9E46262FC9FD0062E1A6 /* SuggestionAccountTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2DAC9E45262FC9FD0062E1A6 /* SuggestionAccountTableViewCell.swift */; }; 2DAC9E46262FC9FD0062E1A6 /* SuggestionAccountTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2DAC9E45262FC9FD0062E1A6 /* SuggestionAccountTableViewCell.swift */; };
2DCB73FD2615C13900EC03D4 /* SearchRecommendCollectionHeader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2DCB73FC2615C13900EC03D4 /* SearchRecommendCollectionHeader.swift */; }; 2DCB73FD2615C13900EC03D4 /* SearchRecommendCollectionHeader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2DCB73FC2615C13900EC03D4 /* SearchRecommendCollectionHeader.swift */; };
2DE0FACE2615F7AD00CDF649 /* RecommendAccountSection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2DE0FACD2615F7AD00CDF649 /* RecommendAccountSection.swift */; }; 2DE0FACE2615F7AD00CDF649 /* RecommendAccountSection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2DE0FACD2615F7AD00CDF649 /* RecommendAccountSection.swift */; };
357FEE8729522CA50021C9DC /* MastodonSDK in Frameworks */ = {isa = PBXBuildFile; productRef = 357FEE8629522CA50021C9DC /* MastodonSDK */; }; 357FEEAF29523D470021C9DC /* MastodonSDKDynamic in Frameworks */ = {isa = PBXBuildFile; productRef = 357FEEAE29523D470021C9DC /* MastodonSDKDynamic */; };
357FEE8829522CA50021C9DC /* MastodonSDK in Embed Frameworks */ = {isa = PBXBuildFile; productRef = 357FEE8629522CA50021C9DC /* MastodonSDK */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; 357FEEB029523D470021C9DC /* MastodonSDKDynamic in Embed Frameworks */ = {isa = PBXBuildFile; productRef = 357FEEAE29523D470021C9DC /* MastodonSDKDynamic */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
357FEE8A29522CB60021C9DC /* MastodonSDK in Frameworks */ = {isa = PBXBuildFile; productRef = 357FEE8929522CB60021C9DC /* MastodonSDK */; }; 357FEEB229523D510021C9DC /* MastodonSDKDynamic in Frameworks */ = {isa = PBXBuildFile; productRef = 357FEEB129523D510021C9DC /* MastodonSDKDynamic */; };
357FEE8E29522CC00021C9DC /* MastodonSDK in Frameworks */ = {isa = PBXBuildFile; productRef = 357FEE8D29522CC00021C9DC /* MastodonSDK */; }; 357FEEB629523D5C0021C9DC /* MastodonSDKDynamic in Frameworks */ = {isa = PBXBuildFile; productRef = 357FEEB529523D5C0021C9DC /* MastodonSDKDynamic */; };
357FEE9229522CE60021C9DC /* MastodonSDK in Frameworks */ = {isa = PBXBuildFile; productRef = 357FEE9129522CE60021C9DC /* MastodonSDK */; }; 357FEEBA29523D660021C9DC /* MastodonSDKDynamic in Frameworks */ = {isa = PBXBuildFile; productRef = 357FEEB929523D660021C9DC /* MastodonSDKDynamic */; };
5B24BBDA262DB14800A9381B /* ReportViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B24BBD7262DB14800A9381B /* ReportViewModel.swift */; }; 5B24BBDA262DB14800A9381B /* ReportViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B24BBD7262DB14800A9381B /* ReportViewModel.swift */; };
5B24BBDB262DB14800A9381B /* ReportStatusViewModel+Diffable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B24BBD8262DB14800A9381B /* ReportStatusViewModel+Diffable.swift */; }; 5B24BBDB262DB14800A9381B /* ReportStatusViewModel+Diffable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B24BBD8262DB14800A9381B /* ReportStatusViewModel+Diffable.swift */; };
5B90C45E262599800002E742 /* SettingsViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B90C456262599800002E742 /* SettingsViewModel.swift */; }; 5B90C45E262599800002E742 /* SettingsViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B90C456262599800002E742 /* SettingsViewModel.swift */; };
@ -493,7 +493,7 @@
dstPath = ""; dstPath = "";
dstSubfolderSpec = 10; dstSubfolderSpec = 10;
files = ( files = (
357FEE8829522CA50021C9DC /* MastodonSDK in Embed Frameworks */, 357FEEB029523D470021C9DC /* MastodonSDKDynamic in Embed Frameworks */,
); );
name = "Embed Frameworks"; name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
@ -1087,7 +1087,7 @@
isa = PBXFrameworksBuildPhase; isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
357FEE8729522CA50021C9DC /* MastodonSDK in Frameworks */, 357FEEAF29523D470021C9DC /* MastodonSDKDynamic in Frameworks */,
DBF96326262EC0A6001D8D25 /* AuthenticationServices.framework in Frameworks */, DBF96326262EC0A6001D8D25 /* AuthenticationServices.framework in Frameworks */,
87FFDA5D898A5C42ADCB35E7 /* Pods_Mastodon.framework in Frameworks */, 87FFDA5D898A5C42ADCB35E7 /* Pods_Mastodon.framework in Frameworks */,
); );
@ -1114,7 +1114,7 @@
isa = PBXFrameworksBuildPhase; isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
357FEE9229522CE60021C9DC /* MastodonSDK in Frameworks */, 357FEEBA29523D660021C9DC /* MastodonSDKDynamic in Frameworks */,
DB8FABC726AEC7B2008E5AF4 /* Intents.framework in Frameworks */, DB8FABC726AEC7B2008E5AF4 /* Intents.framework in Frameworks */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
@ -1123,7 +1123,7 @@
isa = PBXFrameworksBuildPhase; isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
357FEE8E29522CC00021C9DC /* MastodonSDK in Frameworks */, 357FEEB629523D5C0021C9DC /* MastodonSDKDynamic in Frameworks */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
@ -1131,7 +1131,7 @@
isa = PBXFrameworksBuildPhase; isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
357FEE8A29522CB60021C9DC /* MastodonSDK in Frameworks */, 357FEEB229523D510021C9DC /* MastodonSDKDynamic in Frameworks */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
@ -2757,7 +2757,7 @@
); );
name = Mastodon; name = Mastodon;
packageProductDependencies = ( packageProductDependencies = (
357FEE8629522CA50021C9DC /* MastodonSDK */, 357FEEAE29523D470021C9DC /* MastodonSDKDynamic */,
); );
productName = Mastodon; productName = Mastodon;
productReference = DB427DD225BAA00100D1B89D /* Mastodon.app */; productReference = DB427DD225BAA00100D1B89D /* Mastodon.app */;
@ -2816,7 +2816,7 @@
); );
name = MastodonIntent; name = MastodonIntent;
packageProductDependencies = ( packageProductDependencies = (
357FEE9129522CE60021C9DC /* MastodonSDK */, 357FEEB929523D660021C9DC /* MastodonSDKDynamic */,
); );
productName = MastodonIntent; productName = MastodonIntent;
productReference = DB8FABC626AEC7B2008E5AF4 /* MastodonIntent.appex */; productReference = DB8FABC626AEC7B2008E5AF4 /* MastodonIntent.appex */;
@ -2836,7 +2836,7 @@
); );
name = ShareActionExtension; name = ShareActionExtension;
packageProductDependencies = ( packageProductDependencies = (
357FEE8D29522CC00021C9DC /* MastodonSDK */, 357FEEB529523D5C0021C9DC /* MastodonSDKDynamic */,
); );
productName = ShareActionExtension; productName = ShareActionExtension;
productReference = DBC6461226A170AB00B0E31B /* ShareActionExtension.appex */; productReference = DBC6461226A170AB00B0E31B /* ShareActionExtension.appex */;
@ -2856,7 +2856,7 @@
); );
name = NotificationService; name = NotificationService;
packageProductDependencies = ( packageProductDependencies = (
357FEE8929522CB60021C9DC /* MastodonSDK */, 357FEEB129523D510021C9DC /* MastodonSDKDynamic */,
); );
productName = NotificationService; productName = NotificationService;
productReference = DBF8AE13263293E400C9C23C /* NotificationService.appex */; productReference = DBF8AE13263293E400C9C23C /* NotificationService.appex */;
@ -4644,21 +4644,21 @@
/* End XCConfigurationList section */ /* End XCConfigurationList section */
/* Begin XCSwiftPackageProductDependency section */ /* Begin XCSwiftPackageProductDependency section */
357FEE8629522CA50021C9DC /* MastodonSDK */ = { 357FEEAE29523D470021C9DC /* MastodonSDKDynamic */ = {
isa = XCSwiftPackageProductDependency; isa = XCSwiftPackageProductDependency;
productName = MastodonSDK; productName = MastodonSDKDynamic;
}; };
357FEE8929522CB60021C9DC /* MastodonSDK */ = { 357FEEB129523D510021C9DC /* MastodonSDKDynamic */ = {
isa = XCSwiftPackageProductDependency; isa = XCSwiftPackageProductDependency;
productName = MastodonSDK; productName = MastodonSDKDynamic;
}; };
357FEE8D29522CC00021C9DC /* MastodonSDK */ = { 357FEEB529523D5C0021C9DC /* MastodonSDKDynamic */ = {
isa = XCSwiftPackageProductDependency; isa = XCSwiftPackageProductDependency;
productName = MastodonSDK; productName = MastodonSDKDynamic;
}; };
357FEE9129522CE60021C9DC /* MastodonSDK */ = { 357FEEB929523D660021C9DC /* MastodonSDKDynamic */ = {
isa = XCSwiftPackageProductDependency; isa = XCSwiftPackageProductDependency;
productName = MastodonSDK; productName = MastodonSDKDynamic;
}; };
/* End XCSwiftPackageProductDependency section */ /* End XCSwiftPackageProductDependency section */
}; };

View File

@ -3,6 +3,17 @@
import PackageDescription import PackageDescription
let publicLibraryTargets = [
"CoreDataStack",
"MastodonAsset",
"MastodonCommon",
"MastodonCore",
"MastodonExtension",
"MastodonLocalization",
"MastodonSDK",
"MastodonUI",
]
let package = Package( let package = Package(
name: "MastodonSDK", name: "MastodonSDK",
defaultLocalization: "en", defaultLocalization: "en",
@ -10,19 +21,16 @@ let package = Package(
.iOS(.v14), .iOS(.v14),
], ],
products: [ products: [
// Static Library
.library( .library(
name: "MastodonSDK", name: "MastodonSDK",
targets: publicLibraryTargets
),
// Dynamic Library
.library(
name: "MastodonSDKDynamic",
type: .dynamic, type: .dynamic,
targets: [ targets: publicLibraryTargets
"CoreDataStack",
"MastodonAsset",
"MastodonCommon",
"MastodonCore",
"MastodonExtension",
"MastodonLocalization",
"MastodonSDK",
"MastodonUI",
]
) )
], ],
dependencies: [ dependencies: [