@Override public void build(CompileContext context) throws ProjectBuildException { if (!AndroidJpsUtil.containsAndroidFacet(context.getProject()) || AndroidJpsUtil.isLightBuild(context)) { return; } final Collection<Module> modules = context.getProject().getModules().values(); final Map<Module, AndroidFileSetState> resourcesStates = new HashMap<Module, AndroidFileSetState>(); final Map<Module, AndroidFileSetState> assetsStates = new HashMap<Module, AndroidFileSetState>(); try { fillStates(modules, resourcesStates, assetsStates); if (!doCaching(context, modules, resourcesStates)) { throw new ProjectBuildException(); } if (!doResourcePackaging(context, modules, resourcesStates, assetsStates)) { throw new ProjectBuildException(); } if (!doPackaging(context, modules)) { throw new ProjectBuildException(); } } catch (ProjectBuildException e) { throw e; } catch (Exception e) { AndroidJpsUtil.handleException(context, e, BUILDER_NAME); } }