Merge branch 'master' into logging

Conflicts:
	fdroidserver/common.py
This commit is contained in:
Daniel Martí 2014-01-28 14:14:59 +01:00
commit 2f93ba9bd6
13 changed files with 63 additions and 60 deletions

View file

@ -3,7 +3,7 @@
#
# build.py - part of the FDroid server tools
# Copyright (C) 2010-13, Ciaran Gultnieks, ciaran@ciarang.com
# Copyright (C) 2013 Daniel Martí <mvdan@mvdan.cc>
# Copyright (C) 2013-2014 Daniel Martí <mvdan@mvdan.cc>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
@ -578,17 +578,6 @@ def build_local(app, thisbuild, vcs, build_dir, output_dir, srclib_dir, extlib_d
flavours = thisbuild['gradle'].split(',')
gradle_dir = root_dir
if 'compilesdk' in thisbuild:
level = thisbuild["compilesdk"].split('-')[1]
subprocess.call(['sed', '-i',
's@compileSdkVersion[ ]*[0-9]*@compileSdkVersion '+level+'@g',
'build.gradle'], cwd=root_dir)
if '@' in thisbuild['gradle']:
subprocess.call(['sed', '-i',
's@compileSdkVersion[ ]*[0-9]*@compileSdkVersion '+level+'@g',
'build.gradle'], cwd=gradle_dir)
if len(flavours) == 1 and flavours[0] in ['main', 'yes', '']:
flavours[0] = ''
@ -614,10 +603,6 @@ def build_local(app, thisbuild, vcs, build_dir, output_dir, srclib_dir, extlib_d
raise BuildException("Build failed for %s:%s" % (app['id'], thisbuild['version']), p.stdout)
logging.info("Successfully built version " + thisbuild['version'] + ' of ' + app['id'])
# Find the apk name in the output...
if 'bindir' in thisbuild:
bindir = os.path.join(build_dir, thisbuild['bindir'])
if thisbuild['type'] == 'maven':
stdout_apk = '\n'.join([
line for line in p.stdout.splitlines() if any(a in line for a in ('.apk','.ap_'))])

View file

@ -3,7 +3,7 @@
#
# checkupdates.py - part of the FDroid server tools
# Copyright (C) 2010-13, Ciaran Gultnieks, ciaran@ciarang.com
# Copyright (C) 2013 Daniel Martí <mvdan@mvdan.cc>
# Copyright (C) 2013-2014 Daniel Martí <mvdan@mvdan.cc>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by

View file

@ -2,7 +2,7 @@
#
# common.py - part of the FDroid server tools
# Copyright (C) 2010-13, Ciaran Gultnieks, ciaran@ciarang.com
# Copyright (C) 2013 Daniel Martí <mvdan@mvdan.cc>
# Copyright (C) 2013-2014 Daniel Martí <mvdan@mvdan.cc>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
@ -913,8 +913,8 @@ def prepare_source(vcs, app, build, build_dir, srclib_dir, extlib_dir, onserver=
srclibpaths.append(basesrclib)
# Generate (or update) the ant build file, build.xml
if (updatemode != 'no' and build['type'] == 'ant'):
# Generate (or update) the ant build file, build.xml...
if updatemode != 'no' and build['type'] == 'ant':
parms = [os.path.join(config['sdk_path'], 'tools', 'android'),
'update', 'project']
if 'target' in build and build['target']:
@ -988,6 +988,18 @@ def prepare_source(vcs, app, build, build_dir, srclib_dir, extlib_dir, onserver=
if flavour in ['main', 'yes', '']:
flavour = None
if 'target' in build:
n = build["target"].split('-')[1]
subprocess.call(['sed', '-i',
's@compileSdkVersion[ ]*[0-9]*@compileSdkVersion '+n+'@g',
'build.gradle'], cwd=root_dir)
if '@' in build['gradle']:
gradle_dir = os.path.join(root_dir, build['gradle'].split('@',1)[1])
gradle_dir = os.path.normpath(gradle_dir)
subprocess.call(['sed', '-i',
's@compileSdkVersion[ ]*[0-9]*@compileSdkVersion '+n+'@g',
'build.gradle'], cwd=gradle_dir)
# Remove forced debuggable flags
logging.info("Removing debuggable flags")
for path in manifest_paths(root_dir, flavour):
@ -1466,8 +1478,10 @@ def place_srclib(root_dir, number, libpath):
relpath = os.path.relpath(libpath, root_dir)
proppath = os.path.join(root_dir, 'project.properties')
with open(proppath, "r") as o:
lines = o.readlines()
lines = []
if os.path.isfile(proppath):
with open(proppath, "r") as o:
lines = o.readlines()
with open(proppath, "w") as o:
placed = False

View file

@ -3,7 +3,7 @@
#
# import.py - part of the FDroid server tools
# Copyright (C) 2010-13, Ciaran Gultnieks, ciaran@ciarang.com
# Copyright (C) 2013 Daniel Martí <mvdan@mvdan.cc>
# Copyright (C) 2013-2014 Daniel Martí <mvdan@mvdan.cc>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by

View file

@ -3,7 +3,7 @@
#
# update.py - part of the FDroid server tools
# Copyright (C) 2010-2013, Ciaran Gultnieks, ciaran@ciarang.com
# Copyright (C) 2013 Daniel Martí <mvdan@mvdan.cc>
# Copyright (C) 2013-2014 Daniel Martí <mvdan@mvdan.cc>
# Copyright (C) 2013 Hans-Christoph Steiner <hans@eds.org>
#
# This program is free software: you can redistribute it and/or modify

View file

@ -3,7 +3,7 @@
#
# verify.py - part of the FDroid server tools
# Copyright (C) 2013, Ciaran Gultnieks, ciaran@ciarang.com
# Copyright (C) 2013 Daniel Martí <mvdan@mvdan.cc>
# Copyright (C) 2013-2014 Daniel Martí <mvdan@mvdan.cc>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by

View file

@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-
#
# rewritemeta.py - part of the FDroid server tool
# Copyright (C) 2010-12, Ciaran Gultnieks, ciaran@ciarang.com
# Copyright (C) 2013-2014 Daniel Martí <mvdan@mvdan.cc>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by

View file

@ -2,7 +2,7 @@
#
# common.py - part of the FDroid server tools
# Copyright (C) 2013, Ciaran Gultnieks, ciaran@ciarang.com
# Copyright (C) 2013 Daniel Martí <mvdan@mvdan.cc>
# Copyright (C) 2013-2014 Daniel Martí <mvdan@mvdan.cc>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
@ -699,7 +699,7 @@ def write_metadata(dest, app):
# This defines the preferred order for the build items - as in the
# manual, they're roughly in order of application.
keyorder = ['disable', 'commit', 'subdir', 'submodules', 'init',
'gradle', 'maven', 'oldsdkloc', 'target', 'compilesdk',
'gradle', 'maven', 'oldsdkloc', 'target',
'update', 'encoding', 'forceversion', 'forcevercode', 'rm',
'fixtrans', 'fixapos', 'extlibs', 'srclibs', 'patch',
'prebuild', 'scanignore', 'scandelete', 'build', 'buildjni',

View file

@ -3,7 +3,7 @@
#
# publish.py - part of the FDroid server tools
# Copyright (C) 2010-13, Ciaran Gultnieks, ciaran@ciarang.com
# Copyright (C) 2013 Daniel Martí <mvdan@mvdan.cc>
# Copyright (C) 2013-2014 Daniel Martí <mvdan@mvdan.cc>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by

View file

@ -3,7 +3,7 @@
#
# update.py - part of the FDroid server tools
# Copyright (C) 2010-2013, Ciaran Gultnieks, ciaran@ciarang.com
# Copyright (C) 2013 Daniel Martí <mvdan@mvdan.cc>
# Copyright (C) 2013-2014 Daniel Martí <mvdan@mvdan.cc>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by