Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(android): set default ABI filters only if none are defined #174

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,11 @@ import org.gradle.internal.os.OperatingSystem;
import org.gradle.util.GradleVersion;

cdvPluginPostBuildExtras += { ->
// Set it to the supported architectures.
logger.info("nodejs-mobile-cordova were set [\"armeabi-v7a\", \"arm64-v8a\", \"x86_64\"] for ABI filters.");
android.defaultConfig.ndk.abiFilters = ["armeabi-v7a", "arm64-v8a", "x86_64"] as Set<String>;
if (android.defaultConfig.ndk.abiFilters == null) {
// No abiFilter is defined for the build. Set it to the supported architectures.
logger.info("nodejs-mobile-cordova detected no ABI filters were set. Will use [\"armeabi-v7a\", \"arm64-v8a\", \"x86_64\"] for ABI filters.");
android.defaultConfig.ndk.abiFilters = ["armeabi-v7a", "arm64-v8a", "x86_64"] as Set<String>;
}

// gzip files will cause errors with aapt. Remove them for improved npm compatibility.
android.aaptOptions.ignoreAssetsPattern += ":!*.gz";
Expand Down
Loading