aboutsummaryrefslogtreecommitdiffstats
path: root/build/plugins/java.py
diff options
context:
space:
mode:
authordimdim11 <dimdim11@yandex-team.com>2023-11-29 23:35:15 +0300
committerdimdim11 <dimdim11@yandex-team.com>2023-11-30 00:12:26 +0300
commitbccf9ed4d65e4d7bd8f1c87610e61b39e2fe2537 (patch)
tree85a6d6cd03855f62f12783127aa18e94db5ac43c /build/plugins/java.py
parent18265f41838eee46825af0eaf6edcfebc01acb82 (diff)
downloadydb-bccf9ed4d65e4d7bd8f1c87610e61b39e2fe2537.tar.gz
Refactor java.conf, add obj attributes without use they
Refactor java.conf, add obj attributes without use they
Diffstat (limited to 'build/plugins/java.py')
-rw-r--r--build/plugins/java.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/build/plugins/java.py b/build/plugins/java.py
index ebf4af8f1c..ee04a37674 100644
--- a/build/plugins/java.py
+++ b/build/plugins/java.py
@@ -466,14 +466,21 @@ def on_setup_maven_export_coords_if_need(unit, *args):
unit.set(['MAVEN_EXPORT_COORDS_GLOBAL', _maven_coords_for_project(unit, args[0])])
+def _get_classpath(unit, dir):
+ if dir.startswith(CONTRIB_JAVA_PREFIX):
+ return '\\"{}\\"'.format(_maven_coords_for_project(unit, dir).rstrip(':'))
+ else:
+ return 'project(\\":{}\\")'.format(dir.replace('/', ':'))
+
+
def on_setup_project_coords_if_needed(unit, *args):
if not unit.enabled('EXPORT_GRADLE'):
return
project_dir = args[0]
if project_dir.startswith(CONTRIB_JAVA_PREFIX):
- value = '\\"{}\\"'.format(_maven_coords_for_project(unit, project_dir).rstrip(':'))
+ value = '\\"{}\\"'.format(_get_classpath(unit, project_dir).rstrip(':'))
else:
value = 'project(\\":{}\\")'.format(project_dir.replace('/', ':'))
- unit.set(['EXPORT_GRADLE_PROJECT_COORDS', value])
- unit.set(['EXPORT_GRADLE_PROJECT_COORDS_GLOBAL', value])
+ unit.set(['EXPORT_GRADLE_CLASSPATH', value])
+ unit.set(['EXPORT_GRADLE_CLASSPATH_GLOBAL', value])