mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 06:50:29 +03:00
Add support for gradle={main,yes,}
This commit is contained in:
parent
dfc10b64fc
commit
b55060f4c7
1 changed files with 8 additions and 1 deletions
|
|
@ -432,6 +432,9 @@ def build_local(app, thisbuild, vcs, build_dir, output_dir, srclib_dir, extlib_d
|
||||||
's@com.android.tools.build:gradle:[0-9\.\+]*@com.android.tools.build:gradle:'+gradle_plugin+'@g',
|
's@com.android.tools.build:gradle:[0-9\.\+]*@com.android.tools.build:gradle:'+gradle_plugin+'@g',
|
||||||
'build.gradle'], cwd=root_dir)
|
'build.gradle'], cwd=root_dir)
|
||||||
|
|
||||||
|
if flavour in ['main', 'yes', '']:
|
||||||
|
flavour = ''
|
||||||
|
|
||||||
if install:
|
if install:
|
||||||
commands = [gradle, 'assemble'+flavour+'Debug', 'install'+flavour+'Debug']
|
commands = [gradle, 'assemble'+flavour+'Debug', 'install'+flavour+'Debug']
|
||||||
else:
|
else:
|
||||||
|
|
@ -490,7 +493,11 @@ def build_local(app, thisbuild, vcs, build_dir, output_dir, srclib_dir, extlib_d
|
||||||
elif 'gradle' in thisbuild:
|
elif 'gradle' in thisbuild:
|
||||||
if 'subdir' in thisbuild:
|
if 'subdir' in thisbuild:
|
||||||
build_dir = os.path.join(build_dir, thisbuild['subdir'])
|
build_dir = os.path.join(build_dir, thisbuild['subdir'])
|
||||||
src = os.path.join(build_dir, 'build', 'apk', '-'.join([os.path.basename(build_dir), flavour, 'release', 'unsigned'])+'.apk')
|
if flavour in ['main', 'yes', '']:
|
||||||
|
name = '-'.join([os.path.basename(build_dir), 'release', 'unsigned'])
|
||||||
|
else:
|
||||||
|
name = '-'.join([os.path.basename(build_dir), flavour, 'release', 'unsigned'])
|
||||||
|
src = os.path.join(build_dir, 'build', 'apk', name+'.apk')
|
||||||
else:
|
else:
|
||||||
src = re.match(r".*^.*Creating (.+) for release.*$.*", output,
|
src = re.match(r".*^.*Creating (.+) for release.*$.*", output,
|
||||||
re.S|re.M).group(1)
|
re.S|re.M).group(1)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue