Skip to content

Commit

Permalink
Merge pull request #38 from segment-integrations/wenxi/bump-up-mixpan…
Browse files Browse the repository at this point in the history
…el-version

bump up mixpanel version to 7.0.1
  • Loading branch information
wenxi-zeng authored Sep 30, 2022
2 parents 974df4b + 2e24df2 commit 77b294f
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 8 deletions.
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

0 comments on commit 77b294f

Please sign in to comment.