Skip to content

Commit b42b5fd

Browse files
committed
fix: Gradle assemble release and architecture list
Fix missing copy of native libs when assembling the APK (mozilla/rust-android-gradle#85). Restrict supported architectures to aarch64 and x86_64.
1 parent 6984c6e commit b42b5fd

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

you-have-mail-android/app/build.gradle

+15-8
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ android {
1313
applicationId "dev.lbeernaert.youhavemail"
1414
minSdk 29
1515
targetSdk 33
16-
versionCode 18
17-
versionName "0.7.0"
16+
versionCode 19
17+
versionName "0.7.1"
1818

1919
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
2020
vectorDrawables {
@@ -47,6 +47,12 @@ android {
4747
}
4848
}
4949
ndkVersion "25.2.9519653"
50+
51+
defaultConfig {
52+
ndk {
53+
abiFilters 'arm64-v8a', 'x86_64'
54+
}
55+
}
5056
}
5157

5258
dependencies {
@@ -85,13 +91,14 @@ cargo {
8591
}*/
8692
}
8793

88-
afterEvaluate {
89-
90-
tasks.whenTaskAdded { task ->
91-
if ((task.name == 'javaPreCompileDebug' || task.name == 'javaPreCompileRelease')) {
92-
task.dependsOn 'cargoBuild'
93-
}
94+
tasks.whenTaskAdded { task ->
95+
// Require cargo to be run before copying native libraries.
96+
if ((task.name == 'mergeDebugJniLibFolders' || task.name == 'mergeReleaseJniLibFolders')) {
97+
task.dependsOn 'cargoBuild'
9498
}
99+
}
100+
101+
afterEvaluate {
95102

96103
// The `cargoBuild` task isn't available until after evaluation.
97104
android.applicationVariants.all { variant ->

0 commit comments

Comments
 (0)