From d94d67cd5bd5860c71648072409e137176f9d16c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Tue, 7 Jan 2014 10:12:24 +0100 Subject: [PATCH] Don't change gradle_plugin in build.gradle files, also do srclibs --- config.buildserver.py | 1 - fdroidserver/build.py | 25 +++++++++++++------------ sampleconfigs/config.sample.py | 6 ------ 3 files changed, 13 insertions(+), 19 deletions(-) diff --git a/config.buildserver.py b/config.buildserver.py index 38e919f8..152a46e8 100644 --- a/config.buildserver.py +++ b/config.buildserver.py @@ -3,4 +3,3 @@ ndk_path = "/home/vagrant/android-ndk" build_tools = "19.0.1" mvn3 = "mvn" gradle = "gradle" -gradle_plugin = "0.7.+" diff --git a/fdroidserver/build.py b/fdroidserver/build.py index 6bbb87d4..483375e5 100644 --- a/fdroidserver/build.py +++ b/fdroidserver/build.py @@ -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 = '' diff --git a/sampleconfigs/config.sample.py b/sampleconfigs/config.sample.py index 6f4988d3..ec62d2e4 100644 --- a/sampleconfigs/config.sample.py +++ b/sampleconfigs/config.sample.py @@ -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