Skip to content
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
14 changes: 13 additions & 1 deletion buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,23 @@ spotless {
repositories {
mavenCentral()
gradlePluginPortal()
// TODO: delete bndtools repository once biz.aQute.bnd.gradle:7.3.0 is released
maven { url = uri("https://bndtools.jfrog.io/artifactory/libs-release/") }
mavenLocal()
}

// TODO: delete version pinning once biz.aQute.bnd.gradle:7.3.0 is released
configurations.all {
resolutionStrategy.eachDependency {
// biz.aQute.bnd.gradle 7.3.0-RC1 transitives are not all published at RC1; pin to latest stable
if (requested.group == "biz.aQute.bnd" && requested.name != "biz.aQute.bnd.gradle") {
useVersion("7.2.3")
}
}
}

dependencies {
implementation("biz.aQute.bnd:biz.aQute.bnd.gradle:7.2.0")
implementation("biz.aQute.bnd:biz.aQute.bnd.gradle:7.3.0-RC1")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A recently published RC version of this plugin fixes the issues that required us to pin to jnit 5.12.2, junit launcher 1.12.1. We should wait for the real 7.3.0 release before merging: https://github.com/bndtools/bnd

implementation(enforcedPlatform("com.squareup.wire:wire-bom:6.2.0"))
implementation("com.google.auto.value:auto-value-annotations:1.11.1")
// When updating, update above in plugins too
Expand Down
15 changes: 2 additions & 13 deletions integration-tests/osgi/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import aQute.bnd.gradle.Bundle
import aQute.bnd.gradle.Resolve
import aQute.bnd.gradle.TestOSGi
import java.time.Duration

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

configurations.all {
resolutionStrategy {
// BND not compatible with JUnit 5.13+; see https://github.com/bndtools/bnd/issues/6651
val junitVersion = "5.12.2"
val junitLauncherVersion = "1.12.1"
force("org.junit.jupiter:junit-jupiter:$junitVersion")
force("org.junit.jupiter:junit-jupiter-api:$junitVersion")
force("org.junit.jupiter:junit-jupiter-params:$junitVersion")
force("org.junit.jupiter:junit-jupiter-engine:$junitVersion")
force("org.junit.platform:junit-platform-launcher:$junitLauncherVersion")
}
}

dependencies {
// Testing the "kitchen sink" hides OSGi configuration issues. For example, opentelemetry-api has
// optional dependencies on :sdk-extensions:autoconfigure and :api:incubator. If we only test a
Expand Down Expand Up @@ -80,6 +68,7 @@ val testOSGiTask = tasks.register<TestOSGi>("testOSGi") {
group = JavaBasePlugin.VERIFICATION_GROUP
bndrun = resolveTask.flatMap { it.outputBndrun }
bundles = files(sourceSets.test.get().runtimeClasspath, testingBundleTask.get().archiveFile)
timeout.set(Duration.ofMinutes(2))
// BND reports success when zero tests ran (e.g. if bundles failed to start). Fail explicitly.
val testResultsDir = layout.buildDirectory.dir("test-results/testOSGi")
doLast {
Expand Down
Loading