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

[#41] Send the correct library version for outgoing signals #47

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The Kotlin SDK for TelemetryDeck is available from Maven Central and can be used

```groovy
dependencies {
implementation 'com.telemetrydeck:kotlin-sdk:3.0.3'
implementation 'com.telemetrydeck:kotlin-sdk:3.0.4'
}
```

Expand Down
7 changes: 4 additions & 3 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
## Releasing a new version of the library

1. Update the library coordinates by incrementing the version in https://github.com/TelemetryDeck/KotlinSDK/blob/lib/build.gradle.kts#L103.
2. Update the README.md to instruct new users to use the latest version.
3. Commit and push.
1. Update the library coordinates by incrementing the version in https://github.com/TelemetryDeck/KotlinSDK/blob/lib/build.gradle.kts#L104.
2. Update the `sdkVersion` in `EnvironmentParameterProvider`
3. Update the README.md to instruct new users to use the latest version.
4. Commit and push.

### Publishing using GitHub Actions

Expand Down
2 changes: 1 addition & 1 deletion lib/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ dependencies {
}

mavenPublishing {
coordinates("com.telemetrydeck", "kotlin-sdk", "3.0.3")
coordinates("com.telemetrydeck", "kotlin-sdk", "3.0.4")

pom {
name = "TelemetryDeck SDK"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ internal class EnvironmentParameterProvider : TelemetryDeckProvider, TelemetryPr
private val platform: String = "Android"
private val os: String = "Android"
private val sdkName: String = "KotlinSDK"
private val sdkVersion: String = "3.0.4"

override fun fallbackRegister(ctx: Application?, client: TelemetryDeckSignalProcessor) {
register(ctx, client)
Expand All @@ -49,8 +50,8 @@ internal class EnvironmentParameterProvider : TelemetryDeckProvider, TelemetryPr

private fun appendSDKMetadata() {
metadata[SDK.Name.paramName] = sdkName
metadata[SDK.Version.paramName] = BuildConfig.LIBRARY_PACKAGE_NAME
metadata[SDK.NameAndVersion.paramName] = "$sdkName ${BuildConfig.LIBRARY_PACKAGE_NAME}"
metadata[SDK.Version.paramName] = sdkVersion
metadata[SDK.NameAndVersion.paramName] = "$sdkName $sdkVersion"
metadata[SDK.BuildType.paramName] = BuildConfig.BUILD_TYPE
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class EnvironmentMetadataProviderTest {
true
)
Assert.assertEquals(
queuedSignal?.payload?.contains("TelemetryDeck.SDK.version:com.telemetrydeck.sdk"),
queuedSignal?.payload?.any { it.startsWith("TelemetryDeck.SDK.version:") },
true
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class EnvironmentParameterProviderTest {
Assert.assertNotNull(queuedSignal)
Assert.assertEquals(
true,
queuedSignal?.payload?.contains("TelemetryDeck.SDK.version:com.telemetrydeck.sdk")
queuedSignal?.payload?.any { it.startsWith("TelemetryDeck.SDK.version:") }

)
}
Expand Down
Loading