Skip to content

Commit 6e3c34f

Browse files
committed
Strip junit pinned dependency with bnd 7.3.0-RC1
1 parent fe5831c commit 6e3c34f

2 files changed

Lines changed: 15 additions & 14 deletions

File tree

buildSrc/build.gradle.kts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,23 @@ spotless {
2929
repositories {
3030
mavenCentral()
3131
gradlePluginPortal()
32+
// TODO: delete bndtools repository once biz.aQute.bnd.gradle:7.3.0 is released
33+
maven { url = uri("https://bndtools.jfrog.io/artifactory/libs-release/") }
3234
mavenLocal()
3335
}
3436

37+
// TODO: delete version pinning once biz.aQute.bnd.gradle:7.3.0 is released
38+
configurations.all {
39+
resolutionStrategy.eachDependency {
40+
// biz.aQute.bnd.gradle 7.3.0-RC1 transitives are not all published at RC1; pin to latest stable
41+
if (requested.group == "biz.aQute.bnd" && requested.name != "biz.aQute.bnd.gradle") {
42+
useVersion("7.2.3")
43+
}
44+
}
45+
}
46+
3547
dependencies {
36-
implementation("biz.aQute.bnd:biz.aQute.bnd.gradle:7.2.0")
48+
implementation("biz.aQute.bnd:biz.aQute.bnd.gradle:7.3.0-RC1")
3749
implementation(enforcedPlatform("com.squareup.wire:wire-bom:6.2.0"))
3850
implementation("com.google.auto.value:auto-value-annotations:1.11.1")
3951
// When updating, update above in plugins too

integration-tests/osgi/build.gradle.kts

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import aQute.bnd.gradle.Bundle
22
import aQute.bnd.gradle.Resolve
33
import aQute.bnd.gradle.TestOSGi
4+
import java.time.Duration
45

56
plugins {
67
id("otel.java-conventions")
@@ -13,19 +14,6 @@ otelJava.moduleName.set("io.opentelemetry.integration.tests.osgi")
1314
// https://github.com/micrometer-metrics/micrometer/tree/main/micrometer-osgi-test
1415
// https://github.com/eclipse-osgi-technology/osgi-test/tree/main/examples/osgi-test-example-gradle
1516

16-
configurations.all {
17-
resolutionStrategy {
18-
// BND not compatible with JUnit 5.13+; see https://github.com/bndtools/bnd/issues/6651
19-
val junitVersion = "5.14.4"
20-
val junitLauncherVersion = "1.14.4"
21-
force("org.junit.jupiter:junit-jupiter:$junitVersion")
22-
force("org.junit.jupiter:junit-jupiter-api:$junitVersion")
23-
force("org.junit.jupiter:junit-jupiter-params:$junitVersion")
24-
force("org.junit.jupiter:junit-jupiter-engine:$junitVersion")
25-
force("org.junit.platform:junit-platform-launcher:$junitLauncherVersion")
26-
}
27-
}
28-
2917
dependencies {
3018
// Testing the "kitchen sink" hides OSGi configuration issues. For example, opentelemetry-api has
3119
// optional dependencies on :sdk-extensions:autoconfigure and :api:incubator. If we only test a
@@ -80,6 +68,7 @@ val testOSGiTask = tasks.register<TestOSGi>("testOSGi") {
8068
group = JavaBasePlugin.VERIFICATION_GROUP
8169
bndrun = resolveTask.flatMap { it.outputBndrun }
8270
bundles = files(sourceSets.test.get().runtimeClasspath, testingBundleTask.get().archiveFile)
71+
timeout.set(Duration.ofMinutes(2))
8372
// BND reports success when zero tests ran (e.g. if bundles failed to start). Fail explicitly.
8473
val testResultsDir = layout.buildDirectory.dir("test-results/testOSGi")
8574
doLast {

0 commit comments

Comments
 (0)