Permalink
Browse files

Grab the modules list from the jar directly

This prevents needing a re-install each time the module list changes,
which I'm sure it will continue to do.
  • Loading branch information...
LadyCailin committed Jan 25, 2019
1 parent 1f0e10a commit 1d990798e42d68ef80ba9a6e56a8e2d4d266d14f
@@ -44,14 +44,12 @@ jdk_version() {
}

if [[ "$(jdk_version)" -gt "8" ]]; then
read -r -d '' MODULES <<MODS
java.base/java.lang.reflect
java.base/java.lang
java.base/java.util
MODS
MPATH=$(echo "$MODULES" | sed 's/\(.*\)/--add-opens \1=ALL-UNNAMED/' | tr '\n' ' ')
# Read the required modules from the jar itself, so that each jar can have different dependencies, without requiring
# a re-install.
MODULES=$(unzip -p "%%LOCATION%%" interpreter-helpers/modules)
MPATH=$(echo "$MODULES" | sed 's/\(.*\)/--add-opens \1=ALL-UNNAMED/' | tr '\n' ' ')
else
MPATH=""
MPATH=""
fi

if [ "$#" -eq 0 ]; then
@@ -0,0 +1,3 @@
java.base/java.lang.reflect
java.base/java.lang
java.base/java.util

0 comments on commit 1d99079

Please sign in to comment.