Skip to content

Commit

Permalink
Put lombok as first annotation processor
Browse files Browse the repository at this point in the history
Put lombok as first annotation processor
commit_hash:98ef8e4f337ec15fafdfb3fe19f6bd53518b0382
  • Loading branch information
dimdim1177 committed Feb 7, 2025
1 parent e1b6091 commit 13e6b98
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions build/export_generators/ide-gradle/dependencies.jinja
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
{%- macro AnnotationProcessors(funcName, annotation_processors) -%}
{%- if annotation_processors|length -%}
{%- set lomboks = annotation_processors|select('startsWith', 'contrib/java/org/projectlombok/lombok') -%}
{%- for lombok in lomboks %}
{{ funcName }}(files("$project_root/{{ lombok }}"))
{%- endfor -%}
{%- set annotation_processors = annotation_processors|reject('in', lomboks) -%}
{%- for annotation_processor in annotation_processors %}
{{ funcName }}(files("$project_root/{{ annotation_processor }}"))
{%- endfor -%}
{%- endif -%}
{%- endmacro -%}
{#- empty string #}
dependencies {
{%- for library in target.consumer if library.classpath -%}
Expand Down Expand Up @@ -36,9 +48,7 @@ dependencies {
{%- endif -%}
{%- endfor -%}

{%- for annotation_processor in target.use_annotation_processor %}
annotationProcessor(files("$project_root/{{ annotation_processor}}"))
{%- endfor -%}
{{ AnnotationProcessors("annotationProcessor", target.use_annotation_processor) }}

{%- for extra_target in extra_targets -%}
{%- for library in extra_target.consumer if library.classpath -%}
Expand All @@ -64,8 +74,6 @@ dependencies {
{%- endif -%}
{%- endif -%}
{%- endfor -%}
{%- for annotation_processor in extra_target.use_annotation_processor %}
testAnnotationProcessor(files("$project_root/{{ annotation_processor}}"))
{%- endfor -%}
{{ AnnotationProcessors("testAnnotationProcessor", extra_target.use_annotation_processor) }}
{%- endfor %}
}

0 comments on commit 13e6b98

Please sign in to comment.