Skip to content

Commit 339a0be

Browse files
breedx-splkMateusz Rzeszutek
and
Mateusz Rzeszutek
authored
Post-release v1.1.1 changes (#627)
* post-release changes * fix how alpha version string is built * Fix build and prepare for 1.1.1 branch. (#632) * fix publishing and prepare for 1.1.1 * fix publishing and prepare for 1.1.1 * fix publishing and prepare for 1.1.1 * update version * fix build * Update buildSrc/src/main/kotlin/splunk.android-library-conventions.gradle.kts Co-authored-by: Mateusz Rzeszutek <[email protected]> * fix release build * be aggressive * fix build --------- Co-authored-by: Mateusz Rzeszutek <[email protected]>
1 parent 1300527 commit 339a0be

File tree

8 files changed

+107
-113
lines changed

8 files changed

+107
-113
lines changed

.gitlab-ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,4 @@ release:
6969
- touch local.properties
7070
- export ORG_GRADLE_PROJECT_signingKey=$GPG_SECRET_KEY
7171
- export ORG_GRADLE_PROJECT_signingPassword=$GPG_PASSWORD
72-
- ./gradlew -Prelease=true --no-build-cache -PmavenCentralUsername=$SONATYPE_USERNAME -PmavenCentralPassword=$SONATYPE_PASSWORD build signMavenPublication publish
72+
- ./gradlew -Prelease=true --no-build-cache --no-daemon --rerun-tasks -PmavenCentralUsername=$SONATYPE_USERNAME -PmavenCentralPassword=$SONATYPE_PASSWORD build signMavenPublication publish

CHANGELOG.md

+17-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,23 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

88
## Unreleased
99

10-
* `splunk.rum.version` attribute has been renamed to `rum.sdk.version`
10+
* tbd
11+
12+
## Version 1.1.1
13+
14+
* Fix build to include `.aar` artifact. Please note that this version splits out an
15+
additional required dependency: `com.splunk:opentelemetry-android-instrumentation`.
16+
17+
## Version 1.1.0
18+
19+
This version had a critical defect which caused the `.aar` to not be published to maven central.
20+
Users should skip over this version and use the patch release 1.1.1 when it is available.
21+
22+
* `splunk.rum.version` attribute has been renamed to `rum.sdk.version` (#524)
23+
* new API: `OpenTelemetryRumBuilder.mergeResource()` to allow merging into resource instead of replacing (#524)
24+
* new API: `SplunkRumBuilder.disableBackgroundTaskReporting(applicationId)` - pass the `applicationId` to this
25+
method in order to disable instrumentation for background tasks. (#614) (#624)
26+
* OpenTelemetry SDK updated to [1.29.0](https://github.com/open-telemetry/opentelemetry-java/releases/tag/v1.29.0)
1127

1228
## Version 1.0.0
1329

buildSrc/src/main/kotlin/splunk.android-library-conventions.gradle.kts

+67-83
Original file line numberDiff line numberDiff line change
@@ -7,84 +7,27 @@ plugins {
77
id("signing")
88
}
99

10-
android {
11-
lint {
12-
warningsAsErrors = true
13-
// A newer version of androidx.appcompat:appcompat than 1.3.1 is available: 1.4.1 [GradleDependency]
14-
// we rely on dependabot for dependency updates
15-
disable.add("GradleDependency")
16-
}
10+
android.lint {
11+
warningsAsErrors = true
12+
// A newer version of androidx.appcompat:appcompat than 1.3.1 is available: 1.4.1 [GradleDependency]
13+
// we rely on dependabot for dependency updates
14+
disable.add("GradleDependency")
1715
}
1816

19-
publishing {
20-
repositories {
21-
maven {
22-
val releasesRepoUrl = URI("https://oss.sonatype.org/service/local/staging/deploy/maven2")
23-
val snapshotsRepoUrl = URI("https://oss.sonatype.org/content/repositories/snapshots/")
24-
url = if (project.findProperty("release") == "true") releasesRepoUrl else snapshotsRepoUrl
25-
credentials {
26-
username = findProperty("mavenCentralUsername") as String?
27-
password = findProperty("mavenCentralPassword") as String?
28-
}
29-
}
30-
}
31-
publications {
32-
register<MavenPublication>("maven") {
33-
groupId = "com.splunk"
34-
artifactId = base.archivesName.get()
17+
val isARelease = project.hasProperty("release") && project.property("release") == "true"
18+
val variantToPublish = "release"
3519

36-
afterEvaluate {
37-
pom.name.set("${project.extra["pomName"]}")
38-
pom.description.set(project.description)
39-
}
40-
41-
pom {
42-
url.set("https://github.com/signalfx/splunk-otel-android")
43-
licenses {
44-
license {
45-
name.set("The Apache License, Version 2.0")
46-
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
47-
}
48-
}
49-
developers {
50-
developer {
51-
id.set("splunk")
52-
name.set("Splunk Instrumentation Authors")
53-
email.set("[email protected]")
54-
organization.set("Splunk")
55-
organizationUrl.set("https://www.splunk.com")
56-
}
57-
}
58-
scm {
59-
connection.set("https://github.com/signalfx/splunk-otel-android.git")
60-
developerConnection.set("https://github.com/signalfx/splunk-otel-android.git")
61-
url.set("https://github.com/signalfx/splunk-otel-android")
62-
}
63-
}
20+
android.publishing {
21+
singleVariant(variantToPublish) {
22+
// Adding sources and javadoc artifacts only during a release.
23+
if (isARelease) {
24+
withJavadocJar()
25+
withSourcesJar()
6426
}
6527
}
6628
}
6729

68-
if (project.findProperty("release") == "true") {
69-
signing {
70-
useGpgCmd()
71-
val signingKey: String? by project
72-
val signingPassword: String? by project
73-
useInMemoryPgpKeys(signingKey, signingPassword)
74-
sign(publishing.publications["maven"])
75-
}
76-
}
77-
78-
val sourcesJar by tasks.registering(Jar::class) {
79-
80-
from(android.sourceSets.named("main").get().java.srcDirs)
81-
archiveClassifier.set("sources")
82-
}
83-
84-
project.afterEvaluate {
85-
86-
// note: we need to declare this here in afterEvaluate because the android plugin doesn't
87-
// resolve dependencies early enough to make the libraryVariants hack work until here.
30+
afterEvaluate {
8831
val javadoc by tasks.registering(Javadoc::class) {
8932
source = android.sourceSets.named("main").get().java.getSourceFiles()
9033
classpath += project.files(android.bootClasspath)
@@ -100,21 +43,62 @@ project.afterEvaluate {
10043
addBooleanOption("Xdoclint:all,-missing", true)
10144
}
10245
}
103-
104-
val javadocJar by tasks.registering(Jar::class) {
105-
dependsOn(javadoc)
106-
archiveClassifier.set("javadoc")
107-
from(javadoc.get().destinationDir)
108-
}
109-
110-
val component = project.components.findByName("release")
11146
publishing {
47+
repositories {
48+
maven {
49+
val releasesRepoUrl = URI("https://oss.sonatype.org/service/local/staging/deploy/maven2")
50+
val snapshotsRepoUrl = URI("https://oss.sonatype.org/content/repositories/snapshots/")
51+
url = if (project.findProperty("release") == "true") releasesRepoUrl else snapshotsRepoUrl
52+
credentials {
53+
username = findProperty("mavenCentralUsername") as String?
54+
password = findProperty("mavenCentralPassword") as String?
55+
}
56+
}
57+
}
11258
publications {
113-
named<MavenPublication>("maven") {
114-
from(component)
115-
artifact(tasks.named<Jar>("sourcesJar"))
116-
artifact(javadocJar)
59+
create<MavenPublication>("maven") {
60+
from(components.findByName(variantToPublish))
61+
groupId = "com.splunk"
62+
artifactId = base.archivesName.get()
63+
64+
afterEvaluate {
65+
pom.name.set("${project.extra["pomName"]}")
66+
pom.description.set(project.description)
67+
}
68+
69+
pom {
70+
url.set("https://github.com/signalfx/splunk-otel-android")
71+
licenses {
72+
license {
73+
name.set("The Apache License, Version 2.0")
74+
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
75+
}
76+
}
77+
developers {
78+
developer {
79+
id.set("splunk")
80+
name.set("Splunk Instrumentation Authors")
81+
email.set("[email protected]")
82+
organization.set("Splunk")
83+
organizationUrl.set("https://www.splunk.com")
84+
}
85+
}
86+
scm {
87+
connection.set("https://github.com/signalfx/splunk-otel-android.git")
88+
developerConnection.set("https://github.com/signalfx/splunk-otel-android.git")
89+
url.set("https://github.com/signalfx/splunk-otel-android")
90+
}
91+
}
11792
}
11893
}
11994
}
95+
if (isARelease && project.findProperty("skipSigning") != "true") {
96+
signing {
97+
useGpgCmd()
98+
val signingKey: String? by project
99+
val signingPassword: String? by project
100+
useInMemoryPgpKeys(signingKey, signingPassword)
101+
sign(publishing.publications["maven"])
102+
}
103+
}
120104
}

gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ android.useAndroidX=true
1919
# generate the BuildConfig class that contains the app version
2020
android.defaults.buildfeatures.buildconfig=true
2121

22-
version=1.1.0
22+
version=1.2.0
2323
group=com.splunk

opentelemetry-android-instrumentation/build.gradle.kts

+5-6
Original file line numberDiff line numberDiff line change
@@ -42,23 +42,22 @@ android {
4242
}
4343
}
4444

45-
val otelVersion = "1.29.0"
46-
val otelAlphaVersion = "$otelVersion-alpha"
47-
val otelInstrumentationVersion = "1.29.0"
45+
val otelVersion = "1.30.0-SNAPSHOT"
46+
val otelAlphaVersion = otelVersion.replaceFirst("(-SNAPSHOT)?$".toRegex(), "-alpha$1")
4847

4948
dependencies {
5049
implementation("androidx.appcompat:appcompat:1.6.1")
5150
implementation("androidx.core:core:1.10.1")
5251
implementation("androidx.navigation:navigation-fragment:2.6.0")
5352

54-
api(platform("io.opentelemetry:opentelemetry-bom:$otelVersion"))
53+
api(platform("io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:$otelAlphaVersion"))
54+
5555
implementation("io.opentelemetry:opentelemetry-sdk")
5656
implementation("io.opentelemetry:opentelemetry-exporter-zipkin")
5757
implementation("io.zipkin.reporter2:zipkin-sender-okhttp3")
5858
implementation("io.opentelemetry:opentelemetry-exporter-logging")
59-
implementation("io.opentelemetry.instrumentation:opentelemetry-instrumentation-api:$otelInstrumentationVersion")
59+
implementation("io.opentelemetry.instrumentation:opentelemetry-instrumentation-api")
6060

61-
implementation(platform("io.opentelemetry:opentelemetry-bom-alpha:$otelAlphaVersion"))
6261
implementation("io.opentelemetry:opentelemetry-semconv")
6362

6463
api("io.opentelemetry:opentelemetry-api")

sample-app/build.gradle.kts

+9-9
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ android {
5151
}
5252
}
5353

54-
val otelVersion = "1.26.0"
55-
val otelAlphaVersion = "$otelVersion-alpha"
56-
val otelInstrumentationVersion = "1.29.0"
57-
val otelInstrumentationAlphaVersion = "$otelInstrumentationVersion-alpha"
54+
val otelVersion = "1.30.0-SNAPSHOT"
55+
val otelAlphaVersion = otelVersion.replaceFirst("(-SNAPSHOT)?$".toRegex(), "-alpha$1")
5856

5957
dependencies {
58+
api(platform("io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:$otelAlphaVersion"))
59+
6060
implementation(project(":opentelemetry-android-instrumentation"))
6161
implementation("androidx.legacy:legacy-support-v4:1.0.0")
6262
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.0.3")
@@ -71,12 +71,12 @@ dependencies {
7171
implementation(project(":splunk-otel-android"))
7272
implementation(project(":splunk-otel-android-volley"))
7373
implementation("com.android.volley:volley:1.2.1")
74-
implementation("io.opentelemetry.instrumentation:opentelemetry-instrumentation-api:$otelInstrumentationVersion")
75-
implementation("io.opentelemetry.instrumentation:opentelemetry-instrumentation-api-semconv:$otelInstrumentationAlphaVersion")
74+
implementation("io.opentelemetry.instrumentation:opentelemetry-instrumentation-api")
75+
implementation("io.opentelemetry.instrumentation:opentelemetry-instrumentation-api-semconv")
7676

77-
implementation("io.opentelemetry:opentelemetry-api-events:$otelAlphaVersion")
78-
implementation("io.opentelemetry:opentelemetry-sdk-logs:$otelAlphaVersion")
79-
implementation("io.opentelemetry:opentelemetry-sdk:$otelAlphaVersion")
77+
implementation("io.opentelemetry:opentelemetry-api-events")
78+
implementation("io.opentelemetry:opentelemetry-sdk-logs")
79+
implementation("io.opentelemetry:opentelemetry-sdk")
8080

8181
testImplementation("junit:junit:4.13.2")
8282
}

splunk-otel-android-volley/build.gradle.kts

+4-6
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,8 @@ android {
4343
}
4444
}
4545

46-
val otelVersion = "1.29.0"
47-
val otelAlphaVersion = "$otelVersion-alpha"
48-
val otelInstrumentationAlphaVersion = "1.29.0-alpha-SNAPSHOT"
46+
val otelVersion = "1.30.0-SNAPSHOT"
47+
val otelAlphaVersion = otelVersion.replaceFirst("(-SNAPSHOT)?$".toRegex(), "-alpha$1")
4948

5049
dependencies {
5150
implementation("androidx.appcompat:appcompat:1.6.1")
@@ -54,14 +53,13 @@ dependencies {
5453

5554
implementation(project(":splunk-otel-android"))
5655

57-
api(platform("io.opentelemetry:opentelemetry-bom:$otelVersion"))
56+
api(platform("io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:$otelAlphaVersion"))
5857
api("io.opentelemetry:opentelemetry-api")
5958
implementation("io.opentelemetry:opentelemetry-sdk")
6059

61-
implementation(platform("io.opentelemetry:opentelemetry-bom-alpha:$otelAlphaVersion"))
6260
implementation("io.opentelemetry:opentelemetry-semconv")
6361

64-
implementation(platform("io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:$otelInstrumentationAlphaVersion"))
62+
implementation(platform("io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha"))
6563
implementation("io.opentelemetry.instrumentation:opentelemetry-instrumentation-api")
6664
implementation("io.opentelemetry.instrumentation:opentelemetry-instrumentation-api-semconv")
6765

splunk-otel-android/build.gradle.kts

+3-6
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ android {
1212

1313
defaultConfig {
1414
minSdk = 21
15-
1615
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
1716
consumerProguardFiles("consumer-rules.pro")
1817
}
@@ -30,7 +29,6 @@ android {
3029

3130
compileOptions {
3231
isCoreLibraryDesugaringEnabled = true
33-
3432
sourceCompatibility(JavaVersion.VERSION_1_8)
3533
targetCompatibility(JavaVersion.VERSION_1_8)
3634
}
@@ -41,23 +39,22 @@ android {
4139
}
4240
}
4341

44-
val otelVersion = "1.29.0"
42+
val otelVersion = "1.30.0-SNAPSHOT"
43+
val otelAlphaVersion = otelVersion.replaceFirst("(-SNAPSHOT)?$".toRegex(), "-alpha$1")
4544

4645
dependencies {
47-
api(platform("io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:$otelVersion-alpha"))
46+
api(platform("io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:$otelAlphaVersion"))
4847
implementation(project(":opentelemetry-android-instrumentation"))
4948
implementation(platform("org.jetbrains.kotlin:kotlin-bom:1.9.10"))
5049
implementation("androidx.appcompat:appcompat:1.6.1")
5150
implementation("androidx.core:core:1.10.1")
5251
implementation("androidx.navigation:navigation-fragment:2.6.0")
5352

54-
api(platform("io.opentelemetry:opentelemetry-bom:$otelVersion"))
5553
implementation("io.opentelemetry:opentelemetry-sdk")
5654
implementation("io.opentelemetry:opentelemetry-exporter-zipkin")
5755
implementation("io.zipkin.reporter2:zipkin-sender-okhttp3")
5856
implementation("io.opentelemetry:opentelemetry-exporter-logging")
5957

60-
implementation(platform("io.opentelemetry:opentelemetry-bom-alpha"))
6158
implementation("io.opentelemetry:opentelemetry-semconv")
6259
implementation("io.opentelemetry.instrumentation:opentelemetry-okhttp-3.0")
6360

0 commit comments

Comments
 (0)