@@ -93,19 +93,19 @@ def __prepare__(mcs, name, this_bases):
9393
9494
9595class AbstractNativeImageConfig (_with_metaclass (ABCMeta , object )):
96- def __init__ (self , destination , jar_distributions , build_args , is_module_launcher = False , links = None , is_polyglot = False , dir_jars = False , home_finder = False , build_time = 1 ): # pylint: disable=super-init-not-called
96+ def __init__ (self , destination , jar_distributions , build_args , use_modules = None , links = None , is_polyglot = False , dir_jars = False , home_finder = False , build_time = 1 ): # pylint: disable=super-init-not-called
9797 """
9898 :type destination: str
9999 :type jar_distributions: list[str]
100100 :type build_args: list[str]
101- :type is_module_launcher: bool
102101 :type links: list[str]
102+ :param str use_modules: Run (with 'laucher') or run and build image with module support (with 'image').
103103 :param bool dir_jars: If true, all jars in the component directory are added to the classpath.
104104 """
105105 self .destination = mx_subst .path_substitutions .substitute (destination )
106106 self .jar_distributions = jar_distributions
107107 self .build_args = build_args
108- self .module_launcher = is_module_launcher
108+ self .use_modules = use_modules
109109 self .links = [mx_subst .path_substitutions .substitute (link ) for link in links ] if links else []
110110 self .is_polyglot = is_polyglot
111111 self .dir_jars = dir_jars
@@ -135,20 +135,20 @@ def get_add_exports_list(required_exports, custom_target_module_str=None):
135135class LauncherConfig (AbstractNativeImageConfig ):
136136 def __init__ (self , destination , jar_distributions , main_class , build_args , is_main_launcher = True ,
137137 default_symlinks = True , is_sdk_launcher = False , custom_launcher_script = None , extra_jvm_args = None ,
138- is_module_launcher = False , main_module = None , option_vars = None , home_finder = True , ** kwargs ):
138+ use_modules = None , main_module = None , option_vars = None , home_finder = True , ** kwargs ):
139139 """
140140 :param str main_class
141141 :param bool is_main_launcher
142142 :param bool default_symlinks
143143 :param bool is_sdk_launcher: Whether it uses org.graalvm.launcher.Launcher
144- :param bool is_module_launcher: Whether it uses classpath or module-path for the application
145- :param str main_module: Specifies the main module. Mandatory if this is a module_launcher
144+ :param str use_modules: Run (with 'laucher') or run and build image with module support (with 'image').
145+ :param str main_module: Specifies the main module. Mandatory if use_modules is not None
146146 :param str custom_launcher_script: Custom launcher script, to be used when not compiled as a native image
147147 """
148- super (LauncherConfig , self ).__init__ (destination , jar_distributions , build_args , is_module_launcher , home_finder = home_finder , ** kwargs )
148+ super (LauncherConfig , self ).__init__ (destination , jar_distributions , build_args , use_modules , home_finder = home_finder , ** kwargs )
149149 self .main_class = main_class
150150 self .is_main_launcher = is_main_launcher
151- assert not is_module_launcher or main_module
151+ assert use_modules is None or main_module
152152 self .main_module = main_module
153153 self .default_symlinks = default_symlinks
154154 self .is_sdk_launcher = is_sdk_launcher
@@ -165,7 +165,7 @@ def add_relative_home_path(self, language, path):
165165 self .relative_home_paths [language ] = path
166166
167167 def get_add_exports (self , missing_jars ):
168- if not self .module_launcher :
168+ if self .use_modules is None :
169169 return ''
170170 distributions = self .jar_distributions
171171 distributions_transitive = mx .classpath_entries (distributions )
0 commit comments