mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-14 19:10:11 +01:00
import: add option to specify license and categories, auto-detect build.gradle
This commit is contained in:
parent
39f7429c9b
commit
13b276e02f
@ -184,6 +184,10 @@ def main():
|
|||||||
help="Project URL to import from.")
|
help="Project URL to import from.")
|
||||||
parser.add_argument("-s", "--subdir", default=None,
|
parser.add_argument("-s", "--subdir", default=None,
|
||||||
help="Path to main android project subdirectory, if not in root.")
|
help="Path to main android project subdirectory, if not in root.")
|
||||||
|
parser.add_argument("-c", "--categories", default=None,
|
||||||
|
help="Comma separated list of categories.")
|
||||||
|
parser.add_argument("-l", "--license", default=None,
|
||||||
|
help="Overall license of the project.")
|
||||||
parser.add_argument("--rev", default=None,
|
parser.add_argument("--rev", default=None,
|
||||||
help="Allows a different revision (or git branch) to be specified for the initial import")
|
help="Allows a different revision (or git branch) to be specified for the initial import")
|
||||||
metadata.add_metadata_arguments(parser)
|
metadata.add_metadata_arguments(parser)
|
||||||
@ -271,8 +275,14 @@ def main():
|
|||||||
build.versionCode = versionCode or '?'
|
build.versionCode = versionCode or '?'
|
||||||
if options.subdir:
|
if options.subdir:
|
||||||
build.subdir = options.subdir
|
build.subdir = options.subdir
|
||||||
|
if options.license:
|
||||||
|
app.License = options.license
|
||||||
|
if options.categories:
|
||||||
|
app.Categories = options.categories
|
||||||
if os.path.exists(os.path.join(root_dir, 'jni')):
|
if os.path.exists(os.path.join(root_dir, 'jni')):
|
||||||
build.buildjni = ['yes']
|
build.buildjni = ['yes']
|
||||||
|
if os.path.exists(os.path.join(root_dir, 'build.gradle')):
|
||||||
|
build.gradle = ['yes']
|
||||||
|
|
||||||
metadata.post_metadata_parse(app)
|
metadata.post_metadata_parse(app)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user