mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-04 22:40:12 +01:00
Merge branch 'master' of gitorious.org:f-droid/fdroidserver
This commit is contained in:
commit
66e540772f
@ -603,7 +603,8 @@ want an app to act as multiple apps.
|
||||
|
||||
@cindex Web Site
|
||||
|
||||
The URL for the application's web site.
|
||||
The URL for the application's web site. If there is no relevant web site, this
|
||||
can be omitted (or left blank).
|
||||
|
||||
This is converted to (@code{<web>}) in the public index file.
|
||||
|
||||
|
@ -405,6 +405,7 @@ def build_local(app, thisbuild, vcs, build_dir, output_dir, srclib_dir, extlib_d
|
||||
p = FDroidPopen(cmd, cwd=maven_dir)
|
||||
|
||||
elif thisbuild['type'] == 'gradle':
|
||||
|
||||
print "Cleaning Gradle project..."
|
||||
cmd = [config['gradle'], 'clean']
|
||||
|
||||
@ -414,6 +415,10 @@ def build_local(app, thisbuild, vcs, build_dir, output_dir, srclib_dir, extlib_d
|
||||
else:
|
||||
gradle_dir = root_dir
|
||||
|
||||
adapt_gradle(gradle_dir)
|
||||
for name, number, libpath in srclibpaths:
|
||||
adapt_gradle(libpath)
|
||||
|
||||
p = FDroidPopen(cmd, cwd=gradle_dir)
|
||||
|
||||
elif thisbuild['type'] == 'kivy':
|
||||
@ -582,11 +587,11 @@ def build_local(app, thisbuild, vcs, build_dir, output_dir, srclib_dir, extlib_d
|
||||
elif thisbuild['type'] == 'gradle':
|
||||
print "Building Gradle project..."
|
||||
if '@' in thisbuild['gradle']:
|
||||
flavour = thisbuild['gradle'].split('@')[0]
|
||||
flavours = thisbuild['gradle'].split('@')[0].split(',')
|
||||
gradle_dir = thisbuild['gradle'].split('@')[1]
|
||||
gradle_dir = os.path.join(root_dir, gradle_dir)
|
||||
else:
|
||||
flavour = thisbuild['gradle']
|
||||
flavours = thisbuild['gradle'].split(',')
|
||||
gradle_dir = root_dir
|
||||
|
||||
|
||||
@ -600,19 +605,14 @@ def build_local(app, thisbuild, vcs, build_dir, output_dir, srclib_dir, extlib_d
|
||||
's@compileSdkVersion[ ]*[0-9]*@compileSdkVersion '+level+'@g',
|
||||
'build.gradle'], cwd=gradle_dir)
|
||||
|
||||
adapt_gradle(gradle_dir)
|
||||
|
||||
for name, number, libpath in srclibpaths:
|
||||
adapt_gradle(libpath)
|
||||
|
||||
if flavour in ['main', 'yes', '']:
|
||||
flavour = ''
|
||||
if len(flavours) == 1 and flavours[0] in ['main', 'yes', '']:
|
||||
flavours[0] = ''
|
||||
|
||||
commands = [config['gradle']]
|
||||
if 'preassemble' in thisbuild:
|
||||
for task in thisbuild['preassemble'].split():
|
||||
commands.append(task)
|
||||
commands += ['assemble'+flavour+'Release']
|
||||
commands += ['assemble'+''.join(flavours)+'Release']
|
||||
|
||||
p = FDroidPopen(commands, cwd=gradle_dir)
|
||||
|
||||
@ -657,10 +657,10 @@ def build_local(app, thisbuild, vcs, build_dir, output_dir, srclib_dir, extlib_d
|
||||
dd = build_dir
|
||||
if 'subdir' in thisbuild:
|
||||
dd = os.path.join(dd, thisbuild['subdir'])
|
||||
if flavour in ['main', 'yes', '']:
|
||||
if len(flavours) == 1 and flavours[0] == '':
|
||||
name = '-'.join([os.path.basename(dd), 'release', 'unsigned'])
|
||||
else:
|
||||
name = '-'.join([os.path.basename(dd), flavour, 'release', 'unsigned'])
|
||||
name = '-'.join([os.path.basename(dd), '-'.join(flavours), 'release', 'unsigned'])
|
||||
src = os.path.join(dd, 'build', 'apk', name+'.apk')
|
||||
else:
|
||||
stdout_apk = '\n'.join([
|
||||
|
@ -1440,6 +1440,10 @@ def FDroidPopen(commands, cwd=None):
|
||||
return result
|
||||
|
||||
def remove_signing_keys(build_dir):
|
||||
comment = re.compile(r'[ ]*//')
|
||||
signing_configs = re.compile(r'[\t ]*signingConfigs[ \t]*{[ \t]*$')
|
||||
r_open = re.compile(r'.*{[\t ]*$')
|
||||
r_close = re.compile(r'.*}[\t ]*$')
|
||||
for root, dirs, files in os.walk(build_dir):
|
||||
if 'build.gradle' in files:
|
||||
path = os.path.join(root, 'build.gradle')
|
||||
@ -1451,14 +1455,16 @@ def remove_signing_keys(build_dir):
|
||||
opened = 0
|
||||
with open(path, "w") as o:
|
||||
for line in lines:
|
||||
if 'signingConfigs ' in line:
|
||||
if comment.match(line):
|
||||
pass
|
||||
elif signing_configs.match(line):
|
||||
opened = 1
|
||||
changed = True
|
||||
elif opened > 0:
|
||||
if '{' in line:
|
||||
if r_open.match(line):
|
||||
opened += 1
|
||||
elif '}' in line:
|
||||
opened -=1
|
||||
elif r_close.match(line):
|
||||
opened -= 1
|
||||
elif any(s in line for s in (
|
||||
' signingConfig ',
|
||||
'android.signingConfigs.',
|
||||
|
Loading…
Reference in New Issue
Block a user