diff --git a/Gemfile b/Gemfile index dbf0560fa7..4c239945ec 100644 --- a/Gemfile +++ b/Gemfile @@ -2,4 +2,6 @@ source "https://rubygems.org" gem 'fastlane' gem 'cocoapods' -gem 'jazzy' \ No newline at end of file +gem 'jazzy' +plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile') +eval_gemfile(plugins_path) if File.exist?(plugins_path) diff --git a/Gemfile.lock b/Gemfile.lock index 5aadacbde7..3db3d54d36 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -109,6 +109,7 @@ GEM xcodeproj (>= 1.8.1, < 2.0.0) xcpretty (~> 0.3.0) xcpretty-travis-formatter (>= 0.0.3) + fastlane-plugin-create_xcframework (1.0.0) ffi (1.12.2) fourflusher (2.3.1) fuzzy_match (2.0.4) @@ -231,6 +232,7 @@ PLATFORMS DEPENDENCIES cocoapods fastlane + fastlane-plugin-create_xcframework jazzy BUNDLED WITH diff --git a/bin/build_xcframework.sh b/bin/build_xcframework.sh deleted file mode 100644 index 54a689d634..0000000000 --- a/bin/build_xcframework.sh +++ /dev/null @@ -1,22 +0,0 @@ -mkdir builds -mkdir builds/xcframeworks - -xcodebuild -create-xcframework \ - -framework ./builds/archives/appletvsimulator.xcarchive/Products/Library/Frameworks/Purchases.framework \ - -framework ./builds/archives/watchos.xcarchive/Products/Library/Frameworks/Purchases.framework \ - -framework ./builds/archives/watchsimulator.xcarchive/Products/Library/Frameworks/Purchases.framework \ - -framework ./builds/archives/iphoneos.xcarchive/Products/Library/Frameworks/Purchases.framework \ - -framework ./builds/archives/appletvos.xcarchive/Products/Library/Frameworks/Purchases.framework \ - -framework ./builds/archives/iphonesimulator.xcarchive/Products/Library/Frameworks/Purchases.framework \ - -framework ./builds/archives/macosx.xcarchive/Products/Library/Frameworks/Purchases.framework \ - -output ./builds/xcframeworks/Purchases.xcframework - -xcodebuild -create-xcframework \ - -framework ./builds/archives/appletvsimulator.xcarchive/Products/Library/Frameworks/PurchasesCoreSwift.framework \ - -framework ./builds/archives/watchos.xcarchive/Products/Library/Frameworks/PurchasesCoreSwift.framework \ - -framework ./builds/archives/watchsimulator.xcarchive/Products/Library/Frameworks/PurchasesCoreSwift.framework \ - -framework ./builds/archives/iphoneos.xcarchive/Products/Library/Frameworks/PurchasesCoreSwift.framework \ - -framework ./builds/archives/appletvos.xcarchive/Products/Library/Frameworks/PurchasesCoreSwift.framework \ - -framework ./builds/archives/iphonesimulator.xcarchive/Products/Library/Frameworks/PurchasesCoreSwift.framework \ - -framework ./builds/archives/macosx.xcarchive/Products/Library/Frameworks/PurchasesCoreSwift.framework \ - -output ./builds/xcframeworks/PurchasesCoreSwift.xcframework diff --git a/fastlane/Fastfile b/fastlane/Fastfile index b06816a5c3..5cc17993b2 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -83,19 +83,24 @@ platform :ios do desc "Make build" lane :make_build do |options| platforms = [ - "appletvos", - "appletvsimulator", - "watchos", - "watchsimulator", - "iphoneos", - "appletvos", - "iphonesimulator", - "macosx" - ] - for platform in platforms do - gym(archive_path: "./builds/archives/" + platform, - sdk: platform) - end + 'iOS', + 'macOS', + 'tvOS', + 'watchOS' + ] + output_directory = './builds/xcframeworks' + + create_xcframework( + destinations: platforms, + scheme: 'PurchasesCoreSwift', + xcframework_output_directory: output_directory + ) + + create_xcframework( + destinations: platforms, + scheme: 'Purchases', + xcframework_output_directory: output_directory + ) end end diff --git a/fastlane/Pluginfile b/fastlane/Pluginfile new file mode 100644 index 0000000000..35e331872e --- /dev/null +++ b/fastlane/Pluginfile @@ -0,0 +1,5 @@ +# Autogenerated by fastlane +# +# Ensure this file is checked in to source control! + +gem 'fastlane-plugin-create_xcframework'