461bb39fbdd9f49ff21a6be038ffbd2e7ae622b0,src/python/pants/backend/android/tasks/dx_compile.py,DxCompile,execute,#DxCompile#,79

Before Change


        invalid_targets = []
        for vt in invalidation_check.invalid_vts:
          invalid_targets.extend(vt.targets)
        for target in invalid_targets:
          outdir = self.dx_out(target)
          safe_mkdir(outdir)
          classes_by_target = self.context.products.get_data("classes_by_target")
          classes = []

          def add_to_dex(tgt):
            target_classes = classes_by_target.get(tgt)
            if target_classes:

              def add_classes(target_products):
                for _, products in target_products.abs_paths():
                  for prod in products:
                    classes.append(prod)

              add_classes(target_classes)

          target.walk(add_to_dex)
          if not classes:
            raise TaskError("No classes were found for {0!r}.".format(target))
          args = self._render_args(outdir, classes)
          self._compile_dex(args, target.build_tools_version)
      for target in targets:
        self.context.products.get("dex").add(target, self.dx_out(target)).append(self.DEX_NAME)

  def dx_jar_tool(self, build_tools_version):

After Change



    with self.invalidated(targets) as invalidation_check:
      for vt in invalidation_check.all_vts:
        if not vt.valid:
          classes = self._gather_classes(vt.target)
          if not classes:
            raise self.EmptyDexError("No classes were found for {}.".format(vt.target))

          args = self._render_args(vt.results_dir, classes)
          self._compile_dex(args, vt.target.build_tools_version)
        self.context.products.get("dex").add(vt.target, vt.results_dir).append(self.DEX_NAME)

  def dx_jar_tool(self, build_tools_version):
    Return the appropriate dx.jar.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: pantsbuild/pants
Commit Name: 461bb39fbdd9f49ff21a6be038ffbd2e7ae622b0
Time: 2015-07-30
Author: mateorod9@gmail.com
File Name: src/python/pants/backend/android/tasks/dx_compile.py
Class Name: DxCompile
Method Name: execute


Project Name: pantsbuild/pants
Commit Name: 9a5a95e0f7bee96b38a2119198a4545ff65f83d1
Time: 2015-08-25
Author: john.sirois@gmail.com
File Name: src/python/pants/backend/python/thrift_builder.py
Class Name: PythonThriftBuilder
Method Name: run_thrifts


Project Name: pantsbuild/pants
Commit Name: 2d515b55b25a62b1f5961955e977e2fce4ae511e
Time: 2015-10-06
Author: stuhood@gmail.com
File Name: src/python/pants/backend/jvm/tasks/resources_task.py
Class Name: ResourcesTask
Method Name: execute