Skip to content

Commit

Permalink
Merge pull request #44580 from gsmet/3.16.4-backports-1
Browse files Browse the repository at this point in the history
[3.16] 3.16.4 backports 1
  • Loading branch information
gsmet authored Nov 20, 2024
2 parents 8bbe797 + 31c36ed commit 0ff22e4
Show file tree
Hide file tree
Showing 42 changed files with 945 additions and 76 deletions.
10 changes: 5 additions & 5 deletions bom/application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@
<smallrye-open-api.version>3.13.0</smallrye-open-api.version>
<smallrye-graphql.version>2.11.0</smallrye-graphql.version>
<smallrye-fault-tolerance.version>6.5.0</smallrye-fault-tolerance.version>
<smallrye-jwt.version>4.6.0</smallrye-jwt.version>
<smallrye-jwt.version>4.6.1</smallrye-jwt.version>
<smallrye-context-propagation.version>2.1.2</smallrye-context-propagation.version>
<smallrye-reactive-streams-operators.version>1.0.13</smallrye-reactive-streams-operators.version>
<smallrye-reactive-types-converter.version>3.0.1</smallrye-reactive-types-converter.version>
<smallrye-mutiny-vertx-binding.version>3.15.0</smallrye-mutiny-vertx-binding.version>
<smallrye-mutiny-vertx-binding.version>3.16.0</smallrye-mutiny-vertx-binding.version>
<smallrye-reactive-messaging.version>4.25.0</smallrye-reactive-messaging.version>
<smallrye-stork.version>2.7.0</smallrye-stork.version>
<jakarta.activation.version>2.1.3</jakarta.activation.version>
Expand Down Expand Up @@ -115,7 +115,7 @@
<wildfly-elytron.version>2.6.0.Final</wildfly-elytron.version>
<jboss-marshalling.version>2.2.1.Final</jboss-marshalling.version>
<jboss-threads.version>3.8.0.Final</jboss-threads.version>
<vertx.version>4.5.10</vertx.version>
<vertx.version>4.5.11</vertx.version>
<httpclient.version>4.5.14</httpclient.version>
<httpcore.version>4.4.16</httpcore.version>
<httpasync.version>4.1.5</httpasync.version>
Expand All @@ -134,10 +134,10 @@
<shrinkwrap.version>1.2.6</shrinkwrap.version>
<hamcrest.version>2.2</hamcrest.version><!-- The version needs to be compatible with both REST Assured and Awaitility -->
<junit.jupiter.version>5.10.5</junit.jupiter.version>
<infinispan.version>15.0.10.Final</infinispan.version>
<infinispan.version>15.0.11.Final</infinispan.version>
<infinispan.protostream.version>5.0.12.Final</infinispan.protostream.version>
<caffeine.version>3.1.8</caffeine.version>
<netty.version>4.1.111.Final</netty.version>
<netty.version>4.1.115.Final</netty.version>
<brotli4j.version>1.16.0</brotli4j.version>
<reactive-streams.version>1.0.4</reactive-streams.version>
<jboss-logging.version>3.6.1.Final</jboss-logging.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,6 @@ public void apply(Project project) {
// Apply the `java` plugin
project.getPluginManager().apply(JavaPlugin.class);

project.getGradle().getSharedServices().registerIfAbsent("forcedPropertiesService", ForcedPropertieBuildService.class,
spec -> {
});

registerModel();

// register extension
Expand All @@ -156,7 +152,11 @@ public void apply(Project project) {

private void registerTasks(Project project, QuarkusPluginExtension quarkusExt) {
TaskContainer tasks = project.getTasks();

String forcedPropertiesService = String.format("forcedPropertiesService-%s", project.getName());
Provider<ForcedPropertieBuildService> serviceProvider = project.getGradle().getSharedServices().registerIfAbsent(
forcedPropertiesService, ForcedPropertieBuildService.class,
spec -> {
});
final String devRuntimeConfigName = ApplicationDeploymentClasspathBuilder
.getBaseRuntimeConfigName(LaunchMode.DEVELOPMENT);
final Configuration devRuntimeDependencies = project.getConfigurations().maybeCreate(devRuntimeConfigName);
Expand Down Expand Up @@ -236,14 +236,14 @@ private void registerTasks(Project project, QuarkusPluginExtension quarkusExt) {
});
tasks.register(QUARKUS_SHOW_EFFECTIVE_CONFIG_TASK_NAME,
QuarkusShowEffectiveConfig.class, task -> {
configureQuarkusBuildTask(project, quarkusExt, task, quarkusBuildAppModelTask);
configureQuarkusBuildTask(project, task, quarkusBuildAppModelTask, serviceProvider);
task.setDescription("Show effective Quarkus build configuration.");
});

TaskProvider<QuarkusBuildDependencies> quarkusBuildDependencies = tasks.register(QUARKUS_BUILD_DEP_TASK_NAME,
QuarkusBuildDependencies.class,
task -> {
configureQuarkusBuildTask(project, quarkusExt, task, quarkusBuildAppModelTask);
configureQuarkusBuildTask(project, task, quarkusBuildAppModelTask, serviceProvider);

task.getOutputs().doNotCacheIf("Dependencies are never cached", t -> true);
task.getApplicationModel()
Expand All @@ -256,7 +256,7 @@ private void registerTasks(Project project, QuarkusPluginExtension quarkusExt) {
TaskProvider<QuarkusBuildCacheableAppParts> quarkusBuildCacheableAppParts = tasks.register(
QUARKUS_BUILD_APP_PARTS_TASK_NAME,
QuarkusBuildCacheableAppParts.class, task -> {
configureQuarkusBuildTask(project, quarkusExt, task, quarkusBuildAppModelTask);
configureQuarkusBuildTask(project, task, quarkusBuildAppModelTask, serviceProvider);
task.dependsOn(quarkusGenerateCode);
task.getOutputs().doNotCacheIf(
"Not adding uber-jars, native binaries and mutable-jar package type to Gradle " +
Expand All @@ -272,7 +272,7 @@ public boolean isSatisfiedBy(Task t) {
});

TaskProvider<QuarkusBuild> quarkusBuild = tasks.register(QUARKUS_BUILD_TASK_NAME, QuarkusBuild.class, build -> {
configureQuarkusBuildTask(project, quarkusExt, build, quarkusBuildAppModelTask);
configureQuarkusBuildTask(project, build, quarkusBuildAppModelTask, serviceProvider);
build.dependsOn(quarkusBuildDependencies, quarkusBuildCacheableAppParts);
build.getOutputs().doNotCacheIf(
"Only collects and combines the outputs of " + QUARKUS_BUILD_APP_PARTS_TASK_NAME + " and "
Expand All @@ -296,7 +296,7 @@ public boolean isSatisfiedBy(Task t) {

tasks.register(IMAGE_BUILD_TASK_NAME, ImageBuild.class, task -> {
task.dependsOn(quarkusRequiredExtension);
configureQuarkusBuildTask(project, quarkusExt, task, quarkusBuildAppModelTask);
configureQuarkusBuildTask(project, task, quarkusBuildAppModelTask, serviceProvider);
task.getBuilderName().set(quarkusRequiredExtension.flatMap(ImageCheckRequirementsTask::getOutputFile));
task.getOutputs().doNotCacheIf("Dependencies are never cached", t -> true);
task.getApplicationModel()
Expand All @@ -306,7 +306,7 @@ public boolean isSatisfiedBy(Task t) {

tasks.register(IMAGE_PUSH_TASK_NAME, ImagePush.class, task -> {
task.dependsOn(quarkusRequiredExtension);
configureQuarkusBuildTask(project, quarkusExt, task, quarkusBuildAppModelTask);
configureQuarkusBuildTask(project, task, quarkusBuildAppModelTask, serviceProvider);
task.getBuilderName().set(quarkusRequiredExtension.flatMap(ImageCheckRequirementsTask::getOutputFile));
task.getOutputs().doNotCacheIf("Dependencies are never cached", t -> true);
task.getApplicationModel()
Expand All @@ -315,7 +315,7 @@ public boolean isSatisfiedBy(Task t) {
});

tasks.register(DEPLOY_TASK_NAME, Deploy.class, task -> {
configureQuarkusBuildTask(project, quarkusExt, task, quarkusBuildAppModelTask);
configureQuarkusBuildTask(project, task, quarkusBuildAppModelTask, serviceProvider);
task.getOutputs().doNotCacheIf("Dependencies are never cached", t -> true);
task.getApplicationModel()
.set(quarkusGenerateAppModelTask.flatMap(QuarkusApplicationModelTask::getApplicationModel));
Expand All @@ -326,7 +326,7 @@ public boolean isSatisfiedBy(Task t) {
quarkusExt);
TaskProvider<QuarkusRun> quarkusRun = tasks.register(QUARKUS_RUN_TASK_NAME, QuarkusRun.class,
build -> {
configureQuarkusBuildTask(project, quarkusExt, build, quarkusBuildAppModelTask);
configureQuarkusBuildTask(project, build, quarkusBuildAppModelTask, serviceProvider);
build.getOutputs().doNotCacheIf("Dependencies are never cached", t -> true);
build.getApplicationModel()
.set(quarkusGenerateAppModelTask.flatMap(QuarkusApplicationModelTask::getApplicationModel));
Expand Down Expand Up @@ -527,10 +527,13 @@ private static void configureApplicationModelTask(Project project, QuarkusApplic
task.getApplicationModel().set(project.getLayout().getBuildDirectory().file(quarkusModelFile));
}

private static void configureQuarkusBuildTask(Project project, QuarkusPluginExtension quarkusExt, QuarkusBuildTask task,
TaskProvider<QuarkusApplicationModelTask> quarkusGenerateAppModelTask) {
private static void configureQuarkusBuildTask(Project project, QuarkusBuildTask task,
TaskProvider<QuarkusApplicationModelTask> quarkusGenerateAppModelTask,
Provider<ForcedPropertieBuildService> serviceProvider) {
task.getApplicationModel().set(quarkusGenerateAppModelTask.flatMap(QuarkusApplicationModelTask::getApplicationModel));
SourceSet mainSourceSet = getSourceSet(project, SourceSet.MAIN_SOURCE_SET_NAME);
task.getAdditionalForcedProperties().set(serviceProvider);
task.usesService(serviceProvider);
task.setCompileClasspath(mainSourceSet.getCompileClasspath().plus(mainSourceSet.getRuntimeClasspath())
.plus(mainSourceSet.getAnnotationProcessorPath())
.plus(mainSourceSet.getResources()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
import org.gradle.api.file.RegularFileProperty;
import org.gradle.api.logging.LogLevel;
import org.gradle.api.provider.Property;
import org.gradle.api.services.ServiceReference;
import org.gradle.api.tasks.Classpath;
import org.gradle.api.tasks.Input;
import org.gradle.api.tasks.InputFile;
import org.gradle.api.tasks.Internal;
import org.gradle.api.tasks.Nested;
import org.gradle.api.tasks.PathSensitive;
import org.gradle.api.tasks.PathSensitivity;
Expand Down Expand Up @@ -48,8 +48,8 @@ public abstract class QuarkusBuildTask extends QuarkusTask {
static final String NATIVE_SOURCES = "native-sources";
private final QuarkusPluginExtensionView extensionView;

@ServiceReference("forcedPropertiesService")
abstract Property<ForcedPropertieBuildService> getAdditionalForcedProperties();
@Internal
public abstract Property<ForcedPropertieBuildService> getAdditionalForcedProperties();

QuarkusBuildTask(String description, boolean compatible) {
super(description, compatible);
Expand Down Expand Up @@ -272,7 +272,7 @@ void generateBuild() {
.collect(Collectors.joining("\n ", "\n ", "")));
}

WorkQueue workQueue = workQueue(quarkusProperties, getExtensionView().getCodeGenForkOptions().get());
WorkQueue workQueue = workQueue(quarkusProperties, getExtensionView().getBuildForkOptions().get());

workQueue.submit(BuildWorker.class, params -> {
params.getBuildSystemProperties()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public QuarkusPluginExtensionView(Project project, QuarkusPluginExtension extens
getCleanupBuildOutput().set(extension.getCleanupBuildOutput());
getFinalName().set(extension.getFinalName());
getCodeGenForkOptions().set(getProviderFactory().provider(() -> extension.codeGenForkOptions));
getBuildForkOptions().set(getProviderFactory().provider(() -> extension.buildForkOptions));
getIgnoredEntries().set(extension.ignoredEntriesProperty());
getMainResources().setFrom(project.getExtensions().getByType(SourceSetContainer.class).getByName(MAIN_SOURCE_SET_NAME)
.getResources().getSourceDirectories());
Expand Down Expand Up @@ -127,6 +128,9 @@ private Provider<Map<String, String>> getQuarkusRelevantProjectProperties(Projec
@Nested
public abstract ListProperty<Action<? super JavaForkOptions>> getCodeGenForkOptions();

@Nested
public abstract ListProperty<Action<? super JavaForkOptions>> getBuildForkOptions();

@Input
@Optional
public abstract Property<Boolean> getJarEnabled();
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/asciidoc/dev-ui.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -922,7 +922,7 @@ public JsonArray getAll() { // <2>
<1> This example runs nonblocking. We could also return `Uni<JsonArray>`
<2> The method name `getAll` will be available in the Javascript

https://github.com/quarkusio/quarkus/blob/main/extensions/cache/runtime/src/main/java/io/quarkus/cache/runtime/devconsole/CacheJsonRPCService.java[Example code]
https://github.com/quarkusio/quarkus/blob/main/extensions/cache/runtime/src/main/java/io/quarkus/cache/runtime/devui/CacheJsonRPCService.java[Example code]

*Webcomponent (Javascript) part*

Expand Down
Loading

0 comments on commit 0ff22e4

Please sign in to comment.