diff --git a/cookiecutter.json b/cookiecutter.json index 9a588b4..adbf6a1 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -18,7 +18,6 @@ "python_version": "3.X.0", "min_os_version": "24", "target_os_version": "35", - "extract_packages" : "", "build_gradle_dependencies": "", "build_gradle_extra_content": "", "android_manifest_attrs_extra_content": "", diff --git a/{{ cookiecutter.format }}/app/build.gradle b/{{ cookiecutter.format }}/app/build.gradle index aa3a62c..c3c0547 100644 --- a/{{ cookiecutter.format }}/app/build.gradle +++ b/{{ cookiecutter.format }}/app/build.gradle @@ -31,9 +31,11 @@ android { pipOptions = pipOptions.findAll { !it.isBlank() } options(*pipOptions) } - {%- if cookiecutter.extract_packages %} - extractPackages {{ cookiecutter.extract_packages }} - {%- endif %} + def f = new File(project.projectDir, "extract-packages.txt") + def packages = f.readLines("utf-8") + .collect { it.trim() } + .findAll { !it.isBlank() } + extractPackages(*packages) } ndk { {% if cookiecutter.python_version|py_tag in ["3.9", "3.10", "3.11"] %} diff --git a/{{ cookiecutter.format }}/briefcase.toml b/{{ cookiecutter.format }}/briefcase.toml index 87b0b1b..40708a9 100644 --- a/{{ cookiecutter.format }}/briefcase.toml +++ b/{{ cookiecutter.format }}/briefcase.toml @@ -1,12 +1,13 @@ # Generated using Python {{ cookiecutter.python_version }} [briefcase] -target_version = "0.3.15" +target_version = "0.3.27" [paths] app_path = "app/src/main/python" app_requirements_path = "app/requirements.txt" app_requirement_installer_args_path = "app/pip-options.txt" metadata_resource_path = "app/src/main/res/values/briefcase.xml" +extract_packages_path = "app/extract-packages.txt" icon.round.48 = "app/src/main/res/mipmap-mdpi/ic_launcher_round.png" icon.round.72 = "app/src/main/res/mipmap-hdpi/ic_launcher_round.png"