chiark / gitweb /
Avoid lint on all new plugin versions, remove TODO
[fdroidserver.git] / fdroidserver / build.py
index 3870d7e3a3f2d00aadac72e2d314302840f48c7e..a4561a9fe903a36fc0df6fc25e69f4471fbd50aa 100644 (file)
@@ -695,8 +695,7 @@ def build_local(app, thisbuild, vcs, build_dir, output_dir, srclib_dir, extlib_d
         commands += ['assemble' + flavours_cmd + 'Release']
 
         # Avoid having to use lintOptions.abortOnError false
-        # TODO: Do flavours or project names change this task name?
-        if LooseVersion('0.8') <= thisbuild['gradlepluginver'] < LooseVersion('0.11'):
+        if thisbuild['gradlepluginver'] >= LooseVersion('0.8'):
             commands += ['-x', 'lintVital' + flavours_cmd + 'Release']
 
         p = FDroidPopen(commands, cwd=root_dir)
@@ -772,9 +771,7 @@ def build_local(app, thisbuild, vcs, build_dir, output_dir, srclib_dir, extlib_d
     if not os.path.exists(src):
         raise BuildException("Unsigned apk is not at expected location of " + src)
 
-    p = SilentPopen([os.path.join(config['sdk_path'], 'build-tools',
-                                  config['build_tools'], 'aapt'),
-                     'dump', 'badging', src])
+    p = SilentPopen([config['aapt'], 'dump', 'badging', src])
 
     vercode = None
     version = None
@@ -1050,20 +1047,23 @@ def main():
                 logfile.write(str(be))
                 logfile.close()
                 reason = str(be).split('\n', 1)[0] if options.verbose else str(be)
-                print("Could not build app %s due to BuildException: %s" % (
+                logging.error("Could not build app %s due to BuildException: %s" % (
                     app['id'], reason))
                 if options.stop:
                     sys.exit(1)
                 failed_apps[app['id']] = be
                 wikilog = be.get_wikitext()
             except VCSException as vcse:
-                print("VCS error while building app %s: %s" % (app['id'], vcse))
+                reason = str(vcse).split('\n', 1)[0] if options.verbose else str(vcse)
+                logging.error("VCS error while building app %s: %s" % (
+                    app['id'], reason))
                 if options.stop:
                     sys.exit(1)
                 failed_apps[app['id']] = vcse
                 wikilog = str(vcse)
             except Exception as e:
-                print("Could not build app %s due to unknown error: %s" % (app['id'], traceback.format_exc()))
+                logging.error("Could not build app %s due to unknown error: %s" % (
+                    app['id'], traceback.format_exc()))
                 if options.stop:
                     sys.exit(1)
                 failed_apps[app['id']] = e