chiark / gitweb /
Fixes to gradle builds
authorDaniel Martí <mvdan@mvdan.cc>
Sun, 1 Sep 2013 09:56:57 +0000 (11:56 +0200)
committerDaniel Martí <mvdan@mvdan.cc>
Sun, 1 Sep 2013 09:56:57 +0000 (11:56 +0200)
It now adapts/seds all build.gradle files under build_dir, i.e. the root dir
(even if subdir is used). This is very necessary when libraries are under
parent directories or when a father build.gradle file exists.

fdroidserver/build.py

index 6b1c41d06c0391ea1bf02c5a3366d024fd4c7145..4ceb70e78e5f9067abd62e67cc5f64bcae1e2716 100644 (file)
@@ -466,12 +466,11 @@ 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):
-            root = os.path.relpath(root, gradle_dir)
+        for root, dirs, files in os.walk(build_dir):
             for f in files:
                 if f == 'build.gradle':
-                    adapt_gradle(os.path.join(gradle_dir, root, f), verbose)
-                    continue
+                    adapt_gradle(os.path.join(root, f), verbose)
+                    break
 
         if flavour in ['main', 'yes', '']:
             flavour = ''