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

How to point to local copies of each SDK for development #15

Closed
wants to merge 3 commits into from
Closed
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
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down
17 changes: 17 additions & 0 deletions android/settings.gradle
Original file line number Diff line number Diff line change
@@ -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")
}
}
}
2 changes: 2 additions & 0 deletions example/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Loading