Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump Gradle to 8.13 and adopt Quarkus Gradle plugin #46482

Merged
merged 1 commit into from
Feb 27, 2025

Conversation

snazy
Copy link
Contributor

@snazy snazy commented Feb 25, 2025

The constructor of org.gradle.api.internal.artifacts.dependencies.DefaultProjectDependency used in io.quarkus.gradle.tooling.dependency.DependencyUtils has been removed in Gradle 8.13, which means that certain dependencies render the Quarkus Gradle plugin(s) incompatible w/ Gradle 8.13.

This change bumps Gradle to 8.13 and updates DependencyUtils to do the same as the (removed) constructor.

@quarkus-bot quarkus-bot bot added area/dependencies Pull requests that update a dependency file area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/gradle Gradle area/platform Issues related to definition and interaction with Quarkus Platform labels Feb 25, 2025
@snazy
Copy link
Contributor Author

snazy commented Feb 25, 2025

I think, it would be good to include this change in Quarkus 3.19.x. WDYT?

@gsmet
Copy link
Member

gsmet commented Feb 25, 2025

Don't worry about the CI issues for now, I'll have a look tomorrow.

This comment has been minimized.

@snazy snazy force-pushed the bump-gradle-8.13-and-adopt branch from f3b28e6 to e7614d0 Compare February 26, 2025 16:17
@snazy
Copy link
Contributor Author

snazy commented Feb 26, 2025

Don't worry about the CI issues for now, I'll have a look tomorrow.

Saw there were some commits on main regarding Maven/CI - just rebased+force-pushed.

@gsmet
Copy link
Member

gsmet commented Feb 26, 2025

@snazy I'm playing whack a mole with CI due to some infra changes. I will push a fix for the failure soon.

This comment has been minimized.

The constructor of `org.gradle.api.internal.artifacts.dependencies.DefaultProjectDependency` [used in `io.quarkus.gradle.tooling.dependency.DependencyUtils`](https://github.com/gradle/gradle/blob/0b1ee1ff81d1f4a26574ff4a362ac9180852b140/platforms/software/dependency-management/src/main/java/org/gradle/api/internal/artifacts/dependencies/DefaultProjectDependency.java#L60-L62) has been removed in [Gradle 8.13](https://github.com/gradle/gradle/blob/073314332697ba45c16c0a0ce1891fa6794179ff/platforms/software/dependency-management/src/main/java/org/gradle/api/internal/artifacts/dependencies/DefaultProjectDependency.java#L52-L56), which means that certain dependencies render the Quarkus Gradle plugin(s) incompatible w/ Gradle 8.13.

This change bumps Gradle to 8.13 and updates `DependencyUtils` to do the same as the (removed) constructor.
@gsmet gsmet force-pushed the bump-gradle-8.13-and-adopt branch from e7614d0 to 68f8295 Compare February 27, 2025 14:20
@gsmet
Copy link
Member

gsmet commented Feb 27, 2025

CI should be in a much better state now, I rebased the PR.

@@ -377,7 +378,8 @@ private static Dependency createDeploymentProjectDependency(DependencyHandler ha
ped.getDeploymentModule().getName(),
ped.getDeploymentModule().getVersion().toString());
} else if (ped.getDeploymentModule() instanceof ProjectInternal) {
return handler.create(new DefaultProjectDependency((ProjectInternal) ped.getDeploymentModule(), true));
return handler.create(new DefaultProjectDependency((ProjectInternal) ped.getDeploymentModule(), true,
DefaultTaskDependencyFactory.withNoAssociatedProject()));
Copy link
Member

Choose a reason for hiding this comment

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

@snazy just to be sure, the new constructor you used is present in older Gradle versions?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, also there in older Gradle versions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Gradle 8.5.0 is the minimum version (older ones don't have that DefaultProjectDependency class)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So no change in "minimum Gradle version" requirement

Copy link

quarkus-bot bot commented Feb 27, 2025

Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit 68f8295.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

You can consult the Develocity build scans.


Flaky tests - Develocity

⚙️ JVM Tests - JDK 21

📦 extensions/smallrye-reactive-messaging-kafka/deployment

io.quarkus.smallrye.reactivemessaging.kafka.deployment.testing.KafkaDevServicesContinuousTestingWorkingAppPropsTestCase.testContinuousTestingScenario3 - History

  • io.quarkus.builder.BuildException: Build failure: Build failed due to errors [error]: Build step io.quarkus.redis.deployment.client.DevServicesRedisProcessor\#startRedisContainers threw an exception: java.lang.RuntimeException: org.testcontainers.containers.ContainerLaunchException: Container startup failed for image docker.io/redis:7 at io.quarkus.redis.deployment.client.DevServicesRedisProcessor.startRedisContainers(DevServicesRedisProcessor.java:124) at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:733) at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:856) - java.lang.RuntimeException
java.lang.RuntimeException: 
io.quarkus.builder.BuildException: Build failure: Build failed due to errors
	[error]: Build step io.quarkus.redis.deployment.client.DevServicesRedisProcessor#startRedisContainers threw an exception: java.lang.RuntimeException: org.testcontainers.containers.ContainerLaunchException: Container startup failed for image docker.io/redis:7
	at io.quarkus.redis.deployment.client.DevServicesRedisProcessor.startRedisContainers(DevServicesRedisProcessor.java:124)
	at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:733)
	at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:856)
	at io.quarkus.builder.BuildContext.run(BuildContext.java:255)
	at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)

⚙️ JVM Tests - JDK 17 Windows

📦 extensions/micrometer-opentelemetry/deployment

io.quarkus.micrometer.opentelemetry.deployment.compatibility.MicrometerTimedInterceptorTest.testTimeMethod - History

  • Stream has no elements - java.lang.IllegalArgumentException
java.lang.IllegalArgumentException: Stream has no elements
	at io.quarkus.micrometer.opentelemetry.deployment.common.MetricDataFilter.lambda$lastReading$2(MetricDataFilter.java:213)
	at java.base/java.util.Optional.orElseThrow(Optional.java:403)
	at io.quarkus.micrometer.opentelemetry.deployment.common.MetricDataFilter.lastReading(MetricDataFilter.java:213)
	at io.quarkus.micrometer.opentelemetry.deployment.common.MetricDataFilter.lastReadingDataPoint(MetricDataFilter.java:231)
	at io.quarkus.micrometer.opentelemetry.deployment.compatibility.MicrometerTimedInterceptorTest.testTimeMethod(MicrometerTimedInterceptorTest.java:77)
	at java.base/java.lang.reflect.Method.invoke(Method.java:569)
	at io.quarkus.test.QuarkusUnitTest.runExtensionMethod(QuarkusUnitTest.java:521)

@gsmet gsmet merged commit 0caa5a7 into quarkusio:main Feb 27, 2025
58 checks passed
@quarkus-bot quarkus-bot bot added this to the 3.21 - main milestone Feb 27, 2025
@snazy snazy deleted the bump-gradle-8.13-and-adopt branch February 27, 2025 19:21
@gsmet gsmet modified the milestones: 3.21 - main, 3.19.2 Mar 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dependencies Pull requests that update a dependency file area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/gradle Gradle area/platform Issues related to definition and interaction with Quarkus Platform triage/flaky-test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants