Updates public build to use Java 11, so as to build post-Java 8 source updates.
@@ -29,6 +29,10 @@ ANNOTATIONS_JAR = $(DIST_JAR_DIR)/j2objc_annotations.jar
MKTEMP_DIR = j2objc-jre_emul
+JAVAC_ARGS = --patch-module java.base=$(JRE_SRC) \
+ -classpath $(ANNOTATIONS_JAR) --add-reads java.base=ALL-UNNAMED \
+ -encoding UTF-8 -source 11 -target 11 -nowarn
+
clean:
@rm -f $(EMULATION_JAR_DIST) $(EMULATION_SRC_JAR_DIST) $(JSON_JAR_DIST)
@@ -63,8 +67,7 @@ $(EMULATION_JAR): $(ALL_JAVA_SOURCES)
@echo "building jre_emul.jar"
@set -e; stage_dir=`${MKTEMP_CMD}`; \
../scripts/javac_no_deprecated_warnings.sh $(JAVAC) \
- -classpath $(ANNOTATIONS_JAR) \
- -d $$stage_dir -encoding UTF-8 -source 1.8 -target 1.8 -nowarn $^; \
+ $(JAVAC_ARGS) -d $$stage_dir $^; \
jar cf $(EMULATION_JAR) -C $$stage_dir .; \
rm -rf $$stage_dir
@@ -114,8 +117,8 @@ $(JSON_JAR): $(JSON_PUBLIC_SOURCES) $(JSON_PRIVATE_SOURCES) $(JSON_SOURCE_RETENT
@mkdir -p $(@D)
@echo "building json.jar"
@set -e; stage_dir=`${MKTEMP_CMD}`; \
- ../scripts/javac_no_deprecated_warnings.sh $(JAVAC) \
- -d $$stage_dir -encoding UTF-8 -source 1.8 -target 1.8 -nowarn $^; \
+ ../scripts/javac_no_deprecated_warnings.sh $(JAVAC) $(JAVAC_ARGS) \
+ -d $$stage_dir $^; \
jar cf $(JSON_JAR) -C $$stage_dir .; \
rm -rf $$stage_dir
