def setup_parser(cls, option_group, args, mkflag): JvmCompile.setup_parser(JavaCompile, option_group, args, mkflag) option_group.add_option(mkflag("args"), dest="java_compile_args", action="append", help="Pass these extra args to javac.")
def setup_parser(cls, option_group, args, mkflag): JvmCompile.setup_parser(ScalaCompile, option_group, args, mkflag) option_group.add_option( mkflag('plugins'), dest='plugins', default=None, action='append', help='Use these scalac plugins. Default is set in pants.ini.')
def __init__(self, context): JvmCompile.__init__(self, context, workdir=context.config.get('scala-compile', 'nailgun_dir')) # Set up the zinc utils. color = not context.options.no_color self._zinc_utils = ZincUtils(context=context, nailgun_task=self, jvm_options = self._jvm_options, color=color, jvm_tool_bootstrapper=self._jvm_tool_bootstrapper) # If we are compiling scala libraries with circular deps on java libraries we need to # make sure those cycle deps are present. for scala_target in self.context.targets(lambda t: isinstance(t, ScalaLibrary)): for java_target in scala_target.java_sources: self.context.add_target(java_target)
def __init__(self, context): JvmCompile.__init__(self, context, workdir=context.config.get('java-compile', 'nailgun_dir')) self._jmake_bootstrap_key = 'jmake' external_tools = context.config.getlist('java-compile', 'jmake-bootstrap-tools', default=[':jmake']) self.register_jvm_tool(self._jmake_bootstrap_key, external_tools) self._compiler_bootstrap_key = 'java-compiler' compiler_bootstrap_tools = context.config.getlist('java-compile', 'compiler-bootstrap-tools', default=[':java-compiler']) self.register_jvm_tool(self._compiler_bootstrap_key, compiler_bootstrap_tools) self._javac_opts = [] if context.options.java_compile_args: for arg in context.options.java_compile_args: self._javac_opts.extend(shlex.split(arg)) else: self._javac_opts.extend(context.config.getlist('java-compile', 'javac_args', default=[]))
def __init__(self, context): JvmCompile.__init__(self, context, jdk=False) # Set up the zinc utils. color = not context.options.no_color self._zinc_utils = ZincUtils( context=context, nailgun_task=self, jvm_options=self._jvm_options, color=color, jvm_tool_bootstrapper=self._jvm_tool_bootstrapper) # If we are compiling scala libraries with circular deps on java libraries we need to # make sure those cycle deps are present. for scala_target in self.context.targets( lambda t: isinstance(t, ScalaLibrary)): for java_target in scala_target.java_sources: self.context.add_target(java_target)
def setup_parser(cls, option_group, args, mkflag): JvmCompile.setup_parser(ScalaCompile, option_group, args, mkflag) option_group.add_option(mkflag('plugins'), dest='plugins', default=None, action='append', help='Use these scalac plugins. Default is set in pants.ini.')