From e3cf97ad6c4bd56211919dbdc8dc28daea48e6b9 Mon Sep 17 00:00:00 2001 From: Kevin Ollivier Date: Wed, 22 Apr 2020 18:07:35 -0700 Subject: [PATCH 1/3] Switch to using Gradle srcDir props for extra source dirs. --- .../bootstraps/common/build/templates/build.tmpl.gradle | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pythonforandroid/bootstraps/common/build/templates/build.tmpl.gradle b/pythonforandroid/bootstraps/common/build/templates/build.tmpl.gradle index 7b6ba8390b..2b0c540f06 100644 --- a/pythonforandroid/bootstraps/common/build/templates/build.tmpl.gradle +++ b/pythonforandroid/bootstraps/common/build/templates/build.tmpl.gradle @@ -85,6 +85,13 @@ android { sourceSets { main { jniLibs.srcDir 'libs' + java { + + {%- for adir, pattern in args.extra_source_dirs -%} + srcDir '{{adir}}' + {%- endfor -%} + + } } } From df62c605dd3473236e47ec656f3cdcee81c2da1c Mon Sep 17 00:00:00 2001 From: Kevin Ollivier Date: Sun, 26 Apr 2020 10:27:01 -0700 Subject: [PATCH 2/3] Add warning about only supporting source dir includes with gradle. --- pythonforandroid/bootstraps/common/build/build.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pythonforandroid/bootstraps/common/build/build.py b/pythonforandroid/bootstraps/common/build/build.py index 8eb1a6fe0e..41fced91a8 100644 --- a/pythonforandroid/bootstraps/common/build/build.py +++ b/pythonforandroid/bootstraps/common/build/build.py @@ -380,6 +380,9 @@ def make_package(args): for spec in args.extra_source_dirs: if ':' in spec: specdir, specincludes = spec.split(':') + print('WARNING: Currently gradle builds only support including source ' + 'directories, so when building using gradle, all files in ' + '{} will be incldued.',format(specdir)) else: specdir = spec specincludes = '**' From 0a56e800478e20bf6d71f2b779f26fc8a4c30141 Mon Sep 17 00:00:00 2001 From: Alexander Taylor Date: Sun, 26 Apr 2020 19:12:45 +0100 Subject: [PATCH 3/3] Fixed typos in gradle source directory warning --- pythonforandroid/bootstraps/common/build/build.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pythonforandroid/bootstraps/common/build/build.py b/pythonforandroid/bootstraps/common/build/build.py index 41fced91a8..fc8c8b43ce 100644 --- a/pythonforandroid/bootstraps/common/build/build.py +++ b/pythonforandroid/bootstraps/common/build/build.py @@ -381,8 +381,8 @@ def make_package(args): if ':' in spec: specdir, specincludes = spec.split(':') print('WARNING: Currently gradle builds only support including source ' - 'directories, so when building using gradle, all files in ' - '{} will be incldued.',format(specdir)) + 'directories, so when building using gradle all files in ' + '{} will be included.'.format(specdir)) else: specdir = spec specincludes = '**'