diff --git a/android/build.gradle b/android/build.gradle index 940c151..7ad6770 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -8,7 +8,7 @@ buildscript { } dependencies { - classpath "com.android.tools.build:gradle:7.2.1" + classpath "com.android.tools.build:gradle:7.3.1" // noinspection DifferentKotlinGradleVersion classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } diff --git a/android/settings.gradle b/android/settings.gradle new file mode 100644 index 0000000..a4ab4ea --- /dev/null +++ b/android/settings.gradle @@ -0,0 +1,17 @@ +// Substitute the jitpack SDK dependency for your local instance of the project +def useInternal = false +def sdkDirectory = useInternal ? new File('../../klaviyo-android-sdk-internal/') : new File('../../klaviyo-android-sdk/') +def allowComposite = true //Flag to disable composite build and use jitpack SDK version + +if (allowComposite && sdkDirectory.exists()) { + includeBuild(sdkDirectory) { + dependencySubstitution { + // substitute remote dependency with local module + substitute module("com.github.klaviyo.klaviyo-android-sdk:core") using project(":sdk:core") + + substitute module("com.github.klaviyo.klaviyo-android-sdk:analytics") using project(":sdk:analytics") + + substitute module("com.github.klaviyo.klaviyo-android-sdk:push-fcm") using project(":sdk:push-fcm") + } + } +} diff --git a/example/ios/Podfile b/example/ios/Podfile index 85aff57..50e0a8a 100644 --- a/example/ios/Podfile +++ b/example/ios/Podfile @@ -44,6 +44,8 @@ target 'KlaviyoReactNativeSdkExample' do # Pods for testing end + pod 'KlaviyoSwift', :path => '../../../klaviyo-swift-sdk/' + post_install do |installer| # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202 react_native_post_install(