Skip to content

Commit 38525c1

Browse files
authored
Delete deprecated JDK 11 classes (#6075)
These were deprecated and moved to the micrometer-java11 module with Micrometer 1.13.0. The multi-release JAR arrangement that is used for these in micrometer-core has some issues, which is what caused the move to micrometer-java11. See gh-4728. It would help simplify our build to remove the multi-release JAR plugin, which ends up downloading a JDK for the target release on CI builds even if the configured toolchain can target that release.
1 parent 0adfe6b commit 38525c1

File tree

10 files changed

+8
-913
lines changed

10 files changed

+8
-913
lines changed

Diff for: micrometer-core/build.gradle

+8-40
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
plugins {
22
alias(libs.plugins.kotlin19)
33
alias(libs.plugins.aspectj) apply false
4-
id 'me.champeau.mrjar' version "0.1.1"
54
}
65

76
if (javaLanguageVersion.canCompileOrRun(17)) {
@@ -27,12 +26,16 @@ else {
2726
}
2827
}
2928

30-
description 'Core module of Micrometer containing instrumentation API and implementation'
31-
32-
multiRelease {
33-
targetVersions 8, 11
29+
japicmp {
30+
// TODO Remove once building 1.16
31+
classExcludes.addAll('io.micrometer.core.instrument.binder.jdk.MicrometerHttpClient',
32+
'io.micrometer.core.instrument.binder.jdk.DefaultHttpClientObservationConvention',
33+
'io.micrometer.core.instrument.binder.jdk.HttpClientContext',
34+
'io.micrometer.core.instrument.binder.jdk.HttpClientObservationConvention')
3435
}
3536

37+
description 'Core module of Micrometer containing instrumentation API and implementation'
38+
3639
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
3740
kotlinOptions {
3841
jvmTarget = javaTargetVersion
@@ -94,9 +97,6 @@ dependencies {
9497
api project(":micrometer-commons")
9598
api project(":micrometer-observation")
9699

97-
java11Api project(":micrometer-commons")
98-
java11Api project(":micrometer-observation")
99-
100100
// HdrHistogram is needed at runtime when client-side percentiles are configured
101101
implementation 'org.hdrhistogram:HdrHistogram'
102102
// LatencyUtils is needed at runtime when pause detection is enabled
@@ -106,7 +106,6 @@ dependencies {
106106

107107
// Aspects
108108
optionalApi libs.aspectjrt
109-
java11RuntimeOnly libs.aspectjrt
110109

111110
// instrumentation options
112111
optionalApi 'io.dropwizard.metrics:metrics-core' // TODO move dropwizard out of core module? DropwizardMeterRegistry for e.g. JMX registry
@@ -162,7 +161,6 @@ dependencies {
162161

163162
testImplementation 'io.projectreactor:reactor-test'
164163
testImplementation project(":micrometer-observation-test")
165-
java11TestImplementation project(":micrometer-observation-test")
166164

167165
// dependency injection tests
168166
testImplementation 'javax.inject:javax.inject'
@@ -189,7 +187,6 @@ dependencies {
189187
testImplementation 'com.h2database:h2'
190188

191189
testImplementation 'org.assertj:assertj-core'
192-
java11TestImplementation 'org.assertj:assertj-core'
193190
testImplementation 'org.awaitility:awaitility'
194191

195192
testImplementation 'org.ehcache:ehcache'
@@ -203,7 +200,6 @@ dependencies {
203200

204201
testImplementation 'ru.lanwen.wiremock:wiremock-junit5'
205202
testImplementation 'com.github.tomakehurst:wiremock-jre8-standalone'
206-
java11TestImplementation 'com.github.tomakehurst:wiremock-jre8-standalone'
207203

208204
// Log4j2 Async dependency
209205
testImplementation libs.lmaxDisruptor
@@ -292,31 +288,3 @@ task openj9ConcurrentScavengeTest(type: Test) {
292288

293289
jvmArgs '-Xgc:concurrentScavenge'
294290
}
295-
296-
java11Test {
297-
// set heap size for the test JVM(s)
298-
maxHeapSize = "1500m"
299-
300-
useJUnitPlatform {
301-
excludeTags 'docker'
302-
}
303-
304-
include {
305-
it.getFile().getAbsolutePath().contains("java11Test")
306-
}
307-
308-
develocity.testRetry {
309-
maxFailures = 5
310-
maxRetries = 3
311-
}
312-
}
313-
314-
compileJava11TestJava {
315-
options.errorprone.enabled = false
316-
sourceCompatibility = JavaVersion.VERSION_11
317-
targetCompatibility = JavaVersion.VERSION_11
318-
}
319-
320-
compileJava11Java {
321-
options.errorprone.enabled = false
322-
}

Diff for: micrometer-core/src/main/java11/io/micrometer/core/instrument/binder/jdk/DefaultHttpClientObservationConvention.java

-93
This file was deleted.

Diff for: micrometer-core/src/main/java11/io/micrometer/core/instrument/binder/jdk/HttpClientContext.java

-47
This file was deleted.

Diff for: micrometer-core/src/main/java11/io/micrometer/core/instrument/binder/jdk/HttpClientObservationConvention.java

-38
This file was deleted.

Diff for: micrometer-core/src/main/java11/io/micrometer/core/instrument/binder/jdk/HttpClientObservationDocumentation.java

-87
This file was deleted.

0 commit comments

Comments
 (0)