Skip to content

Commit

Permalink
Merge pull request quarkusio#37860 from mkouba/issue-37783
Browse files Browse the repository at this point in the history
Qute - message bundles: skip unnecessary build steps
  • Loading branch information
mkouba authored Dec 20, 2023
2 parents 4d07a91 + 887b663 commit 4a8200e
Showing 1 changed file with 11 additions and 0 deletions.
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

0 comments on commit 4a8200e

Please sign in to comment.