Skip to content

Commit 75d16bb

Browse files
authored
Merge branch 'main' into lcian/feat/mdc-logs
2 parents b0b0103 + e881bae commit 75d16bb

File tree

26 files changed

+631
-53
lines changed

26 files changed

+631
-53
lines changed

.craft.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ targets:
3434
maven:io.sentry:sentry-apache-http-client-5:
3535
maven:io.sentry:sentry-android:
3636
maven:io.sentry:sentry-android-core:
37+
maven:io.sentry:sentry-android-distribution:
3738
maven:io.sentry:sentry-android-ndk:
3839
maven:io.sentry:sentry-android-timber:
3940
maven:io.sentry:sentry-kotlin-extensions:

.github/workflows/codeql-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
3737

3838
- name: Initialize CodeQL
39-
uses: github/codeql-action/init@64d10c13136e1c5bce3e5fbde8d4906eeaafc885 # pin@v2
39+
uses: github/codeql-action/init@f443b600d91635bebf5b0d9ebc620189c0d6fba5 # pin@v2
4040
with:
4141
languages: 'java'
4242

@@ -45,4 +45,4 @@ jobs:
4545
./gradlew buildForCodeQL --no-build-cache
4646
4747
- name: Perform CodeQL Analysis
48-
uses: github/codeql-action/analyze@64d10c13136e1c5bce3e5fbde8d4906eeaafc885 # pin@v2
48+
uses: github/codeql-action/analyze@f443b600d91635bebf5b0d9ebc620189c0d6fba5 # pin@v2

.github/workflows/danger.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@ on:
66

77
jobs:
88
danger:
9-
uses: getsentry/github-workflows/.github/workflows/danger.yml@v2
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: getsentry/github-workflows/danger@v3

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@
1010
- Only properties with keys matching the configured `contextTags` are sent as log attributes.
1111
- You can configure which properties are sent using `options.setContextTags` if initalizing manually, or by specifying a comma-separated list of keys with a `context-tags` entry in `sentry.properties` or `sentry.contex-tags` in `application.properties`.
1212
- Note that keys containing spaces are not supported.
13+
- Add experimental Sentry Android Distribution module for integrating with Sentry Build Distribution to check for and install updates ([#4804](https://github.com/getsentry/sentry-java/pull/4804))
1314

1415
### Fixes
1516

1617
- Use logger from options for JVM profiler ([#4771](https://github.com/getsentry/sentry-java/pull/4771))
18+
- Session Replay: Avoid deadlock when pausing replay if no connection ([#4788](https://github.com/getsentry/sentry-java/pull/4788))
1719

1820
### Miscellaneous
1921

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Sentry SDK for Java and Android
2020
|-----------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| ------- |
2121
| sentry-android | [![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-android/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-android) | 21 |
2222
| sentry-android-core | [![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-android-core/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-android-core) | 21 |
23+
| sentry-android-distribution | [![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-android-distribution/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-android-distribution) | 21 |
2324
| sentry-android-ndk | [![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-android-ndk/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-android-ndk) | 21 |
2425
| sentry-android-timber | [![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-android-timber/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-android-timber) | 21 |
2526
| sentry-android-fragment | [![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-android-fragment/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-android-fragment) | 21 |

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ subprojects {
161161
}
162162
}
163163

164-
if (!this.name.contains("sample") && !this.name.contains("integration-tests") && this.name != "sentry-system-test-support" && this.name != "sentry-test-support" && this.name != "sentry-android-distribution") {
164+
if (!this.name.contains("sample") && !this.name.contains("integration-tests") && this.name != "sentry-system-test-support" && this.name != "sentry-test-support") {
165165
apply<DistributionPlugin>()
166166
apply<com.vanniktech.maven.publish.MavenPublishPlugin>()
167167

gradle/libs.versions.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ compileSdk = "34"
3838
minSdk = "21"
3939
spotless = "7.0.4"
4040
gummyBears = "0.12.0"
41+
camerax = "1.3.0"
4142

4243
[plugins]
4344
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
@@ -200,6 +201,13 @@ androidx-test-runner = { module = "androidx.test:runner", version = "1.6.2" }
200201
awaitility-kotlin = { module = "org.awaitility:awaitility-kotlin", version = "4.1.1" }
201202
awaitility-kotlin-spring7 = { module = "org.awaitility:awaitility-kotlin", version = "4.3.0" }
202203
awaitility3-kotlin = { module = "org.awaitility:awaitility-kotlin", version = "3.1.6" }
204+
205+
# CameraX dependencies
206+
camerax-core = { module = "androidx.camera:camera-core", version.ref = "camerax" }
207+
camerax-camera2 = { module = "androidx.camera:camera-camera2", version.ref = "camerax" }
208+
camerax-lifecycle = { module = "androidx.camera:camera-lifecycle", version.ref = "camerax" }
209+
camerax-view = { module = "androidx.camera:camera-view", version.ref = "camerax" }
210+
203211
hsqldb = { module = "org.hsqldb:hsqldb", version = "2.6.1" }
204212
javafaker = { module = "com.github.javafaker:javafaker", version = "1.0.2" }
205213
kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "coroutines" }
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# sentry-android-distribution
2+
3+
This module contains the client library for the Sentry Android Build Distribution that checks for updates for your application automatically for internal testing purposes.

sentry-android-distribution/src/main/java/io/sentry/android/distribution/DistributionHttpClient.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ internal class DistributionHttpClient(private val options: SentryOptions) {
2626
val platform: String = "android",
2727
val versionCode: Long,
2828
val versionName: String,
29+
val buildConfiguration: String,
2930
)
3031

3132
/**
@@ -56,9 +57,12 @@ internal class DistributionHttpClient(private val options: SentryOptions) {
5657
append("&platform=${URLEncoder.encode(params.platform, "UTF-8")}")
5758
append("&build_number=${URLEncoder.encode(params.versionCode.toString(), "UTF-8")}")
5859
append("&build_version=${URLEncoder.encode(params.versionName, "UTF-8")}")
60+
append("&build_configuration=${URLEncoder.encode(params.buildConfiguration, "UTF-8")}")
5961
}
6062
val url = URL(urlString)
6163

64+
options.logger.log(SentryLevel.DEBUG, "Distribution API URL: $urlString")
65+
6266
return try {
6367
makeRequest(url, authToken)
6468
} catch (e: IOException) {

sentry-android-distribution/src/main/java/io/sentry/android/distribution/DistributionIntegration.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,11 +132,16 @@ public class DistributionIntegration(context: Context) : Integration, IDistribut
132132
}
133133
val appId = context.applicationInfo.packageName
134134

135+
val buildConfiguration =
136+
sentryOptions.distribution.buildConfiguration
137+
?: throw IllegalStateException("buildConfiguration must be set in distribution options")
138+
135139
DistributionHttpClient.UpdateCheckParams(
136140
appId = appId,
137141
platform = "android",
138142
versionCode = versionCode,
139143
versionName = versionName,
144+
buildConfiguration = buildConfiguration,
140145
)
141146
} catch (e: PackageManager.NameNotFoundException) {
142147
sentryOptions.logger.log(SentryLevel.ERROR, e, "Failed to get package info")

0 commit comments

Comments
 (0)