Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: import com.segment.analytics.Properties in generated Android clients [SCH-1670] #58

Merged
merged 6 commits into from
Mar 18, 2020

Conversation

colinking
Copy link
Contributor

@colinking colinking commented Mar 7, 2019

Our Android example application stores Typewriter generated files at com.segment.analytics, which concealed a bug in #57 where com.segment.analytics.Properties (from analytics-android) was not being imported.

This PR:

  • Moves the generated Typewriter client in the Android example app to com.segment.generated.
  • Adds com.segment.analytics.Properties as an import in generated files.
  • Switches List<Object> for List<Properties, since Objects would otherwise just be .toString-ed when the event is fired
  • Fixes serialization for List<T> by casting to List<Properties>

@colinking colinking changed the title fix: import com.segment.analytics.Properties in generated Android clients fix: import com.segment.analytics.Properties in generated Android clients [SCH-1670] Mar 7, 2019
@tyronen
Copy link

tyronen commented Jun 5, 2019

Hi I was looking into using gen-android in a project, but this bug is a blocker - without this PR, the generated code does not compile.

The docs also don't mention that the --trackingPlan argument is required.

@colinking
Copy link
Contributor Author

Thanks for the +1 @tyronen! We're personally focused on shipping Typewriter v7 (#59) which'll include a fix for this, along with a set of regression tests for this kind of issue.

We don't yet have an Android client ready in that pre-release (it'll be available soon), but always open to any feedback you have on the current Android client!

@colinking colinking changed the base branch from master to v6 March 18, 2020 22:43
@colinking colinking marked this pull request as ready for review March 18, 2020 22:54
@colinking colinking merged commit 0f27886 into v6 Mar 18, 2020
@colinking colinking deleted the colin/typewriter-fixes branch March 18, 2020 22:55
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants