Skip to content

Commit d348882

Browse files
committed
Merge branch 'rightlib' into merge-libs-250405-0050
2 parents 826d252 + f6a0289 commit d348882

File tree

26 files changed

+488
-99
lines changed

26 files changed

+488
-99
lines changed

build/conf/java.conf

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1051,7 +1051,7 @@ module JAR_LIBRARY: _COMPILABLE_JAR_BASE {
10511051
when ($WITH_KAPT_VALUE == "yes") {
10521052
# For Kapt usage see: https://kotlinlang.org/docs/kapt.html#using-in-cli
10531053
# See for kapt.kotlin.generated: https://github.com/JetBrains/kotlin/blob/master/plugins/kapt3/kapt3-cli/testData/integration/kotlinFileGeneration/build.txt
1054-
_KAPT_OPTS=-Xplugin=${tool:"contrib/java/org/jetbrains/kotlin/kotlin-annotation-processing/2.0.21"} $KT_KAPT_PLUGIN_OPTS
1054+
_KAPT_OPTS=-Xplugin=${tool:"contrib/java/org/jetbrains/kotlin/kotlin-annotation-processing/2.1.20"} $KT_KAPT_PLUGIN_OPTS
10551055
_RUN_KAPT=${YMAKE_PYTHON} ${input:"build/scripts/with_kapt_args.py"} --ap-classpath ${KT_KAPT_AP_CLASSPATH} -- $COMPILE_KT $_KAPT_OPTS
10561056
_APPEND_KAPT_GENERATED_SRCS=$YMAKE_PYTHON3 ${input:"build/scripts/resolve_java_srcs.py"} -d $KT_KAPT_SOURCES_DIR --include-patterns '**/*.java' '**/*.kt' --resolve-kotlin --append -s ${BINDIR}/all-java.srclst -k $KT_SRCLIST -r ${BINDIR}/not-used.txt
10571057

@@ -2035,9 +2035,10 @@ macro WITH_KOTLINC_DETEKT(Options...) {
20352035

20362036
# tag:kotlin-specific
20372037
### Also search for _KAPT_OPTS and change version there
2038-
_KOTLIN_VERSION=2.0.21
2039-
KOTLIN_VERSION=2.0.21
2040-
KOTLIN_BOM_FILE=${ARCADIA_ROOT}/contrib/java/org/jetbrains/kotlin/kotlin-bom/2.0.21/ya.dependency_management.inc
2038+
### change supported jvmTarget in https://a.yandex-team.ru/arcadia/devtools/ya/jbuild/gen/actions/idea.py?rev=r16258919#L668
2039+
_KOTLIN_VERSION=2.1.20
2040+
KOTLIN_VERSION=2.1.20
2041+
KOTLIN_BOM_FILE=${ARCADIA_ROOT}/contrib/java/org/jetbrains/kotlin/kotlin-bom/2.1.20/ya.dependency_management.inc
20412042
DETEKT_VERSION=1.23.7
20422043

20432044
_KOTLIN_SEM= \
@@ -2164,20 +2165,10 @@ KOTLIN_JVM_TARGET=
21642165
when ($JDK_REAL_VERSION == "8") {
21652166
KOTLIN_JVM_TARGET=1.8
21662167
}
2167-
elsewhen ($JDK_REAL_VERSION == "22") {
2168-
# remove when kotlin starts supporting jdk21 bytecode
2169-
# see also devtools/ya/jbuild/gen/actions/idea.py
2170-
KOTLIN_JVM_TARGET=21
2171-
}
2172-
elsewhen ($JDK_REAL_VERSION == "23") {
2173-
# remove when kotlin starts supporting jdk21 bytecode
2174-
# see also devtools/ya/jbuild/gen/actions/idea.py
2175-
KOTLIN_JVM_TARGET=21
2176-
}
21772168
elsewhen ($JDK_REAL_VERSION == "24") {
2178-
# remove when kotlin starts supporting jdk21 bytecode
2169+
# remove when kotlin starts supporting jdk24 bytecode
21792170
# see also devtools/ya/jbuild/gen/actions/idea.py
2180-
KOTLIN_JVM_TARGET=21
2171+
KOTLIN_JVM_TARGET=23
21812172
}
21822173
otherwise {
21832174
KOTLIN_JVM_TARGET=$JDK_REAL_VERSION

build/export_generators/ide-gradle/build.gradle.kts.jinja

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,26 @@
1212
{%- endif -%}
1313
{%- endmacro -%}
1414

15+
{%- macro Depends(prefix, index) -%}
16+
{%- if proto_template %}
17+
tasks.getByName("prepareMainProtos").dependsOn({{ prefix }}{{ index }})
18+
{%- endif %}
19+
tasks.compileJava.configure {
20+
dependsOn({{ prefix }}{{ index }})
21+
}
22+
tasks.compileTestJava.configure {
23+
dependsOn({{ prefix }}{{ index }})
24+
}
25+
{%- if with_kotlin %}
26+
tasks.compileKotlin.configure {
27+
dependsOn({{ prefix }}{{ index }})
28+
}
29+
tasks.compileTestKotlin.configure {
30+
dependsOn({{ prefix }}{{ index }})
31+
}
32+
{% endif -%}
33+
{%- endmacro -%}
34+
1535
{%- include "[generator]/vars.jinja" -%}
1636
{%- include "[generator]/import.jinja" -%}
1737
{%- include "[generator]/repositories.jinja" -%}
@@ -29,6 +49,7 @@
2949
{%- include "[generator]/run_program.jinja" -%}
3050
{%- include "[generator]/run_java_program.jinja" -%}
3151
{%- include "[generator]/run_common.jinja" -%}
52+
{%- include "[generator]/copy_file.jinja" -%}
3253
{%- include "[generator]/dependencies.jinja" -%}
3354
{%- include "extra-tests.gradle.kts" ignore missing -%}
3455
{%- if publish -%}

build/export_generators/ide-gradle/build.gradle.kts.proto.jinja

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,26 @@
1212
{%- endif -%}
1313
{%- endmacro -%}
1414

15+
{%- macro Depends(prefix, index) -%}
16+
{%- if proto_template %}
17+
tasks.getByName("prepareMainProtos").dependsOn({{ prefix }}{{ index }})
18+
{%- endif %}
19+
tasks.compileJava.configure {
20+
dependsOn({{ prefix }}{{ index }})
21+
}
22+
tasks.compileTestJava.configure {
23+
dependsOn({{ prefix }}{{ index }})
24+
}
25+
{%- if with_kotlin %}
26+
tasks.compileKotlin.configure {
27+
dependsOn({{ prefix }}{{ index }})
28+
}
29+
tasks.compileTestKotlin.configure {
30+
dependsOn({{ prefix }}{{ index }})
31+
}
32+
{% endif -%}
33+
{%- endmacro -%}
34+
1535
{%- macro PatchGeneratedProto(arg, relative = false) -%}
1636
{%- if relative -%}
1737
"{{ arg|replace(export_root + "/", "")|replace(arcadia_root + "/", "") }}"
@@ -35,6 +55,7 @@
3555
{%- include "[generator]/run_program.jinja" -%}
3656
{%- include "[generator]/run_java_program.jinja" -%}
3757
{%- include "[generator]/run_common.jinja" -%}
58+
{%- include "[generator]/copy_file.jinja" -%}
3859
{%- include "[generator]/javadoc.jinja" -%}
3960
{%- include "[generator]/proto_dependencies.jinja" -%}
4061
{%- include "[generator]/debug.jinja" ignore missing -%}
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
{%- set copies = target.target_commands|selectattr("macro", "eq", "copy_file") -%}
2+
{%- if copies|length -%}
3+
{%- for copy in copies -%}
4+
{%- set src = copy.args[0] -%}
5+
{%- set srcs = [ src ] -%}
6+
{%- set from_arcadia = srcs|select("startsWith", arcadia_root)|length -%}
7+
{%- set from_build = srcs|select("startsWith", export_root)|length -%}
8+
{%- set dst = copy.args[1] -%}
9+
{%- set dsts = [ dst ] -%}
10+
{%- set to_arcadia = dsts|select("startsWith", arcadia_root)|length -%}
11+
{%- set to_build = dsts|select("startsWith", export_root)|length -%}
12+
{%- if (from_arcadia or from_build) and (to_arcadia or to_build) -%}
13+
{%- set src_split = rsplit(src, "/", 2) -%}
14+
{%- set src_path = src_split[0] -%}
15+
{%- set src_name = src_split[1] -%}
16+
{%- set dst_split = rsplit(dst, "/", 2) -%}
17+
{%- set dst_path = dst_split[0] -%}
18+
{%- set dst_name = dst_split[1] %}
19+
20+
val copy{{ loop.index }} = tasks.register<Copy>("copy{{ loop.index }}") {
21+
from({{ PatchRoots(src_path) }}) {
22+
include("{{ src_name }}")
23+
}
24+
into({{ PatchRoots(dst_path) }})
25+
{%- if src_name != dst_name %}
26+
rename("{{ src_name }}", "{{ dst_name }}")
27+
{%- endif %}
28+
}
29+
{%- set copy_index = loop.index %}
30+
{%- if target.runs|length -%}
31+
{%- for run in target.runs %}
32+
{%- if from_arcadia %}
33+
runJav{{ loop.index }}.dependsOn(copy{{ copy_index }})
34+
{%- else %}
35+
copy{{ copy_index }}.dependsOn(runJav{{ loop.index }})
36+
{%- endif -%}
37+
{% endfor -%}
38+
{%- endif -%}
39+
{%- if target.custom_runs|length -%}
40+
{%- for custom_run in target.custom_runs %}
41+
{%- if from_arcadia %}
42+
runProg{{ loop.index }}.dependsOn(copy{{ copy_index }})
43+
{%- else %}
44+
copy{{ copy_index }}.dependsOn(runProg{{ loop.index }})
45+
{%- endif -%}
46+
{% endfor -%}
47+
{%- endif -%}
48+
{%- if from_build -%}
49+
{{ Depends("copy", loop.index) }}
50+
{%- endif -%}
51+
{%- endif -%}
52+
{%- endfor -%}
53+
{%- endif -%}

build/export_generators/ide-gradle/generator.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,12 @@ custom_runs-cmake_packages-components="list"
8484
javac-flags="list"
8585
kotlinc-flags="list"
8686

87+
target_commands="list"
88+
target_commands-ITEM="dict"
89+
target_commands-macro="str"
90+
target_commands-args="list"
91+
target_commands-args_escaped="list"
92+
8793
[attrs.root]
8894

8995
[attrs.dir]

build/export_generators/ide-gradle/run_java_program.jinja

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ val runJav{{ loop.index }} = task<JavaExec>("runJavaProgram{{ loop.index }}") {
3434
{%- else %}
3535
{{ PatchRoots(arg, false, true) }},
3636
{%- endif %}
37-
{%- elif run.tool|select("in", arg)|length or run.in|select("eq", arg)|length or run.in_dir|select("eq", arg)|length %}
37+
{%- elif run.tool|select("in", arg)|length %}
3838
{{ PatchRoots(arg, true) }},
3939
{%- else %}
4040
{{ PatchRoots(arg) }},
@@ -88,27 +88,6 @@ val runJav{{ loop.index }} = task<JavaExec>("runJavaProgram{{ loop.index }}") {
8888
run-tool="list"
8989
#}
9090
}
91-
92-
{%- if proto_template %}
93-
94-
tasks.getByName("prepareMainProtos").dependsOn(runJav{{ loop.index }})
95-
{%- endif %}
96-
97-
tasks.compileJava.configure {
98-
dependsOn(runJav{{ loop.index }})
99-
}
100-
tasks.compileTestJava.configure {
101-
dependsOn(runJav{{ loop.index }})
102-
}
103-
{%- if with_kotlin %}
104-
105-
tasks.compileKotlin.configure {
106-
dependsOn(runJav{{ loop.index }})
107-
}
108-
109-
tasks.compileTestKotlin.configure {
110-
dependsOn(runJav{{ loop.index }})
111-
}
112-
{%- endif -%}
91+
{{ Depends("runJav", loop.index) }}
11392
{%- endfor -%}
11493
{%- endif -%}

build/export_generators/ide-gradle/run_program.jinja

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -50,26 +50,6 @@ val runProg{{ loop.index }} = task<Exec>("runProgram{{ loop.index }}") {
5050
custom_run-env="list"
5151
#}
5252
}
53-
54-
{%- if proto_template %}
55-
56-
tasks.getByName("prepareMainProtos").dependsOn(runProg{{ loop.index }})
57-
{%- endif %}
58-
59-
tasks.compileJava.configure {
60-
dependsOn(runProg{{ loop.index }})
61-
}
62-
tasks.compileTestJava.configure {
63-
dependsOn(runProg{{ loop.index }})
64-
}
65-
{%- if with_kotlin %}
66-
67-
tasks.compileKotlin.configure {
68-
dependsOn(runProg{{ loop.index }})
69-
}
70-
tasks.compileTestKotlin.configure {
71-
dependsOn(runProg{{ loop.index }})
72-
}
73-
{% endif -%}
53+
{{ Depends("runProg", loop.index) }}
7454
{%- endfor -%}
7555
{%- endif -%}

build/mapping.conf.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,20 @@
6868
"6638629972": "{registry_endpoint}/6638629972",
6969
"7245028676": "{registry_endpoint}/7245028676",
7070
"7245028547": "{registry_endpoint}/7245028547",
71+
"8314755214": "{registry_endpoint}/8314755214",
72+
"8314760034": "{registry_endpoint}/8314760034",
7173
"6638916300": "{registry_endpoint}/6638916300",
7274
"6638917016": "{registry_endpoint}/6638917016",
7375
"7245028516": "{registry_endpoint}/7245028516",
7476
"7245028641": "{registry_endpoint}/7245028641",
77+
"8314760058": "{registry_endpoint}/8314760058",
78+
"8314762661": "{registry_endpoint}/8314762661",
7579
"6638915855": "{registry_endpoint}/6638915855",
7680
"6638914429": "{registry_endpoint}/6638914429",
7781
"7245029625": "{registry_endpoint}/7245029625",
7882
"7245029630": "{registry_endpoint}/7245029630",
83+
"8314758936": "{registry_endpoint}/8314758936",
84+
"8314762236": "{registry_endpoint}/8314762236",
7985
"721500304": "{registry_endpoint}/721500304",
8086
"3573990573": "{registry_endpoint}/3573990573",
8187
"3573996018": "{registry_endpoint}/3573996018",
@@ -1049,6 +1055,7 @@
10491055
"1812152858": "{registry_endpoint}/1812152858",
10501056
"6639202855": "{registry_endpoint}/6639202855",
10511057
"7249973735": "{registry_endpoint}/7249973735",
1058+
"8314768876": "{registry_endpoint}/8314768876",
10521059
"4758626187": "{registry_endpoint}/4758626187",
10531060
"4758626560": "{registry_endpoint}/4758626560",
10541061
"4758626176": "{registry_endpoint}/4758626176",
@@ -1390,14 +1397,20 @@
13901397
"6638629972": "JAVA_LIBRARY-none-none-kotlin-stdlib-1.9.24.jar",
13911398
"7245028676": "JAVA_LIBRARY-none-none-kotlin-stdlib-2.0.21-sources.jar",
13921399
"7245028547": "JAVA_LIBRARY-none-none-kotlin-stdlib-2.0.21.jar",
1400+
"8314755214": "JAVA_LIBRARY-none-none-kotlin-stdlib-2.1.20-sources.jar",
1401+
"8314760034": "JAVA_LIBRARY-none-none-kotlin-stdlib-2.1.20.jar",
13931402
"6638916300": "JAVA_LIBRARY-none-none-kotlin-stdlib-jdk7-1.9.24-sources.jar",
13941403
"6638917016": "JAVA_LIBRARY-none-none-kotlin-stdlib-jdk7-1.9.24.jar",
13951404
"7245028516": "JAVA_LIBRARY-none-none-kotlin-stdlib-jdk7-2.0.21-sources.jar",
13961405
"7245028641": "JAVA_LIBRARY-none-none-kotlin-stdlib-jdk7-2.0.21.jar",
1406+
"8314760058": "JAVA_LIBRARY-none-none-kotlin-stdlib-jdk7-2.1.20-sources.jar",
1407+
"8314762661": "JAVA_LIBRARY-none-none-kotlin-stdlib-jdk7-2.1.20.jar",
13971408
"6638915855": "JAVA_LIBRARY-none-none-kotlin-stdlib-jdk8-1.9.24-sources.jar",
13981409
"6638914429": "JAVA_LIBRARY-none-none-kotlin-stdlib-jdk8-1.9.24.jar",
13991410
"7245029625": "JAVA_LIBRARY-none-none-kotlin-stdlib-jdk8-2.0.21-sources.jar",
14001411
"7245029630": "JAVA_LIBRARY-none-none-kotlin-stdlib-jdk8-2.0.21.jar",
1412+
"8314758936": "JAVA_LIBRARY-none-none-kotlin-stdlib-jdk8-2.1.20-sources.jar",
1413+
"8314762236": "JAVA_LIBRARY-none-none-kotlin-stdlib-jdk8-2.1.20.jar",
14011414
"721500304": "JAVA_LIBRARY-none-none-listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar",
14021415
"3573990573": "JAVA_LIBRARY-none-none-proto-google-common-protos-2.9.0-sources.jar",
14031416
"3573996018": "JAVA_LIBRARY-none-none-proto-google-common-protos-2.9.0.jar",
@@ -2371,6 +2384,7 @@
23712384
"1812152858": "junk/zubchick/buf/buf for linux",
23722385
"6639202855": "kotlin_kompiler_1.9.24 with plugins",
23732386
"7249973735": "kotlin_kompiler_2.0.21 with plugins",
2387+
"8314768876": "kotlin_kompiler_2.1.20 with plugins",
23742388
"4758626187": "ktlint for darwin (0.50.0)",
23752389
"4758626560": "ktlint for darwin-arm64 (0.50.0)",
23762390
"4758626176": "ktlint for linux (0.50.0)",

build/platform/yfm/resources.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{
22
"by_platform": {
33
"win32-x86_64": {
4-
"uri": "sbr:8405194101"
4+
"uri": "sbr:8437304145"
55
},
66
"darwin-x86_64": {
7-
"uri": "sbr:8405192217"
7+
"uri": "sbr:8437300792"
88
},
99
"linux-x86_64": {
10-
"uri": "sbr:8405190721"
10+
"uri": "sbr:8437297413"
1111
},
1212
"darwin-arm64": {
13-
"uri": "sbr:8405192217"
13+
"uri": "sbr:8437300792"
1414
}
1515
}
1616
}

build/sysincl/android.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
- android/asset_manager_jni.h
66
- android/bitmap.h
77
- android/dlext.h
8+
- android/hardware_buffer.h
89
- android/log.h
910
- android/native_window.h
1011
- android/native_window_jni.h

0 commit comments

Comments
 (0)