aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authordimdim11 <dimdim11@yandex-team.com>2024-12-10 21:17:31 +0300
committerdimdim11 <dimdim11@yandex-team.com>2024-12-10 22:18:37 +0300
commit62a2452b75529b0140920a53f0cdda19a207df50 (patch)
treeffdf3dcd1f9f4e1ded2450b34370eb732a9335be /build
parentdbbdb649150e00878fcc21ad1ea99052aca804c7 (diff)
downloadydb-62a2452b75529b0140920a53f0cdda19a207df50.tar.gz
Flag of using errorprone
Flag of using errorprone commit_hash:e1d5b2a21907aa1ebc1886fa51184da2a1c9dbf1
Diffstat (limited to 'build')
-rw-r--r--build/conf/java.conf4
-rw-r--r--build/export_generators/gradle/generator.toml1
-rw-r--r--build/export_generators/ide-gradle/generator.toml1
-rw-r--r--build/export_generators/ide-gradle/vars.jinja2
4 files changed, 7 insertions, 1 deletions
diff --git a/build/conf/java.conf b/build/conf/java.conf
index 103c98f064..6744e2abea 100644
--- a/build/conf/java.conf
+++ b/build/conf/java.conf
@@ -988,6 +988,7 @@ BUILD_JAR_SEM= \
$_GRADLE_EXPORT_PUBLISHING_SEM \
$_ANN_PROCESSORS_SEM \
$_USE_ANNOTATION_PROCESSOR_SEM \
+ $_USE_ERROR_PRONE_SEM \
$_ENABLE_PREVIEW_SEM \
$SEM_JAR_SOURCE_SET
@@ -1001,6 +1002,7 @@ BUILD_PROTO_JAR_SEM= \
$_JAVAC_SEM \
$_ANN_PROCESSORS_SEM \
$_USE_ANNOTATION_PROCESSOR_SEM \
+ $_USE_ERROR_PRONE_SEM \
$_ENABLE_PREVIEW_SEM \
$_KOTLIN_SEM
@@ -1527,11 +1529,13 @@ macro CHECK_JAVA_DEPS(Arg) {
}
ERROR_PRONE_VALUE=
+_USE_ERROR_PRONE_SEM=
### @usage: USE_ERROR_PRONE()
###
### Use errorprone instead of javac for .java compilation.
macro USE_ERROR_PRONE() {
SET(ERROR_PRONE_VALUE yes)
+ SET(_USE_ERROR_PRONE_SEM && use_errorprone)
}
# tag:java-specific
diff --git a/build/export_generators/gradle/generator.toml b/build/export_generators/gradle/generator.toml
index bccc600a73..aeb7ccaf4b 100644
--- a/build/export_generators/gradle/generator.toml
+++ b/build/export_generators/gradle/generator.toml
@@ -27,6 +27,7 @@ junit5_test="flag"
app_main_class="str"
enable_preview="flag"
use_annotation_processor="list"
+use_errorprone="flag"
publish="flag"
publish_group="str"
diff --git a/build/export_generators/ide-gradle/generator.toml b/build/export_generators/ide-gradle/generator.toml
index 4bd8f5947f..2ca73ff555 100644
--- a/build/export_generators/ide-gradle/generator.toml
+++ b/build/export_generators/ide-gradle/generator.toml
@@ -31,6 +31,7 @@ app_main_class="str"
jar_source_set="list"
enable_preview="flag"
use_annotation_processor="list"
+use_errorprone="flag"
publish="flag"
publish_group="str"
diff --git a/build/export_generators/ide-gradle/vars.jinja b/build/export_generators/ide-gradle/vars.jinja
index 1f4cea76d0..b83c0dfac2 100644
--- a/build/export_generators/ide-gradle/vars.jinja
+++ b/build/export_generators/ide-gradle/vars.jinja
@@ -3,7 +3,7 @@
{%- set with_kotlin = target.with_kotlin -%}
{%- set kotlin_version = target.kotlin_version -%}
{%- set has_junit5_test = extra_targets|selectattr('junit5_test') -%}
-{%- set has_errorprone = target.consumer|selectattr('jar', 'startsWith', 'contrib/java/com/google/errorprone/error_prone_annotations')|length -%}
+{%- set has_errorprone = target.use_errorprone and not disable_errorprone -%}
{%- if not target.required_jdk -%}
{%- set has_required_jdk = false -%}