1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
{%- set all_targets = [] -%}
{%- if target is defined -%}
{%- set all_targets = all_targets + [target] -%}
{%- endif -%}
{%- if extra_targets|length -%}
{%- set all_targets = all_targets + extra_targets -%}
{%- endif -%}
{%- set publish = all_targets|selectattr('publish', 'eq', true)|length -%}
{#- Kotlin -#}
{%- set with_kotlin = all_targets|selectattr('with_kotlin', 'eq', true)|length -%}
{%- if with_kotlin -%}
{%- set kotlin_version = all_targets|selectattr('kotlin_version')|map(attribute='kotlin_version')|first -%}
{%- set with_kotlinc_plugin_allopen = all_targets|selectattr('with_kotlinc_plugin_allopen')|map(attribute='with_kotlinc_plugin_allopen')|sum -%}
{%- set with_kotlinc_plugin_noarg = all_targets|selectattr('with_kotlinc_plugin_noarg')|map(attribute='with_kotlinc_plugin_noarg')|sum -%}
{#- KAPT -#}
{%- set with_kapt = target.with_kapt -%}
{%- set with_test_kapt = extra_targets|selectattr('with_kapt', 'eq', true)|map(attribute='with_kapt')|length -%}
{%- endif -%}
{#- ErrorProne -#}
{%- set with_errorprone = not(disable_errorprone) and (target.use_errorprone) and (target.consumer|selectattr('jar', 'startsWith', 'contrib/java/com/google/errorprone/error_prone_annotations')|length) -%}
{%- set with_test_errorprone = not(disable_errorprone) and (extra_targets|selectattr('use_errorprone', 'eq', true)|length) and (extra_targets|selectattr('consumer')|map(attribute='consumer')|sum|selectattr('jar', 'startsWith', 'contrib/java/com/google/errorprone/error_prone_annotations')|length) -%}
{%- if with_errorprone or with_test_errorprone -%}
{%- set errorprones = all_targets|selectattr('consumer')|map(attribute='consumer')|sum|selectattr('classpath')|selectattr('jar', 'startsWith', 'contrib/java/com/google/errorprone/error_prone_annotations')|unique -%}
{%- endif -%}
{%- include "[generator]/jdk.jinja" -%}
|