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

Auto install Sentry integrations for Java Backend, Desktop, etc. #521

Merged
merged 19 commits into from
Jul 19, 2023

Conversation

adinauer
Copy link
Member

@adinauer adinauer commented Jun 29, 2023

📜 Description

Automatically install Sentry Java SDK and integration dependencies.

💡 Motivation and Context

Fixes #503

💚 How did you test it?

📝 Checklist

  • I reviewed the submitted code
  • I added tests to verify the changes
  • I updated the docs if needed
  • No breaking changes

🔮 Next steps

@github-actions
Copy link
Contributor

github-actions bot commented Jun 29, 2023

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 318b12a

@romtsn
Copy link
Member

romtsn commented Jun 29, 2023

looking good from the first skim, needs tests still and the changes I mentioned, but overall great stuff 👍

@adinauer adinauer changed the title Auto install integrations for Java (non Android) Auto install Sentry integrations for Java Backend, Desktop, etc. Jun 30, 2023
@adinauer adinauer marked this pull request as ready for review June 30, 2023 11:00
@adinauer adinauer requested a review from markushi as a code owner June 30, 2023 11:00
@adinauer
Copy link
Member Author

Specified versions by looking at the registry and added some tests.

@adinauer
Copy link
Member Author

adinauer commented Jul 5, 2023

@romtsn wanna give this another pass? Should be good to go now. Just waiting for CI.

Copy link
Member

@romtsn romtsn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, besides a couple of comments.

Also, a very important thing that we have to do - we should switch all of our upstream dependencies (e.g. kotlinx-coroutines-core for sentry-kotlin-extensions) from implementation to compileOnly. Auto-install works just by adding an integration into pom.xml of the upstream dependency, but if we don't make the upstream dependency itself a compileOnly one, this will result in a circular dependency and break some of the community plugins that collect dependencies.

You can check this test for more details (and maybe update it with the new deps that you've introduced in this PR)

@adinauer
Copy link
Member Author

I've opened getsentry/sentry-java#2837 to switch dependencies to compileOnly.

@adinauer
Copy link
Member Author

Added auto install for graphql as we've got some stuff cooking for that. Also added a bunch more tests.

)

val result = runner
.appendArguments("app:build")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this won't actually automatically call collectDependencies task from the plugin, you'd have to do it manually for non-android project, see https://github.com/mikepenz/AboutLibraries/tree/develop#gradle-api

@adinauer
Copy link
Member Author

CI is having issues. Merging anyways.

@adinauer adinauer merged commit ed11239 into main Jul 19, 2023
@adinauer adinauer deleted the feat/java-auto-install branch July 19, 2023 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Auto install Sentry SDK and integrations for Java
2 participants