chiark / gitweb /
Remove gradle=main
authorDaniel Martí <mvdan@mvdan.cc>
Thu, 3 Dec 2015 09:56:59 +0000 (10:56 +0100)
committerDaniel Martí <mvdan@mvdan.cc>
Thu, 3 Dec 2015 09:56:59 +0000 (10:56 +0100)
It was only supported in txt metadata, and was unused in fdroiddata
anyway.

docs/fdroid.texi
fdroidserver/metadata.py

index 402a8133024899c926d88dd415667b6dc961e97d..00eca07c96a6d2481a589e3faedfc070132926bc 100644 (file)
@@ -1054,9 +1054,9 @@ adding them to 'ndk_paths' in your config file.
 Build with Gradle instead of Ant, specifying what flavours to use. Flavours
 are case sensitive since the path to the output apk is as well.
 
-If only one flavour is given and it is 'yes' or 'main', no flavour will be
-used. Note that for projects with flavours, you must specify at least one
-valid flavour since 'yes' or 'main' will build all of them separately.
+If only one flavour is given and it is 'yes', no flavour will be used.
+Note that for projects with flavours, you must specify at least one
+valid flavour since 'yes' will build all of them separately.
 
 @item maven=yes[@@<dir>]
 Build with Maven instead of Ant. An extra @@<dir> tells F-Droid to run Maven
index 12d7939ba3efcfeb8276f7158162be4b76a64be0..1db8843ddf8161d624ebf7564136bf420ee05a82 100644 (file)
@@ -981,7 +981,8 @@ def parse_yaml_metadata(metadatapath):
     return app
 
 
-build_line_sep = re.compile(r"(?<!\\),")
+build_line_sep = re.compile(r'(?<!\\),')
+build_cont = re.compile(r'^[ \t]')
 
 
 def parse_txt_metadata(metadatapath):
@@ -1005,15 +1006,11 @@ def parse_txt_metadata(metadatapath):
         t = flagtype(pk)
         if t == 'list':
             pv = split_list_values(pv)
-            if pk == 'gradle':
-                if len(pv) == 1 and pv[0] in ['main', 'yes']:
-                    pv = ['yes']
             build.set_flag(pk, pv)
         elif t == 'string' or t == 'script':
             build.set_flag(pk, pv)
         elif t == 'bool':
-            v = pv == 'yes'
-            if v:
+            if pv == 'yes':
                 build.set_flag(pk, True)
 
         else:
@@ -1068,15 +1065,7 @@ def parse_txt_metadata(metadatapath):
         linedesc = "%s:%d" % (metafile.name, c)
         line = line.rstrip('\r\n')
         if mode == 3:
-            if not any(line.startswith(s) for s in (' ', '\t')):
-                if not build.commit and not build.disable:
-                    raise MetaDataException("No commit specified for {0} in {1}"
-                                            .format(build.version, linedesc))
-
-                app.builds.append(build)
-                add_comments('build:' + build.vercode)
-                mode = 0
-            else:
+            if build_cont.match(line):
                 if line.endswith('\\'):
                     buildlines.append(line[:-1].lstrip())
                 else:
@@ -1084,6 +1073,14 @@ def parse_txt_metadata(metadatapath):
                     bl = ''.join(buildlines)
                     add_buildflag(bl, build)
                     buildlines = []
+            else:
+                if not build.commit and not build.disable:
+                    raise MetaDataException("No commit specified for {0} in {1}"
+                                            .format(build.version, linedesc))
+
+                app.builds.append(build)
+                add_comments('build:' + build.vercode)
+                mode = 0
 
         if mode == 0:
             if not line: