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

Qute - message bundles: skip unnecessary build steps #37860

Merged
merged 1 commit into from
Dec 20, 2023
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,10 @@ void validateMessageBundleMethods(TemplatesAnalysisBuildItem templatesAnalysis,
List<TemplateGlobalBuildItem> templateGlobals,
BuildProducer<IncorrectExpressionBuildItem> incorrectExpressions) {

if (messageBundleMethods.isEmpty()) {
return;
}

Map<String, MessageBundleMethodBuildItem> bundleMethods = messageBundleMethods.stream()
.filter(MessageBundleMethodBuildItem::isValidatable)
.collect(Collectors.toMap(MessageBundleMethodBuildItem::getTemplateId, Function.identity()));
Expand Down Expand Up @@ -438,6 +442,10 @@ void validateMessageBundleMethodsInTemplates(TemplatesAnalysisBuildItem analysis
QuteConfig config,
List<TemplateGlobalBuildItem> globals) {

if (messageBundles.isEmpty()) {
return;
}

IndexView index = beanArchiveIndex.getIndex();
Function<String, String> templateIdToPathFun = new Function<String, String>() {
@Override
Expand Down Expand Up @@ -630,6 +638,9 @@ public String apply(String id) {
@BuildStep(onlyIf = IsNormal.class)
void generateExamplePropertiesFiles(List<MessageBundleMethodBuildItem> messageBundleMethods,
BuildSystemTargetBuildItem target, BuildProducer<GeneratedResourceBuildItem> dummy) throws IOException {
if (messageBundleMethods.isEmpty()) {
return;
}
Map<String, List<MessageBundleMethodBuildItem>> bundles = new HashMap<>();
for (MessageBundleMethodBuildItem messageBundleMethod : messageBundleMethods) {
if (messageBundleMethod.isDefaultBundle()) {
Expand Down