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

bump up mixpanel version to 7.0.1 #38

Merged
merged 3 commits into from
Sep 30, 2022
Merged
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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
Version 3.2.3 (30th September, 2022)
==================================
*(Supports Mixpanel 7.0.1)*

* Bumps Mixpanel version to 7.0.1

Version 3.2.2 (14th June, 2022)
==================================
*(Supports Mixpanel 5.8.7)*
Expand Down
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,14 @@ android {
}

dependencies {
testImplementation project(path: ':')
repositories {
mavenCentral()
google()
}

api 'com.segment.analytics.android:analytics:4.10.4'
api 'com.mixpanel.android:mixpanel-android:5.8.7'
api 'com.mixpanel.android:mixpanel-android:7.0.1'

testImplementation 'com.segment.analytics.android:analytics-tests:4.3.1'
testImplementation 'junit:junit:4.13.2'
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GROUP=com.segment.analytics.android.integrations

VERSION=3.2.3-SNAPSHOT
VERSION=3.2.4-SNAPSHOT

POM_ARTIFACT_ID=mixpanel
POM_PACKAGING=aar
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public Integration<?> create(ValueMap settings, Analytics analytics) {
Set<String> superProperties = getStringSet(settings, "superProperties");

Logger logger = analytics.logger(MIXPANEL_KEY);
MixpanelAPI mixpanel = MixpanelAPI.getInstance(analytics.getApplication(), token);
MixpanelAPI mixpanel = MixpanelAPI.getInstance(analytics.getApplication(), token, false);
logger.verbose("MixpanelAPI.getInstance(context, %s);", token);

MixpanelAPI.People people;
Expand Down Expand Up @@ -158,7 +158,7 @@ public void onActivityCreated(Activity activity, Bundle savedInstanceState) {
// This is needed to trigger a call to #checkIntentForInboundAppLink.
// From Mixpanel's source, this won't trigger a creation of another instance. It caches
// instances by the application context and token, both of which remain the same.
MixpanelAPI.getInstance(activity, token);
MixpanelAPI.getInstance(activity, token, false);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
initMocks(this);
mockStatic(MixpanelAPI.class);
Logger logger = Logger.with(Analytics.LogLevel.DEBUG);
when(MixpanelAPI.getInstance(context, "foo")).thenReturn(mixpanel);
when(MixpanelAPI.getInstance(context, "foo", false)).thenReturn(mixpanel);
when(mixpanel.getPeople()).thenReturn(mixpanelPeople);
when(analytics.logger("Mixpanel")).thenReturn(logger);
when(analytics.getApplication()).thenReturn(context);
Expand All @@ -89,7 +89,7 @@
MixpanelIntegration integration =
(MixpanelIntegration) MixpanelIntegration.FACTORY.create(settings, analytics);

MixpanelAPI.getInstance(context, "foo");
MixpanelAPI.getInstance(context, "foo", false);
verify(mixpanel, never()).getPeople();

assertThat(integration.token).isEqualTo("foo");
Expand All @@ -111,7 +111,7 @@
MixpanelIntegration integration =
(MixpanelIntegration) MixpanelIntegration.FACTORY.create(settings, analytics);

MixpanelAPI.getInstance(context, "foo");
MixpanelAPI.getInstance(context, "foo", false);
verify(mixpanel).getPeople();
assertThat(integration.token).isEqualTo("foo");
assertThat(integration.trackAllPages).isTrue();
Expand All @@ -126,7 +126,7 @@
Activity activity = mock(Activity.class);
Bundle bundle = mock(Bundle.class);
integration.onActivityCreated(activity, bundle);
MixpanelAPI.getInstance(activity, "foo");
MixpanelAPI.getInstance(activity, "foo", false);
verifyNoMoreInteractions(mixpanel);
}

Expand Down