summaryrefslogtreecommitdiff
path: root/solenv/gbuild
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2019-12-11 13:23:43 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-02-04 22:03:54 +0100
commitae855bf48163ff64d94cfc34aff8e37abdb5518d (patch)
treecdfc726f47cc69c265288936157295c94d9ec949 /solenv/gbuild
parent494092dc0c2f6fd04dbd973d6f76f1df720dbcf7 (diff)
tdf#117331 Merge jurt and unoil into ridl
jurt.jar and unoil.jar are kept as effectively empty jars, each with a Class-Path: ridl.jar in their meta-inf/manifest.mf, so that 3rd-party code loading them (with or without also loading ridl.jar) will still have access to their content. Conceptually, the UNOIDL entities in unoil.jar (corresponding to module offapi) are not part of the URE, but are now made available by URE's ridl.jar. This should probably not cause problems in practice. At least for now, we seal exactly those packages in ridl.jar that were originally sealed in jurt.jar. Ideally, all of ridl.jar could be sealed now, but that would be mildly incompatible, as it would prevent 3rd-party code from introducing additional UNOIDL entities in the relevant namespaces (even if that is something we do not want 3rd-party code to do anyway). However, some JunitTest_jurt_* define classes in those sealed packages. In the past they got away with that by using gb_JunitTest_use_jar_classset,*,jurt. Instead they now need to gb_JunitTest_use_jar_classset,*,ridl and drop the gb_JunitTest_use_jar,*,ridl. But the former only makes available the classes that are specified in ridljar/Jar_ridl.mk with gb_Jar_add_sourcefiles, not the UNOIDL entities specified via gb_Jar_add_packagedirs. But the tests need the udkapi UNOIDL entities, so introduce gb_JunitTest_add_classpath to let the tests get them explicitly. (Curiously, JunitTest_jurt_uno and JnitTest_jurt_util use gb_JunitTest_use_jar_classset,*,jurt but don't seem to acutally need it; lets leave that for a follow-up clean up.) As a follow-up clean up, relevant files could be moved from jurt/ to ridljar/. Change-Id: I836f4e7bb47fb41f1306e3f223da90dba988eb9a Co-authored-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/84946 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'solenv/gbuild')
-rw-r--r--solenv/gbuild/CppunitTest.mk2
-rw-r--r--solenv/gbuild/Jar.mk4
-rw-r--r--solenv/gbuild/JunitTest.mk8
3 files changed, 9 insertions, 5 deletions
diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk
index 69eae9169040..15e525452150 100644
--- a/solenv/gbuild/CppunitTest.mk
+++ b/solenv/gbuild/CppunitTest.mk
@@ -378,7 +378,7 @@ endef
define gb_CppunitTest_use_java_ure
$(call gb_CppunitTest_get_target,$(1)) : JAVA_URE := $(true)
$(call gb_CppunitTest_get_target,$(1)) : \
- $(foreach jar,java_uno juh jurt unoil unoloader,$(call gb_Jar_get_target,$(jar))) \
+ $(foreach jar,java_uno juh ridl unoloader,$(call gb_Jar_get_target,$(jar))) \
$(call gb_Library_get_target,affine_uno_uno) \
$(call gb_Library_get_target,java_uno) \
$(call gb_Library_get_target,jpipe) \
diff --git a/solenv/gbuild/Jar.mk b/solenv/gbuild/Jar.mk
index 151fb990a0a6..6f86b4a79a42 100644
--- a/solenv/gbuild/Jar.mk
+++ b/solenv/gbuild/Jar.mk
@@ -89,7 +89,7 @@ $(call gb_Jar_get_target,$(1)) :
endef
# resets scoped variables (see explanations where they are set)
-# creates a class set and a dependency to it
+# creates a class set and a dependency to it
# registers target and clean target
# adds jar files to DeliverLogTarget
define gb_Jar_Jar
@@ -250,7 +250,7 @@ define gb_Jar_use_external_project
$(call gb_JavaClassSet_use_external_project,$(call gb_Jar_get_classsetname,$(1)),$(2))
endef
-# possible directories for jar files containing UNO services
+# possible directories for jar files containing UNO services
gb_Jar_COMPONENTPREFIXES := \
OOO:vnd.sun.star.expand:\dLO_JAVA_DIR/ \
URE:vnd.sun.star.expand:\dURE_INTERNAL_JAVA_DIR/ \
diff --git a/solenv/gbuild/JunitTest.mk b/solenv/gbuild/JunitTest.mk
index 236516a72c6c..e5fab5eae68e 100644
--- a/solenv/gbuild/JunitTest.mk
+++ b/solenv/gbuild/JunitTest.mk
@@ -117,6 +117,12 @@ $(call gb_JunitTest_get_target,$(1)) : T_CP := $$(T_CP)$$(gb_CLASSPATHSEP)$(call
endef
+define gb_JunitTest_add_classpath
+$(call gb_JavaClassSet_add_classpath,$(call gb_JunitTest_get_classsetname,$(1)),$(2))
+$(call gb_JunitTest_get_target,$(1)) : T_CP := $$(T_CP)$$(gb_CLASSPATHSEP)$(2)
+
+endef
+
define gb_JunitTest_use_system_jar
$(call gb_JavaClassSet_use_system_jar,$(call gb_JunitTest_get_classsetname,$(1)),$(2))
@@ -155,10 +161,8 @@ endef
define gb_JunitTest_use_unoapi_jars
$(eval $(call gb_JunitTest_use_jars,$(1),\
OOoRunner \
- jurt \
ridl \
test \
- unoil \
))
endef