diff options
author | dimdim11 <dimdim11@yandex-team.com> | 2024-02-22 10:03:53 +0300 |
---|---|---|
committer | dimdim11 <dimdim11@yandex-team.com> | 2024-02-22 10:20:19 +0300 |
commit | 1f5e61d528eeb8d4b6dc87e641fa2aa308b290fc (patch) | |
tree | f65d2301a73830bab3a6c20cb95e33ee38e7ef0c | |
parent | 7bfc8a0be15ff13501d15a957e71192bedcd730b (diff) | |
download | ydb-1f5e61d528eeb8d4b6dc87e641fa2aa308b290fc.tar.gz |
Refactor with_kotlin(c) from bool to flags
Refactor with_kotlin(c) from bool to flags
4f48002306b62eb54db67dec6e06a31eb667af8a
-rw-r--r-- | build/conf/java.conf | 24 | ||||
-rw-r--r-- | build/export_generators/gradle/generator.toml | 10 | ||||
-rw-r--r-- | build/export_generators/ide-gradle/generator.toml | 10 |
3 files changed, 28 insertions, 16 deletions
diff --git a/build/conf/java.conf b/build/conf/java.conf index 671206c8992..2e5f11cf5e5 100644 --- a/build/conf/java.conf +++ b/build/conf/java.conf @@ -1774,11 +1774,15 @@ macro WITH_JDK() { # tag:kotlin-specific WITH_KOTLIN_VALUE= +_WITH_KOTLIN_SEM= +_KOTLIN_VERSION_SEM= ### @usage: WITH_KOTLIN() ### ### Compile kotlin source code in this java module macro WITH_KOTLIN() { SET(WITH_KOTLIN_VALUE yes) + SET(_WITH_KOTLIN_SEM && with_kotlin) + SET(_KOTLIN_VERSION_SEM && kotlin_version ${KOTLIN_VERSION}) } # tag:kotlin-specific @@ -1810,9 +1814,11 @@ macro KOTLINC_FLAGS(Args...) { # tag:kotlin-sppecific WITH_KOTLINC_PLUGIN_ALLOPEN= +_WITH_KOTLINC_PLUGIN_ALLOPEN_SEM= macro _WITH_KOTLINC_ALLOPEN(Options...) { SET_APPEND(KOTLINC_OPTS_VALUE ${pre=-P plugin\:org.jetbrains.kotlin.allopen\::Options}) SET(WITH_KOTLINC_PLUGIN_ALLOPEN yes) + SET(_WITH_KOTLINC_ALLOPEN_SEM && with_kotlinc_plugin_allopen) } # tag:kotlin-specific @@ -1826,31 +1832,37 @@ macro WITH_KOTLINC_ALLOPEN(HEAD, TAIL...) { # tag:kotlin-specific WITH_KOTLINC_PLUGIN_LOMBOK= +_WITH_KOTLINC_PLUGIN_LOMBOK_SEM= ### @usage: WITH_KOTLINC_LOMBOK(-flags) ### ### Enable lombok kotlin compiler plugin https://kotlinlang.org/docs/lombok.html macro WITH_KOTLINC_LOMBOK(Options...) { SET_APPEND(KOTLINC_OPTS_VALUE ${pre=-P plugin\:org.jetbrains.kotlin.lombok\::Options}) SET(WITH_KOTLINC_PLUGIN_LOMBOK yes) + SET(_WITH_KOTLINC_PLUGIN_LOMBOK_SEM && with_kotlinc_plugin_lombok) } # tag:kotlin-specific WITH_KOTLINC_PLUGIN_NOARG= +_WITH_KOTLINC_PLUGIN_NOARG_SEM= ### @usage: WITH_KOTLINC_NOARG(-flags) ### ### Enable noarg kotlin compiler plugin https://kotlinlang.org/docs/no-arg-plugin.html macro WITH_KOTLINC_NOARG(Options...) { SET_APPEND(KOTLINC_OPTS_VALUE ${pre=-P plugin\:org.jetbrains.kotlin.noarg\::Options}) SET(WITH_KOTLINC_PLUGIN_NOARG yes) + SET(_WITH_KOTLINC_PLUGIN_NOARG_SEM && with_kotlinc_plugin_noarg) } # tag:kotlin-specific WITH_KOTLINC_PLUGIN_SERIALIZATION= +_WITH_KOTLINC_PLUGIN_SERIALIZATION_SEM= ### @usage: WITH_KOTLINC_SERIALIZATION() ### ### Enable serialization kotlin compiler plugin https://kotlinlang.org/docs/serialization.html macro WITH_KOTLINC_SERIALIZATION() { SET(WITH_KOTLINC_PLUGIN_SERIALIZATION yes) + SET(_WITH_KOTLINC_PLUGIN_SERIALIZATION_SEM && with_kotlinc_plugin_serialization) } # tag:kotlin-specific @@ -1860,12 +1872,12 @@ KOTLIN_BOM_FILE=${ARCADIA_ROOT}/contrib/java/org/jetbrains/kotlin/kotlin-bom/1.9 GROOVY_VERSION=3.0.5 _KOTLIN_SEM= \ - && kotlin_version ${KOTLIN_VERSION} \ - && with_kotlin ${WITH_KOTLIN_VALUE} \ - && with_kotlinc_plugin_allopen ${WITH_KOTLINC_PLUGIN_ALLOPEN} \ - && with_kotlinc_plugin_lombok ${WITH_KOTLINC_PLUGIN_LOMBOK} \ - && with_kotlinc_plugin_noarg ${WITH_KOTLINC_PLUGIN_NOARG} \ - && with_kotlinc_plugin_serialization ${WITH_KOTLINC_PLUGIN_SERIALIZATION} + ${_WITH_KOTLIN_SEM} \ + ${_KOTLIN_VERSION_SEM} \ + ${_WITH_KOTLINC_PLUGIN_ALLOPEN_SEM} \ + ${_WITH_KOTLINC_PLUGIN_LOMBOK_SEM} \ + ${_WITH_KOTLINC_PLUGIN_NOARG_SEM} \ + ${_WITH_KOTLINC_PLUGIN_SERIALIZATION_SEM} _JAVA_PROTO_GRPC_SEM= diff --git a/build/export_generators/gradle/generator.toml b/build/export_generators/gradle/generator.toml index daff4c19e25..ada3193233c 100644 --- a/build/export_generators/gradle/generator.toml +++ b/build/export_generators/gradle/generator.toml @@ -37,11 +37,11 @@ proto_grpc="flag" proto_grpc_version="str" kotlin_version="str" -with_kotlin="bool" -with_kotlinc_plugin_allopen="bool" -with_kotlinc_plugin_lombok="bool" -with_kotlinc_plugin_noarg="bool" -with_kotlinc_plugin_serialization="bool" +with_kotlin="flag" +with_kotlinc_plugin_allopen="flag" +with_kotlinc_plugin_lombok="flag" +with_kotlinc_plugin_noarg="flag" +with_kotlinc_plugin_serialization="flag" [attrs.root] diff --git a/build/export_generators/ide-gradle/generator.toml b/build/export_generators/ide-gradle/generator.toml index 8f914d1a4cc..772a2626322 100644 --- a/build/export_generators/ide-gradle/generator.toml +++ b/build/export_generators/ide-gradle/generator.toml @@ -39,11 +39,11 @@ proto_grpc="flag" proto_grpc_version="str" kotlin_version="str" -with_kotlin="bool" -with_kotlinc_plugin_allopen="bool" -with_kotlinc_plugin_lombok="bool" -with_kotlinc_plugin_noarg="bool" -with_kotlinc_plugin_serialization="bool" +with_kotlin="flag" +with_kotlinc_plugin_allopen="flag" +with_kotlinc_plugin_lombok="flag" +with_kotlinc_plugin_noarg="flag" +with_kotlinc_plugin_serialization="flag" runs="list" runs-args="list" |