diff --git a/pythonforandroid/bootstraps/common/build/build.py b/pythonforandroid/bootstraps/common/build/build.py index dcb6d2ac3b..22695c1da1 100644 --- a/pythonforandroid/bootstraps/common/build/build.py +++ b/pythonforandroid/bootstraps/common/build/build.py @@ -753,6 +753,10 @@ def parse_args_and_make_package(args=None): default=[], action='append', help='Ddd a repository for gradle') + ap.add_argument('--add-gradle-buildscript-depends', dest='gradle_buildscript_depends', + default=[], + action='append', + help='Add a buildscript dependencies for gradle') ap.add_argument('--add-packaging-option', dest='packaging_options', default=[], action='append', diff --git a/pythonforandroid/bootstraps/common/build/templates/build.tmpl.gradle b/pythonforandroid/bootstraps/common/build/templates/build.tmpl.gradle index bb000393a4..c482a043cb 100644 --- a/pythonforandroid/bootstraps/common/build/templates/build.tmpl.gradle +++ b/pythonforandroid/bootstraps/common/build/templates/build.tmpl.gradle @@ -6,6 +6,9 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:7.1.2' + {%- for depend in args.gradle_buildscript_depends %} + classpath '{{depend}}' + {%- endfor %} } }