Skip to content

Commit 877eef3

Browse files
committed
Merge pull request #14243 from ydb-platform/merge-libs-250206-0050
2 parents 60b0993 + 25f0f29 commit 877eef3

File tree

348 files changed

+4615
-39941
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

348 files changed

+4615
-39941
lines changed

build/conf/java.conf

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,7 @@ module EXTERNAL_JAVA_LIBRARY: _BASE_UNIT {
357357
PEERDIR+=$JDK_RESOURCE_PEERDIR $EXTERNAL_JAVA_EXTRA_PEERDIR
358358
when ($KOTLIN_PROTO == "yes") {
359359
PEERDIR+=build/platform/java/kotlin contrib/java/org/jetbrains/kotlin/kotlin-stdlib-jdk8/${_KOTLIN_VERSION}
360+
_WITH_KOTLIN_PROTO_SEM=$_DO_WITH_KOTLIN_PROTO_SEM
360361
}
361362

362363
when ($MAVEN_EXPORT == "yes") {
@@ -2017,6 +2018,7 @@ DETEKT_VERSION=1.23.7
20172018
_KOTLIN_SEM= \
20182019
${_WITH_KOTLIN_SEM} \
20192020
${_KOTLIN_VERSION_SEM} \
2021+
${_WITH_KOTLIN_PROTO_SEM} \
20202022
${_WITH_KOTLIN_GRPC_SEM} \
20212023
${_WITH_KOTLINC_PLUGIN_ALLOPEN_SEM} \
20222024
${_WITH_KOTLINC_PLUGIN_LOMBOK_SEM} \
@@ -2092,17 +2094,8 @@ macro JAVA_DEPENDENCIES_CONFIGURATION(Args...) {
20922094
}
20932095

20942096
# tag:java-specific
2095-
JAR_INCLUDE_FILTER_VALUE=
20962097
JAR_EXCLUDE_FILTER_VALUE=
20972098

2098-
# tag:java-specific
2099-
### @usage: JAR_INCLUDE(Filters...)
2100-
### Filter .jar file content: keep only matched files
2101-
### * and ** patterns are supported (like JAVA_SRCS)
2102-
macro JAR_INCLUDE(Filters...) {
2103-
SET_APPEND(JAR_INCLUDE_FILTER_VALUE $Filters)
2104-
}
2105-
21062099
# tag:java-specific
21072100
### @usage: JAR_EXCLUDE(Filters...)
21082101
### Filter .jar file content: remove matched files

build/conf/proto.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -674,6 +674,8 @@ module _CPP_PROTO : LIBRARY {
674674
}
675675
}
676676

677+
_WITH_KOTLIN_PROTO_SEM=
678+
_DO_WITH_KOTLIN_PROTO_SEM=&& with_kotlin && kotlin_version ${_KOTLIN_VERSION} && proto_kotlin
677679
module _JAVA_PROTO: EXTERNAL_JAVA_LIBRARY {
678680
.EXTS=.jsrc
679681
.ALLOWED=GRPC
@@ -685,6 +687,7 @@ module _JAVA_PROTO: EXTERNAL_JAVA_LIBRARY {
685687
when ($KOTLIN_PROTO == "yes") {
686688
KOTLIN_PROTO_PEERS=contrib/java/com/google/protobuf/protobuf-kotlin/${JAVA_PROTO_RUNTIME_VERSION}
687689
KOTLIN_PROTO_FLAGS=--kotlin_out=$ARCADIA_BUILD_ROOT/java_out
690+
_WITH_KOTLIN_PROTO_SEM=$_DO_WITH_KOTLIN_PROTO_SEM
688691
}
689692
when ($GRADLE_EXPORT_PUBLISHING == "yes") {
690693
_GRADLE_EXPORT_PUBLISHING_SEM=$_DO_GRADLE_EXPORT_PUBLISHING_SEM

build/conf/settings.conf

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,6 @@ _FOLDABLE_VARS=\
125125

126126
# end of _FOLDABLE_VARS list
127127

128-
_MODULE_SCOPE_ONLY_VARS=PIC
129-
130128
ARCADIA_TEST_ROOT=../arcadia_tests_data/
131129
DEFAULT_REQUIREMENTS=network:restricted cpu:1 ram:32
132130

build/export_generators/gradle/generator.toml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ add_vcs_info_to_mf="bool"
2525
junit4_test="flag"
2626
junit5_test="flag"
2727
app_main_class="str"
28+
jar_source_set="list"
2829
enable_preview="flag"
2930
use_annotation_processor="list"
3031
use_errorprone="flag"
@@ -43,6 +44,9 @@ proto_common_version="str"
4344

4445
proto_grpc="flag"
4546
proto_grpc_version="str"
47+
proto_kotlin="flag"
48+
proto_kotlin_grpc="flag"
49+
proto_kotlin_grpc_version="str"
4650

4751
kotlin_version="str"
4852
with_kotlin="flag"
@@ -51,6 +55,27 @@ with_kotlinc_plugin_lombok="set"
5155
with_kotlinc_plugin_noarg="set"
5256
with_kotlinc_plugin_serialization="set"
5357

58+
runs="list"
59+
runs-args="list"
60+
runs-classpath="list"
61+
runs-cwd="str"
62+
runs-in="list"
63+
runs-in_dir="list"
64+
runs-in_dirs_inputs="list"
65+
runs-in_noparse="list"
66+
runs-out="list"
67+
runs-out_dir="list"
68+
runs-tool="list"
69+
70+
custom_runs="list"
71+
custom_runs-depends="list"
72+
custom_runs-env="list"
73+
custom_runs-command="list"
74+
custom_runs-outputs="list"
75+
custom_runs-cwd="str"
76+
77+
javac-flags="list"
78+
5479
[attrs.root]
5580

5681
[attrs.dir]

build/export_generators/ide-gradle/generator.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ proto_common_version="str"
4747

4848
proto_grpc="flag"
4949
proto_grpc_version="str"
50+
proto_kotlin="flag"
5051
proto_kotlin_grpc="flag"
5152
proto_kotlin_grpc_version="str"
5253

build/export_generators/ide-gradle/proto_plugins.jinja

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
{#- empty string #}
22
plugins {
33
id("java-library")
4-
id("com.google.protobuf") version "0.8.19"
4+
id("com.google.protobuf") version "0.9.4"
55
{%- if publish %}
66
`maven-publish`
77
`signing`
88
{%- endif %}
9+
{%- if with_kotlin and kotlin_version %}
10+
kotlin("jvm") version "{{ kotlin_version }}"
11+
{%- endif %}
912
}
1013

1114
{%- if jdk_version %}

build/export_generators/ide-gradle/proto_prepare.jinja

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{#- empty string #}
2+
{%- if target.proto_files|length %}
23
val prepareMainProtos = tasks.register<Copy>("prepareMainProtos") {
34
from("$project_root") {
45
{#- list of all current project proto files -#}
@@ -8,6 +9,7 @@ val prepareMainProtos = tasks.register<Copy>("prepareMainProtos") {
89
}
910
into(mainProtosDir)
1011
}
12+
{%- endif %}
1113

1214
{% if libraries|length -%}
1315
val extractMainLibrariesProtos = tasks.register<Copy>("extractMainLibrariesProtos") {
@@ -23,10 +25,15 @@ val extractMainLibrariesProtos = tasks.register<Copy>("extractMainLibrariesProto
2325

2426
{% endif -%}
2527
afterEvaluate {
28+
{%- if target.proto_files|length %}
2629
tasks.getByName("extractProto").dependsOn(prepareMainProtos)
30+
{%- endif %}
2731
{%- if libraries|length %}
2832
tasks.getByName("extractProto").dependsOn(extractMainLibrariesProtos)
2933
{%- endif %}
3034
}
3135

3236
tasks.getByName("sourcesJar").dependsOn("generateProto")
37+
{%- if with_kotlin %}
38+
tasks.getByName("compileKotlin").dependsOn("generateProto")
39+
{%- endif %}
Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{#- empty string #}
22
sourceSets {
33
main {
4-
java.srcDir("$buildDir/generated/sources/proto/main/java")
4+
java.srcDir("$buildDir/generated/source/proto/main/java")
55
{%- if target.proto_grpc %}
6-
java.srcDir("$buildDir/generated/sources/proto/main/grpc")
6+
java.srcDir("$buildDir/generated/source/proto/main/grpc")
77
{%- endif %}
88
}
99
test {
10-
java.srcDir("$buildDir/generated/sources/proto/test/java")
10+
java.srcDir("$buildDir/generated/source/proto/test/java")
1111
{%- if target.proto_grpc %}
12-
java.srcDir("$buildDir/generated/sources/proto/test/grpc")
12+
java.srcDir("$buildDir/generated/source/proto/test/grpc")
1313
{%- endif %}
1414
}
1515
}
@@ -20,3 +20,7 @@ sourceSets {
2020
sourceSets.main.java.srcDirs += "{{ srcdir_glob[0] }}"
2121
{% endfor -%}
2222
{%- endif %}
23+
24+
tasks.withType<Jar>() {
25+
duplicatesStrategy = DuplicatesStrategy.INCLUDE
26+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
{%- set publish = target.publish -%}
22
{%- set libraries = target.consumer|selectattr('type', 'eq', 'library') -%}
3+
{%- set with_kotlin = target.with_kotlin -%}
4+
{%- set kotlin_version = target.kotlin_version -%}
35

46
{%- include "[generator]/jdk.jinja" -%}

build/export_generators/ide-gradle/protobuf.jinja

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
{#- empty string #}
22
protobuf {
3-
generatedFilesBaseDir = "$buildDir/generated/sources/proto"
4-
53
protoc {
64
// Download from repositories
75
artifact = "com.google.protobuf:protoc:{%- if target.proto_compiler_version -%}{{ target.proto_compiler_version }}{%- else -%}3.22.5{%- endif -%}"
@@ -18,16 +16,21 @@ protobuf {
1816
}
1917
{%- endif %}
2018
}
19+
{%- endif %}
20+
21+
{%- if target.proto_kotlin or target.proto_grpc %}
2122

2223
generateProtoTasks {
2324
all().forEach {
25+
{%- if target.proto_grpc %}
2426
it.plugins {
2527
id("grpc")
26-
{%- if target.proto_kotlin_grpc %}
28+
{%- if target.proto_kotlin_grpc %}
2729
id("grpckt")
28-
{%- endif %}
30+
{%- endif %}
2931
}
30-
{%- if target.proto_kotlin_grpc %}
32+
{%- endif %}
33+
{%- if target.proto_kotlin or target.proto_kotlin_grpc %}
3134
it.builtins {
3235
create("kotlin")
3336
}

0 commit comments

Comments
 (0)