diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2020-05-07 09:42:22 +0200 |
---|---|---|
committer | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2020-05-27 11:40:20 +0200 |
commit | 941b567a41569260fef14a7337511e8f42337323 (patch) | |
tree | fe04ef41038df279689e2a979dc28e7fe5b37670 /solenv/gbuild/Jar.mk | |
parent | 77140de3fe925f75620e94dbd848b1c925935fb5 (diff) |
tdf#131572 Add java 9 module info for libreoffice.jar
Add a java module named "org.libreoffice.uno" for this jar.
This needs to be compiled with Java 9.
But since we want to keep b/c with Java 8,
the rest of the jar has to be compiled with Java 8.
This bumps the *build* requirement to Java 9 while keeping
the *runtime* requirement at Java 8.
The gbuild JavaClassSet class is changed to invoke javac twice,
where the 2nd invocation compiles with --release 9 and a --patch-modules
argument so that it finds the results of the first invocation and also
the javamaker generated files in CustomTargets.
Change-Id: I888f5dbe097cc37136e68db5919939877c981862
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91105
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Diffstat (limited to 'solenv/gbuild/Jar.mk')
-rw-r--r-- | solenv/gbuild/Jar.mk | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/solenv/gbuild/Jar.mk b/solenv/gbuild/Jar.mk index 76385702f1ab..1bbfeca166eb 100644 --- a/solenv/gbuild/Jar.mk +++ b/solenv/gbuild/Jar.mk @@ -94,6 +94,7 @@ endef # creates a class set and a dependency to it # registers target and clean target # adds jar files to DeliverLogTarget +# call gb_Jar_Jar,jarname,java9modulename define gb_Jar_Jar ifeq (,$$(findstring $(1),$$(gb_Jar_KNOWN))) $$(eval $$(call gb_Output_info,Currently known jars are: $(sort $(gb_Jar_KNOWN)),ALL)) @@ -106,7 +107,7 @@ $(call gb_Jar_get_target,$(1)) : PACKAGEDIRS := $(call gb_Jar_get_target,$(1)) : PACKAGEFILES := $(call gb_Jar_get_target,$(1)) : \ $(call gb_JavaClassSet_get_target,$(call gb_Jar_get_classsetname,$(1))) -$(call gb_JavaClassSet_JavaClassSet,$(call gb_Jar_get_classsetname,$(1))) +$(call gb_JavaClassSet_JavaClassSet,$(call gb_Jar_get_classsetname,$(1)),$(2)) $(eval $(call gb_Module_register_target,$(call gb_Jar_get_target,$(1)),$(call gb_Jar_get_clean_target,$(1)))) $(call gb_Helper_make_userfriendly_targets,$(1),Jar,$(call gb_Jar_get_target,$(1))) @@ -121,6 +122,12 @@ $(call gb_JavaClassSet_add_sourcefile,$(call gb_Jar_get_classsetname,$(1)),$(2)) endef +define gb_Jar_add_sourcefile_java9 +$(call gb_JavaClassSet_add_sourcefile_java9,$(call gb_Jar_get_classsetname,$(1)),$(2)) + +endef + + # PACKAGEROOTS is the list of all root folders created by the JavaClassSet to pack into the jar (without META-INF as this is added automatically) define gb_Jar_set_packageroot $(call gb_Jar_get_target,$(1)) : PACKAGEROOTS := $(2) @@ -159,6 +166,11 @@ $(foreach sourcefile,$(2),$(call gb_Jar_add_sourcefile,$(1),$(sourcefile))) endef +define gb_Jar_add_sourcefiles_java9 +$(foreach sourcefile,$(2),$(call gb_Jar_add_sourcefile_java9,$(1),$(sourcefile))) + +endef + define gb_Jar_add_generated_sourcefile $(call gb_JavaClassSet_add_generated_sourcefile,$(call gb_Jar_get_classsetname,$(1)),$(2)) |