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
2 changes: 1 addition & 1 deletion .github/workflows/reusable-native-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,5 @@ jobs:
# therefore we're starting a Kafka container manually for the tests
docker compose -f .github/graal-native-docker-compose.yaml up -d
# don't wait for startup - gradle compile takes long enough
./gradlew ${{ inputs.test-latest-deps && '-PtestLatestDeps=true' || '' }} nativeTest
./gradlew ${{ inputs.test-latest-deps && '-PtestLatestDeps=true' || '' }} nativeTest --no-configuration-cache
docker compose -f .github/graal-native-docker-compose.yaml down # is this needed?
2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pluginManagement {
id("org.jetbrains.kotlin.jvm") version "2.3.10"
id("org.xbib.gradle.plugin.jflex") version "3.0.2"
id("com.github.bjornvester.xjc") version "1.9.0"
id("org.graalvm.buildtools.native") version "0.11.5"
id("org.graalvm.buildtools.native") version "1.0.0"
id("com.google.osdetector") version "1.7.3"
id("com.google.protobuf") version "0.9.6"
}
Expand Down
19 changes: 19 additions & 0 deletions smoke-tests-otel-starter/spring-boot-3.2/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ otelJava {
minJavaVersionSupported.set(JavaVersion.VERSION_17)
}

val repositoryMetadata by configurations.creating

dependencies {
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.springframework.boot:spring-boot-starter-data-jdbc")
Expand All @@ -32,6 +34,8 @@ dependencies {
// are not in sync
testImplementation("org.mongodb:mongodb-driver-sync:latest.release")
}

repositoryMetadata("org.graalvm.buildtools:graalvm-reachability-metadata:1.0.0:repository@zip")
}

springBoot {
Expand Down Expand Up @@ -66,10 +70,25 @@ plugins.withId("org.graalvm.buildtools.native") {
enabled = false
}

val extractRepositoryMetadata by tasks.registering(Copy::class) {
inputs.files(repositoryMetadata)
from({
zipTree(repositoryMetadata.singleFile)
})
into(rootProject.layout.buildDirectory.dir("metadata-repository"))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Using rootProject here because graalvmNative extension seems to be shared among the projects so we need to make sure that all projects extract the metadata to the same path because we don't know which one of these is actually executed.

}
tasks.named("nativeTestCompile").configure {
dependsOn(extractRepositoryMetadata)
}

// See https://github.com/graalvm/native-build-tools/issues/572
(extensions.getByName("graalvmNative") as ExtensionAware).extensions
.configure<org.graalvm.buildtools.gradle.dsl.GraalVMReachabilityMetadataRepositoryExtension> {
enabled.set(false)
// manully set up the metadata repository to avoid resolving the default repository, which
// currently fails with
// Resolution of the configuration ':smoke-tests-otel-starter:spring-boot-3:detachedConfiguration1' was attempted without an exclusive lock. This is unsafe and not allowed.
uri.set(extractRepositoryMetadata.get().destinationDir.toURI())
}

tasks.named<Test>("test").configure {
Expand Down
19 changes: 19 additions & 0 deletions smoke-tests-otel-starter/spring-boot-3/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ otelJava {
minJavaVersionSupported.set(JavaVersion.VERSION_17)
}

val repositoryMetadata by configurations.creating

dependencies {
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.springframework.boot:spring-boot-starter-data-jdbc")
Expand All @@ -36,6 +38,8 @@ dependencies {
// are not in sync
testImplementation("org.mongodb:mongodb-driver-sync:latest.release")
}

repositoryMetadata("org.graalvm.buildtools:graalvm-reachability-metadata:1.0.0:repository@zip")
}

springBoot {
Expand Down Expand Up @@ -70,10 +74,25 @@ plugins.withId("org.graalvm.buildtools.native") {
enabled = false
}

val extractRepositoryMetadata by tasks.registering(Copy::class) {
inputs.files(repositoryMetadata)
from({
zipTree(repositoryMetadata.singleFile)
})
into(rootProject.layout.buildDirectory.dir("metadata-repository"))
}
tasks.named("nativeTestCompile").configure {
dependsOn(extractRepositoryMetadata)
}

// See https://github.com/graalvm/native-build-tools/issues/572
(extensions.getByName("graalvmNative") as ExtensionAware).extensions
.configure<org.graalvm.buildtools.gradle.dsl.GraalVMReachabilityMetadataRepositoryExtension> {
enabled.set(false)
// manully set up the metadata repository to avoid resolving the default repository, which
// currently fails with
// Resolution of the configuration ':smoke-tests-otel-starter:spring-boot-3:detachedConfiguration1' was attempted without an exclusive lock. This is unsafe and not allowed.
uri.set(extractRepositoryMetadata.get().destinationDir.toURI())
}

tasks.named<Test>("test").configure {
Expand Down
19 changes: 19 additions & 0 deletions smoke-tests-otel-starter/spring-boot-4/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ otelJava {
minJavaVersionSupported.set(JavaVersion.VERSION_17)
}

val repositoryMetadata by configurations.creating

dependencies {
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.springframework.boot:spring-boot-starter-data-jdbc")
Expand All @@ -39,6 +41,8 @@ dependencies {
testImplementation("org.testcontainers:testcontainers-kafka")
testImplementation("org.testcontainers:testcontainers-mongodb")
testImplementation(project(":instrumentation:spring:spring-boot-autoconfigure"))

repositoryMetadata("org.graalvm.buildtools:graalvm-reachability-metadata:1.0.0:repository@zip")
}

springBoot {
Expand Down Expand Up @@ -91,10 +95,25 @@ plugins.withId("org.graalvm.buildtools.native") {
enabled = javaVersionSupportsNative
}

val extractRepositoryMetadata by tasks.registering(Copy::class) {
inputs.files(repositoryMetadata)
from({
zipTree(repositoryMetadata.singleFile)
})
into(rootProject.layout.buildDirectory.dir("metadata-repository"))
}
tasks.named("nativeTestCompile").configure {
dependsOn(extractRepositoryMetadata)
}

// See https://github.com/graalvm/native-build-tools/issues/572
(extensions.getByName("graalvmNative") as ExtensionAware).extensions
.configure<org.graalvm.buildtools.gradle.dsl.GraalVMReachabilityMetadataRepositoryExtension> {
enabled.set(false)
// manully set up the metadata repository to avoid resolving the default repository, which
// currently fails with
// Resolution of the configuration ':smoke-tests-otel-starter:spring-boot-3:detachedConfiguration1' was attempted without an exclusive lock. This is unsafe and not allowed.
uri.set(extractRepositoryMetadata.get().destinationDir.toURI())
}

tasks.named<Test>("test").configure {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ otelJava {
minJavaVersionSupported.set(JavaVersion.VERSION_17)
}

val repositoryMetadata by configurations.creating

dependencies {
implementation(project(":instrumentation:spring:starters:spring-boot-starter"))
implementation(platform(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES))
Expand All @@ -26,6 +28,8 @@ dependencies {

testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation("io.projectreactor:reactor-test")

repositoryMetadata("org.graalvm.buildtools:graalvm-reachability-metadata:1.0.0:repository@zip")
}

springBoot {
Expand Down Expand Up @@ -60,10 +64,25 @@ plugins.withId("org.graalvm.buildtools.native") {
enabled = false
}

val extractRepositoryMetadata by tasks.registering(Copy::class) {
inputs.files(repositoryMetadata)
from({
zipTree(repositoryMetadata.singleFile)
})
into(rootProject.layout.buildDirectory.dir("metadata-repository"))
}
tasks.named("nativeTestCompile").configure {
dependsOn(extractRepositoryMetadata)
}

// See https://github.com/graalvm/native-build-tools/issues/572
(extensions.getByName("graalvmNative") as ExtensionAware).extensions
.configure<org.graalvm.buildtools.gradle.dsl.GraalVMReachabilityMetadataRepositoryExtension> {
enabled.set(false)
// manully set up the metadata repository to avoid resolving the default repository, which
// currently fails with
// Resolution of the configuration ':smoke-tests-otel-starter:spring-boot-3:detachedConfiguration1' was attempted without an exclusive lock. This is unsafe and not allowed.
uri.set(extractRepositoryMetadata.get().destinationDir.toURI())
}

tasks.named<Test>("test").configure {
Expand Down
Loading