From f8e10b6b02655b94c9959b1a4475698ebf14ec36 Mon Sep 17 00:00:00 2001 From: AndrewBalakirev Date: Sat, 25 Jun 2022 16:28:53 +0700 Subject: [PATCH] Add the 'add-gradle-buildscript-depends' argument --- pythonforandroid/bootstraps/common/build/build.py | 4 ++++ .../bootstraps/common/build/templates/build.tmpl.gradle | 3 +++ 2 files changed, 7 insertions(+) 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 %} } }