mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-09-11 15:13:27 +02:00
lintVital was added in 0.8, only exclude it then
This commit is contained in:
parent
3c08b51dfb
commit
9779979e3a
@ -29,6 +29,7 @@ import time
|
||||
import json
|
||||
from ConfigParser import ConfigParser
|
||||
from optparse import OptionParser, OptionError
|
||||
from distutils.version import LooseVersion
|
||||
import logging
|
||||
|
||||
import common
|
||||
@ -707,7 +708,8 @@ def build_local(app, thisbuild, vcs, build_dir, output_dir, srclib_dir, extlib_d
|
||||
|
||||
# Avoid having to use lintOptions.abortOnError false
|
||||
# TODO: Do flavours or project names change this task name?
|
||||
commands += ['-x', 'lintVitalRelease']
|
||||
if thisbuild['gradlepluginver'] >= LooseVersion('0.8'):
|
||||
commands += ['-x', 'lintVital' + flavours_cmd + 'Release']
|
||||
|
||||
p = FDroidPopen(commands, cwd=gradle_dir)
|
||||
|
||||
|
@ -30,6 +30,7 @@ import Queue
|
||||
import threading
|
||||
import magic
|
||||
import logging
|
||||
from distutils.version import LooseVersion
|
||||
|
||||
import metadata
|
||||
|
||||
@ -1129,6 +1130,27 @@ def prepare_source(vcs, app, build, build_dir, srclib_dir, extlib_dir, onserver=
|
||||
if flavour in ['main', 'yes', '']:
|
||||
flavour = None
|
||||
|
||||
version_regex = re.compile(r".*'com\.android\.tools\.build:gradle:([^\.]+\.[^\.]+).*'.*")
|
||||
gradlepluginver = None
|
||||
|
||||
with open(os.path.join(root_dir, 'build.gradle')) as f:
|
||||
for line in f:
|
||||
match = version_regex.match(line)
|
||||
if match:
|
||||
gradlepluginver = match.group(1)
|
||||
break
|
||||
if '@' in build['gradle'] and not gradlepluginver:
|
||||
gradle_dir = os.path.join(root_dir, build['gradle'].split('@', 1)[1])
|
||||
gradle_dir = os.path.normpath(gradle_dir)
|
||||
with open(os.path.join(root_dir, 'build.gradle')) as f:
|
||||
for line in f:
|
||||
match = version_regex.match(line)
|
||||
if match:
|
||||
gradlepluginver = match.group(1)
|
||||
break
|
||||
|
||||
build['gradlepluginver'] = LooseVersion(gradlepluginver)
|
||||
|
||||
if build['target']:
|
||||
n = build["target"].split('-')[1]
|
||||
FDroidPopen(['sed', '-i',
|
||||
|
Loading…
Reference in New Issue
Block a user