Skip to content

Commit

Permalink
Code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
joschi committed Nov 29, 2024
1 parent 369adff commit ceb94c1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -528,16 +528,15 @@ private static void configureQuarkusBuildTask(Project project, QuarkusBuildTask
.plus(mainSourceSet.getAnnotationProcessorPath())
.plus(mainSourceSet.getResources()));

Provider<JavaToolchainSpec> toolchainOverrideSpec = project.provider(() ->
GradleUtils.getExecutableOverrideToolchainSpec(project.getObjects()));
Provider<JavaToolchainSpec> toolchainOverrideSpec = project
.provider(() -> GradleUtils.getExecutableOverrideToolchainSpec(project.getObjects()));
task.getJavaLauncher().convention(getToolchainTool(project, JavaToolchainService::launcherFor, toolchainOverrideSpec));
}

private static <T> Provider<T> getToolchainTool(
Project project,
BiFunction<JavaToolchainService, JavaToolchainSpec, Provider<T>> toolMapper,
Provider<JavaToolchainSpec> toolchainOverride
) {
Provider<JavaToolchainSpec> toolchainOverride) {
JavaToolchainService service = project.getExtensions().getByType(JavaToolchainService.class);
JavaPluginExtension extension = project.getExtensions().getByType(JavaPluginExtension.class);
return toolchainOverride.orElse(extension.getToolchain())
Expand All @@ -556,8 +555,8 @@ private static void configureGenerateCodeTask(Project project, QuarkusGenerateCo
.set(applicationModelTaskTaskProvider.flatMap(QuarkusApplicationModelTask::getApplicationModel));
task.getGeneratedOutputDirectory().set(generatedSources.getJava().getClassesDirectory());

Provider<JavaToolchainSpec> toolchainOverrideSpec = project.provider(() ->
GradleUtils.getExecutableOverrideToolchainSpec(project.getObjects()));
Provider<JavaToolchainSpec> toolchainOverrideSpec = project
.provider(() -> GradleUtils.getExecutableOverrideToolchainSpec(project.getObjects()));
task.getJavaLauncher().convention(getToolchainTool(project, JavaToolchainService::launcherFor, toolchainOverrideSpec));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ public abstract class QuarkusTask extends DefaultTask {
Provider<JavaLauncher> javaLauncherConvention = getProviderFactory()
.provider(() -> GradleUtils.getExecutableOverrideToolchainSpec(objectFactory))
.flatMap(javaToolchainService::launcherFor)
.orElse(javaToolchainService.launcherFor(it -> {}));
.orElse(javaToolchainService.launcherFor(it -> {
}));
this.javaLauncher = objectFactory.property(JavaLauncher.class).convention(javaLauncherConvention);

// Calling this method tells Gradle that it should not fail the build. Side effect is that the configuration
Expand Down

0 comments on commit ceb94c1

Please sign in to comment.