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

Android cli-wizard #316

Closed
Tracked by #2802
smeubank opened this issue Jun 29, 2023 · 4 comments · Fixed by #389
Closed
Tracked by #2802

Android cli-wizard #316

smeubank opened this issue Jun 29, 2023 · 4 comments · Fixed by #389

Comments

@smeubank
Copy link
Member

smeubank commented Jun 29, 2023

Background:

Success rates for developers creating Android projects and sending events, are low in comparison to other platforms. We want to ship a number of improvements to address this and try to help android devs navigate setting up their Android apps with Sentry. This issue will focus on shipping a cli-wizard

Solution Proposal:

At first this wizard is really only intended for setting up Android apps which do not have any Sentry configuration yet, However the wizard should recognize if there is existing config, in the future it may be desirable to update existing. For now we will ignore this complexity.

Goal: Make it exceedingly easy for users to get started with Sentry on Android

brew @sentry/wizard@latest -i android

Login:

  • add a one line wizard command to setup an android application with Sentry SDK and potentially build tool plugins

Install:

  • Wizard would need to have logic to detect (Groovy vs Kotlin)

Configure:

  • Need to detect AndroidManifest.xml to inject needed config options
  • SDK init should include GA top product enabled options (Errors & Performance)

Verify:

  • [nice to have] an error page equivalent to easily allow the user to test the setup

Build tooling:

  • [nice to have +]

Requirements

  • user can run a one liner in their terminal to trigger flow
  • User prompted to login or create account
    • existing get's list of existing projects
    • create back to terminal with created project in list
  • user receives all keys, tokens, and variables required to create releases and upload source maps to sentry
  • user app is injected with a script which run sentry-cli commands with all proper inputs (these could be provided already by bundlers)
  • user receives log statements which simply state what was attempted (succeeded and/or failed), then what they should do next (docs, manual merge, copy/paste, yarn run build)

Reference:

@smeubank smeubank transferred this issue from getsentry/sentry-java Jun 29, 2023
@Lms24
Copy link
Member

Lms24 commented Jun 29, 2023

Just out of curiosity: Do Android developers use npm/npx? Just wondering if executing this command is as seamless for Android devs as for JS/web devs 😅

@smeubank
Copy link
Member Author

Just out of curiosity: Do Android developers use npm/npx? Just wondering if executing this command is as seamless for Android devs as for JS/web devs 😅

we discussed this with mobile folks, and the agreement was that many android devs might have node, but the best approach would probably be to publish to brew and mobile devs install and run from there

@smeubank
Copy link
Member Author

smeubank commented Aug 4, 2023

saving here to not lose

things to check before getting started with this in JS:

  • can we easily modify manifest files in the correct place using JS?
  • can we easily modify gradle config files
  • can we easily modify Java Code

other alternatives that come to mind:

  • allow config from gradle plugin and pass them into the app
  • add init from gradle plugin automatically
  • add a login flow to gradle; could work likes this
  • you add our plugin to your gradle project
  • you then invoke some gradle task ./gradlew sentryLogin that prompts you for credentials and somehow modifies files or at least spits out what to put where

@kahest kahest linked a pull request Aug 11, 2023 that will close this issue
@github-actions
Copy link

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

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

Successfully merging a pull request may close this issue.

4 participants