Skip to content

Kotlin usage tracking in android builds #5060

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

Closed
1 of 3 tasks
KristianDD opened this issue Oct 8, 2019 · 0 comments · Fixed by #5054
Closed
1 of 3 tasks

Kotlin usage tracking in android builds #5060

KristianDD opened this issue Oct 8, 2019 · 0 comments · Fixed by #5054
Assignees
Milestone

Comments

@KristianDD
Copy link
Contributor

KristianDD commented Oct 8, 2019

Is your feature request related to a problem? Please describe.

We need a way to track if Kontlin integrations is used inside NativeScript projects.

Describe the solution you'd like

Every android build to produce data about Kotlin usage and this data to be tracked if Usage Reporting is enabled.

Describe alternatives you've considered

No alternatives

Additional context

None

Acceptance Criteria

  • 1. If usage reporting is enabled every android build should produce a file with build statistics at platforms/android/analytics/build-statistics.json with content:
{
   "kotlinUsage": {
       "hasUseKotlinPropertyInApp": true,
       "hasKotlinRuntimeClasses": true
   }
}
  • 2. With attached projects the properties in the should be changed.
  • 3. An event with Action: Using Kotlin and label hasUseKotlinPropertyInAppData__true__ hasKotlinRuntimeClassesData__true. The values should be true/false according to the content of the build-statistics.json.

Make sure that usage reporting is enabled - tns usage-reporting enable. The flag --analyticsLogFile could be used for easier verification of the events that are sent.

For testing the properties use the attached project. To have hasUseKotlinPropertyInApp turn to false remove App_Resources/android/gradle.poperties. To have hasKotlinRuntimeClasses turn to false remove the jar file from App_Resources/android/libs. To test the feature use android@next.
kotlinTest.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants