-
-
Notifications
You must be signed in to change notification settings - Fork 25
/
build.gradle
66 lines (58 loc) · 2.34 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
apply plugin: 'com.android.application'
apply plugin: 'com.chaquo.python'
android {
// Android 14 == SDK Level 34. This number should generally be kept up to date with
// the most recent supported Android release.
compileSdkVersion 34
namespace "{{ cookiecutter.package_name }}.{{ cookiecutter.module_name }}"
defaultConfig {
applicationId "{{ cookiecutter.package_name }}.{{ cookiecutter.module_name }}"
versionCode {{ cookiecutter.version_code }}
versionName "{{ cookiecutter.version }}"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
// Briefcase currently requires API Level 24 for the `pidof` command, and the `--pid`
// argument to `adb logcat`. This supports over 97% of active devices (as of sept 2024).
minSdkVersion 24
// This should generally match the compileSDKVersion from above.
targetSdkVersion 34
python {
version "{{ cookiecutter.python_version|py_tag }}"
pip {
install "-r", "requirements.txt"
}
{%- if cookiecutter.extract_packages %}
extractPackages {{ cookiecutter.extract_packages }}
{%- endif %}
}
ndk {
{% if cookiecutter.python_version|py_tag in ["3.9", "3.10", "3.11"] %}
// Chaquopy also supports x86, but it's not very useful anymore, so we'll
// disable it to speed up the build.
abiFilters "arm64-v8a", "armeabi-v7a", "x86_64"
{% else %}
// For this Python version, only 64-bit ABIs are available.
abiFilters "arm64-v8a", "x86_64"
{% endif %}
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
{%- if cookiecutter.build_gradle_dependencies -%}
{%- for lib in cookiecutter.build_gradle_dependencies.implementation %}
implementation "{{ lib }}"
{%- endfor %}
{% endif -%}
}
// ========== START USER PROVIDED CONTENT ==========
{{ cookiecutter.build_gradle_extra_content }}