mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-09-11 15:13:27 +02:00
Don't change gradle_plugin in build.gradle files, also do srclibs
This commit is contained in:
parent
7f6761c436
commit
d94d67cd5b
@ -3,4 +3,3 @@ ndk_path = "/home/vagrant/android-ndk"
|
||||
build_tools = "19.0.1"
|
||||
mvn3 = "mvn"
|
||||
gradle = "gradle"
|
||||
gradle_plugin = "0.7.+"
|
||||
|
@ -369,14 +369,16 @@ def build_server(app, thisbuild, vcs, build_dir, output_dir, force):
|
||||
subprocess.call(['vagrant', 'suspend'], cwd='builder')
|
||||
|
||||
def adapt_gradle(path):
|
||||
if options.verbose:
|
||||
print "Adapting build.gradle at %s" % path
|
||||
for root, dirs, files in os.walk(path):
|
||||
for f in files:
|
||||
if f == 'build.gradle':
|
||||
if options.verbose:
|
||||
print "Adapting build.gradle at %s" % path
|
||||
|
||||
subprocess.call(['sed', '-i',
|
||||
's@buildToolsVersion[ ]*["\\\'][0-9\.]*["\\\']@buildToolsVersion "'+ config['build_tools'] +'"@g', path])
|
||||
|
||||
subprocess.call(['sed', '-i',
|
||||
's@com.android.tools.build:gradle:[0-9\.\+]*@com.android.tools.build:gradle:'+ config['gradle_plugin'] +'@g', path])
|
||||
subprocess.call(['sed', '-i',
|
||||
's@buildToolsVersion[ ]*["\\\'][0-9\.]*["\\\']@buildToolsVersion "'
|
||||
+ config['build_tools'] + '"@g', path])
|
||||
break
|
||||
|
||||
|
||||
def build_local(app, thisbuild, vcs, build_dir, output_dir, srclib_dir, extlib_dir, tmp_dir, force, onserver):
|
||||
@ -596,11 +598,10 @@ 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)
|
||||
|
||||
for root, dirs, files in os.walk(gradle_dir):
|
||||
for f in files:
|
||||
if f == 'build.gradle':
|
||||
adapt_gradle(os.path.join(root, f))
|
||||
break
|
||||
adapt_gradle(gradle_dir)
|
||||
|
||||
for name, number, libpath in srclibpaths:
|
||||
adapt_gradle(libpath)
|
||||
|
||||
if flavour in ['main', 'yes', '']:
|
||||
flavour = ''
|
||||
|
@ -21,12 +21,6 @@ mvn3 = "mvn3"
|
||||
# Command for running Gradle (command or full path)
|
||||
gradle = "gradle"
|
||||
|
||||
# Android gradle plugin version
|
||||
# "0.5.+" -> gradle 1.7
|
||||
# "0.6.+" -> gradle 1.8
|
||||
# "0.7.+" -> gradle 1.9
|
||||
gradle_plugin = "0.7.+"
|
||||
|
||||
# Max height and width (in pixels) for the icons in the repo
|
||||
# This corresponds to 72x72 pixels, i.e. mdpi
|
||||
icon_max_size = 72
|
||||
|
Loading…
Reference in New Issue
Block a user