void compileForWebMode(ModuleDef module, Set<String> userAgents) throws UnableToCompleteException { if (userAgents != null && !userAgents.isEmpty()) { Properties props = module.getProperties(); Property userAgent = props.find("user.agent"); if (userAgent instanceof BindingProperty) { BindingProperty bindingProperty = (BindingProperty) userAgent; bindingProperty.setRootGeneratedValues(userAgents.toArray(new String[0])); } } boolean success = false; try { success = new Compiler(options).run(getTopLogger(), module); } catch (Exception e) { getTopLogger().log(Type.ERROR, "Compiler aborted with an exception ", e); } if (!success) { throw new UnableToCompleteException(); } // TODO(scottb): prepopulate currentCompilationState somehow? }
void compileForWebMode(ModuleDef module, Set<String> userAgents) throws UnableToCompleteException { if (userAgents != null && !userAgents.isEmpty()) { Properties props = module.getProperties(); Property userAgent = props.find("user.agent"); if (userAgent instanceof BindingProperty) { BindingProperty bindingProperty = (BindingProperty) userAgent; bindingProperty.setRootGeneratedValues(userAgents.toArray(new String[0])); } } if (!Compiler.maybeRestrictProperties(getTopLogger(), module, options.getProperties())) { throw new UnableToCompleteException(); } if (options.isClosureCompilerFormatEnabled()) { module.addLinker("closureHelpers"); } boolean success = false; try { success = new Compiler(options).run(getTopLogger(), module); } catch (Exception e) { getTopLogger().log(Type.ERROR, "Compiler aborted with an exception ", e); } if (!success) { throw new UnableToCompleteException(); } // TODO(scottb): prepopulate currentCompilationState somehow? }
: CompileStrategy.FULL); boolean success = new Compiler(runOptions, minimalRebuildCache).run(compileLogger, module); if (success) { publishedCompileDir = compileDir;