Skip to content

Populate events with dependencies metadata#396

Merged
romtsn merged 13 commits into
mainfrom
feat/dependencies-metadata
Nov 2, 2022
Merged

Populate events with dependencies metadata#396
romtsn merged 13 commits into
mainfrom
feat/dependencies-metadata

Conversation

@romtsn

@romtsn romtsn commented Oct 28, 2022

Copy link
Copy Markdown
Member

📜 Description

  • Adds a new task to collect dependencies and include them into apk/jar as part of assets/resources
  • Some changes to the existing tasks to suppress some warnings and for common output handling

💡 Motivation and Context

Closes #236

💚 How did you test it?

Manually and automated

📝 Checklist

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

🔮 Next steps

@romtsn
romtsn requested a review from markushi as a code owner October 28, 2022 22:17
@romtsn romtsn changed the title Report dependencies metadata task Populate events with dependencies metadata Oct 28, 2022

@markushi markushi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, please check my comments!

Comment thread buildSrc/src/main/java/Dependencies.kt Outdated
Comment thread plugin-build/src/main/kotlin/io/sentry/android/gradle/util/SentryPluginUtils.kt Outdated

@adinauer adinauer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Only gave this a quick review. LGTM just one question regarding the hard coded main source set.

val javaExtension = project.extensions.getByType(JavaPluginExtension::class.java)

val sentryResDir = project.layout.buildDirectory.dir("generated${sep}sentry")
javaExtension.sourceSets.getByName("main").resources { sourceSet ->

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

m Should we also allow for devs to configure the source set they want?
Maybe even support multiple and have listOf("main") as default?
This could be a separate issue as well.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

hmm, but what would be the usecase? All the sourcesets get packaged into the final jar anyway, and that's what we're interested in

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I was thinking about people renaming the source sets because they're following some conventions or have to support some legacy code base where names are different.

@romtsn
romtsn merged commit 2ae060d into main Nov 2, 2022
@romtsn
romtsn deleted the feat/dependencies-metadata branch November 2, 2022 19:29
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.

Send modules along with SentryEvent

3 participants