From dbd829e1c04cb74ffcd416e192d80c9dc1a2a32c Mon Sep 17 00:00:00 2001 From: Sergii Khliustin Date: Tue, 29 Oct 2024 23:45:03 +0100 Subject: [PATCH] Fix tests --- TestTools/Pods.json | 3 + Tests/Recorded/SuperwallKit/BUILD.bazel | 175 ++++++++++++++++++ .../Recorded/ios-voice-processor/BUILD.bazel | 4 +- 3 files changed, 180 insertions(+), 2 deletions(-) create mode 100644 Tests/Recorded/SuperwallKit/BUILD.bazel diff --git a/TestTools/Pods.json b/TestTools/Pods.json index a778bc02..9e47a7c3 100644 --- a/TestTools/Pods.json +++ b/TestTools/Pods.json @@ -690,6 +690,9 @@ "hippy": { "version": "2.14.11" }, + "ios-voice-processor": { + "version": "1.1.2" + }, "leveldb-library": { "version": "1.22.3" }, diff --git a/Tests/Recorded/SuperwallKit/BUILD.bazel b/Tests/Recorded/SuperwallKit/BUILD.bazel new file mode 100644 index 00000000..66331d63 --- /dev/null +++ b/Tests/Recorded/SuperwallKit/BUILD.bazel @@ -0,0 +1,175 @@ +load('@build_bazel_rules_ios//rules:framework.bzl', 'apple_framework') +load('@build_bazel_rules_ios//rules:precompiled_apple_resource_bundle.bzl', 'precompiled_apple_resource_bundle') +# Add a config setting release for compilation mode +# Assume that people are using `opt` for release mode +# see the bazel user manual for more information +# https://docs.bazel.build/versions/master/be/general.html#config_setting +config_setting( + name = "release", + values = { + "compilation_mode": "opt" + } +) +apple_framework( + name = "SuperwallKit", + module_name = "SuperwallKit", + bundle_id = "org.cocoapods.SuperwallKit", + swift_version = "5", + link_dynamic = True, + testonly = False, + infoplists = [ + ":SuperwallKit_InfoPlist" + ], + platforms = { + "ios": "13.0" + }, + srcs = glob( + [ + "Sources/**/*.swift" + ] + ), + deps = [ + ":SuperwallKit_SuperwallKit_Bundle" + ], + objc_defines = [ + "COCOAPODS=1" + ] + select( + { + "//conditions:default": [ + "POD_CONFIGURATION_DEBUG=1", + "DEBUG=1" + ], + ":release": [ + "POD_CONFIGURATION_RELEASE=1" + ] + } + ), + swift_defines = [ + "COCOAPODS" + ] + select( + { + "//conditions:default": [ + "DEBUG" + ] + } + ), + sdk_frameworks = [ + "AVFoundation", + "Combine", + "CoreData", + "CoreTelephony", + "GameController", + "IOKit", + "JavaScriptCore", + "SafariServices", + "StoreKit", + "SwiftUI", + "SystemConfiguration", + "UserNotifications", + "VisionKit", + "WebKit" + ], + visibility = [ + "//visibility:public" + ] +) +precompiled_apple_resource_bundle( + name = "SuperwallKit_SuperwallKit_Bundle", + bundle_id = "org.cocoapods.SuperwallKit", + bundle_name = "SuperwallKit", + infoplists = [ + ":SuperwallKit_SuperwallKit_Bundle_InfoPlist" + ], + resources = glob( + [ + "Sources/SuperwallKit/**/*.cer", + "Sources/SuperwallKit/**/*.xcassets/**", + "Sources/SuperwallKit/**/*.xcdatamodeld/**", + "Sources/SuperwallKit/**/PrivacyInfo.xcprivacy" + ] + ) +) +genrule( + name = "SuperwallKit_InfoPlist", + srcs = [], + outs = [ + "SuperwallKit_InfoPlist.plist" + ], + cmd = """cat < $@ + + + + + CFBundleIdentifier + org.cocoapods.SuperwallKit + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + SuperwallKit + CFBundlePackageType + FMWK + CFBundleShortVersionString + 3.7.0 + CFBundleSignature + ???? + CFBundleSupportedPlatforms + + iPhoneSimulator + iPhoneOS + + CFBundleVersion + 1 + MinimumOSVersion + 13.0 + UIDeviceFamily + + 1 + 2 + + + + +EOF""" +) +genrule( + name = "SuperwallKit_SuperwallKit_Bundle_InfoPlist", + srcs = [], + outs = [ + "SuperwallKit_SuperwallKit_Bundle_InfoPlist.plist" + ], + cmd = """cat < $@ + + + + + CFBundleIdentifier + org.cocoapods.SuperwallKit + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + SuperwallKit + CFBundlePackageType + BNDL + CFBundleShortVersionString + 3.7.0 + CFBundleSignature + ???? + CFBundleSupportedPlatforms + + iPhoneSimulator + iPhoneOS + + CFBundleVersion + 1 + MinimumOSVersion + 13.0 + UIDeviceFamily + + 1 + 2 + + + + +EOF""" +) \ No newline at end of file diff --git a/Tests/Recorded/ios-voice-processor/BUILD.bazel b/Tests/Recorded/ios-voice-processor/BUILD.bazel index 25411526..cf6cd144 100644 --- a/Tests/Recorded/ios-voice-processor/BUILD.bazel +++ b/Tests/Recorded/ios-voice-processor/BUILD.bazel @@ -24,7 +24,7 @@ apple_framework( }, srcs = glob( [ - "VoiceProcessor*.swift" + "src/ios_voice_processor/VoiceProcessor*.swift" ] ), objc_defines = [ @@ -76,7 +76,7 @@ genrule( CFBundlePackageType FMWK CFBundleShortVersionString - 1.1.0 + 1.1.2 CFBundleSignature ???? CFBundleSupportedPlatforms