FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add autoUploadSourceContextBuildTypes property by markushi · Pull Request #680 · getsentry/sentry-android-gradle-plugin · GitHub

Repository navigation

Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .kt  (3) .kts  (1) All 2 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ sentry {

includeSourceContext.set(true)
autoUploadSourceContext.set(CI.canAutoUpload())
autoUploadSourceContextBuildTypes.set(setOf("debug", "release"))
additionalSourceDirsForSourceContext.set(setOf("src/custom/java"))

org.set("sentry-sdks")
Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -305,10 +305,9 @@ private fun Variant.configureSourceBundleTasks(
taskSuffix
)

if (variant.buildTypeName == "release") {
if (extension.autoUploadSourceContextBuildTypes.get().contains(variant.buildTypeName)) {
sourceContextTasks.uploadSourceBundleTask.hookWithAssembleTasks(project, variant)
}

return sourceContextTasks
} else {
project.logger.info {
Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ private fun ApplicationVariant.configureSourceBundleTasks(
taskSuffix
)

if (variant.buildTypeName == "release") {
if (extension.autoUploadSourceContextBuildTypes.get().contains(variant.buildTypeName)) {
sourceContextTasks.uploadSourceBundleTask.hookWithAssembleTasks(project, variant)
}

Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,13 @@ abstract class SentryPluginExtension @Inject constructor(project: Project) {
val autoUploadSourceContext: Property<Boolean> = objects
.property(Boolean::class.java).convention(true)

/**
* Which build types should be considered for automatic source context upload.
* Default is "release" only.
*/
val autoUploadSourceContextBuildTypes: SetProperty<String> = objects

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I'm not really sure if we should limit ourselves to build types, should add support for flavors too?

.setProperty(String::class.java).convention(setOf("release"))

/**
* Configure additional directories to be included in the source bundle which is used for
* source context. The directories should be specified relative to the Gradle module/project's
Expand Down

Back | FazBrowse Home | New Git URL