aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordimdim11 <dimdim11@yandex-team.com>2024-11-19 00:50:19 +0300
committerdimdim11 <dimdim11@yandex-team.com>2024-11-19 01:03:37 +0300
commit81f817f446c49b24a1ddb183dbd51b110993f6ce (patch)
treebb6564ab958fce4f290b004b180267ed0d646d2c
parent26c4da266654a06558c9df0f549c6e836e0df3d0 (diff)
downloadydb-81f817f446c49b24a1ddb183dbd51b110993f6ce.tar.gz
Patch annotation processors
Fixes and add sem deps commit_hash:43b1dd3f53d13a09605153657437d6d8902fcea9
-rw-r--r--build/export_generators/ide-gradle/build.gradle.kts.jinja23
-rw-r--r--build/export_generators/ide-gradle/settings.gradle.kts.jinja9
2 files changed, 13 insertions, 19 deletions
diff --git a/build/export_generators/ide-gradle/build.gradle.kts.jinja b/build/export_generators/ide-gradle/build.gradle.kts.jinja
index 8299b4db6f..05ac7f62ac 100644
--- a/build/export_generators/ide-gradle/build.gradle.kts.jinja
+++ b/build/export_generators/ide-gradle/build.gradle.kts.jinja
@@ -221,7 +221,8 @@ configurations.testImplementation {
isTransitive = false
}
-{% if has_test -%}
+{%- if has_test %}
+
val testsJar by tasks.registering(Jar::class) {
dependsOn(JavaPlugin.COMPILE_TEST_JAVA_TASK_NAME)
archiveClassifier.set("tests")
@@ -236,22 +237,22 @@ tasks.test {
events("passed", "skipped", "failed")
}
}
-
{% endif -%}
-{%- if target.jar_source_set is defined -%}
+{%- if target.jar_source_set is defined %}
+
{%- for source_set in target.jar_source_set -%}
-{%- set srcdir_glob = split(source_set, ':') -%}
+{%- set srcdir_glob = split(source_set, ':') %}
sourceSets.main.java.srcDirs += "{{ srcdir_glob[0] }}"
-{% endfor -%}
+{%- endfor -%}
{%- endif -%}
{% for extra_target in extra_targets -%}
{%- if extra_target.jar_source_set is defined -%}
{%- for source_set in extra_target.jar_source_set -%}
-{%- set srcdir_glob = split(source_set, ':') -%}
+{%- set srcdir_glob = split(source_set, ':') %}
sourceSets.main.java.srcDirs += "{{ srcdir_glob[0] }}"
-{% endfor -%}
+{%- endfor -%}
{%- endif -%}
{%- endfor -%}
@@ -352,7 +353,7 @@ tasks.named<Test>("test") {
{#- {% set runs = targets|selectattr("runs") -%} -#}
{%- set runs = target.runs -%}
{%- if runs -%}
-{%- for run in runs -%}
+{%- for run in runs %}
val runJav{{ loop.index }} = task<JavaExec>("runJavaProgram{{ loop.index }}") {
group = "build"
@@ -365,11 +366,7 @@ val runJav{{ loop.index }} = task<JavaExec>("runJavaProgram{{ loop.index }}") {
{% set real_classpath = real_classpath|replace('.run.cp', '') -%}
{% set real_classpath = real_classpath|replace('.cplst', '') -%}
{% set real_classpath = real_classpath|replace(export_root, '')|replace(arcadia_root, '') -%}
-{% set real_gradle_classpath = real_classpath|replace('/', ':') %}
- val classPath = "{{ real_gradle_classpath }}"
- val classPathParts = classPath.split(":")
- classPathParts[classPathParts.size - 2]
- classpath = files("$project_root{{ real_classpath }}") + project(classPath.replace(":${classPathParts[classPathParts.size - 2]}.jar", "")).configurations.runtimeClasspath.get()
+ classpath = files("$project_root{{ real_classpath }}")
{% endfor -%}
{% else -%}
classpath = sourceSets.main.get().runtimeClasspath
diff --git a/build/export_generators/ide-gradle/settings.gradle.kts.jinja b/build/export_generators/ide-gradle/settings.gradle.kts.jinja
index ca32319453..677de2592a 100644
--- a/build/export_generators/ide-gradle/settings.gradle.kts.jinja
+++ b/build/export_generators/ide-gradle/settings.gradle.kts.jinja
@@ -1,12 +1,9 @@
rootProject.name = "{{ project_name }}"
-{% if subdirs|length > 1 -%}
-{#- Apply list if not only root in it -#}
-{%- for subdir in subdirs -%}
-{%- set classname = subdir | replace("/", ":") -%}
+{% for subdir in subdirs -%}
+{%- set classname = subdir | replace("/", ":") %}
include(":{{ classname }}")
project(":{{ classname }}").projectDir = file("{{ arcadia_root }}/{{ subdir }}")
-{% endfor -%}
-{%- endif -%}
+{% endfor -%}
{%- include "[generator]/debug.jinja" ignore missing -%}