chiark / gitweb /
Support auto names on gradle projects
authorDaniel Martí <mvdan@mvdan.cc>
Tue, 18 Mar 2014 14:44:39 +0000 (15:44 +0100)
committerDaniel Martí <mvdan@mvdan.cc>
Tue, 18 Mar 2014 14:44:39 +0000 (15:44 +0100)
fdroidserver/common.py

index a32e2ae58eae43147fe70656a755d3292269f025..301340e59483413c9ad34486918293b926d749b1 100644 (file)
@@ -591,13 +591,17 @@ class vcs_bzr(vcs):
 
 def retrieve_string(app_dir, string, xmlfiles=None):
 
-    res_dir = os.path.join(app_dir, 'res')
+    res_dirs = [
+            os.path.join(app_dir, 'res'),
+            os.path.join(app_dir, 'src/main/res'),
+            ]
 
     if xmlfiles is None:
         xmlfiles = []
-        for r,d,f in os.walk(res_dir):
-            if r.endswith('/values'):
-                xmlfiles += [os.path.join(r,x) for x in f if x.endswith('.xml')]
+        for res_dir in res_dirs:
+            for r,d,f in os.walk(res_dir):
+                if r.endswith('/values'):
+                    xmlfiles += [os.path.join(r,x) for x in f if x.endswith('.xml')]
 
     string_search = None
     if string.startswith('@string/'):