mirror of
https://github.com/MAGICGrants/flutter_libsparkmobile.git
synced 2026-01-08 20:47:56 -05:00
zlib isn't even used and fix all android platforms
This commit is contained in:
@@ -31,7 +31,8 @@ android {
|
||||
|
||||
// Bumping the plugin ndkVersion requires all clients of this plugin to bump
|
||||
// the version in their app and to download a newer version of the NDK.
|
||||
ndkVersion "23.1.7779620"
|
||||
// ndkVersion "23.1.7779620"
|
||||
ndkVersion = "21.1.6352462"
|
||||
|
||||
// Invoke the shared CMake build with the Android Gradle Plugin.
|
||||
externalNativeBuild {
|
||||
@@ -54,15 +55,14 @@ android {
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 16
|
||||
minSdkVersion 21
|
||||
ndkVersion = "21.1.6352462"
|
||||
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
arguments "-DBUILD_FOR_SYSTEM_NAME=android", "-DANDROID_STL=c++_shared", "-DANDROID_TOOLCHAIN=clang -v"
|
||||
cppFlags "-frtti -fexceptions -v -DANDROID -std=c++17"
|
||||
abiFilters 'x86_64', 'arm64-v8a'
|
||||
// abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'
|
||||
abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ android {
|
||||
applicationId "com.cypherstack.flutter_libsparkmobile_example"
|
||||
// You can update the following values to match your application needs.
|
||||
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
|
||||
minSdkVersion flutter.minSdkVersion
|
||||
minSdkVersion 21
|
||||
targetSdkVersion flutter.targetSdkVersion
|
||||
versionCode flutterVersionCode.toInteger()
|
||||
versionName flutterVersionName
|
||||
|
||||
@@ -30,22 +30,10 @@ unzip "$ANDROID_NDK_ZIP" -d "$WORKDIR"
|
||||
|
||||
|
||||
# openssl
|
||||
OPENSSL_FILENAME="openssl-1.1.1k.tar.gz"
|
||||
OPENSSL_FILENAME="openssl-1.1.1q.tar.gz"
|
||||
OPENSSL_FILE_PATH="$WORKDIR/$OPENSSL_FILENAME"
|
||||
OPENSSL_SRC_DIR="$WORKDIR/openssl-1.1.1k"
|
||||
OPENSSL_SHA256="892a0875b9872acd04a9fde79b1f943075d5ea162415de3047c327df33fbaee5"
|
||||
ZLIB_DIR="$WORKDIR/zlib"
|
||||
ZLIB_TAG="v1.2.11"
|
||||
ZLIB_COMMIT_HASH="cacf7f1d4e3d44d871b605da3b647f07d718623f"
|
||||
|
||||
|
||||
if [ ! -d "$ZLIB_DIR" ] ; then
|
||||
git clone -b $ZLIB_TAG --depth 1 https://github.com/madler/zlib "$ZLIB_DIR"
|
||||
fi
|
||||
cd "$ZLIB_DIR"
|
||||
git reset --hard $ZLIB_COMMIT_HASH
|
||||
CC=clang CXX=clang++ ./configure --static
|
||||
make
|
||||
OPENSSL_SRC_DIR="$WORKDIR/openssl-1.1.1q"
|
||||
OPENSSL_SHA256="d7939ce614029cdff0b6c20f0e2e5703158a489a72b2507b8bd51bf8c8fd10ca"
|
||||
|
||||
if [ ! -e "$OPENSSL_FILE_PATH" ]; then
|
||||
curl https://www.openssl.org/source/$OPENSSL_FILENAME -o "$OPENSSL_FILE_PATH"
|
||||
@@ -85,8 +73,6 @@ tar -xzf "$OPENSSL_FILE_PATH" -C "$WORKDIR"
|
||||
cd "$OPENSSL_SRC_DIR"
|
||||
./Configure CC=${CLANG} CXX=${CXXLANG} ${X_ARCH} \
|
||||
no-asm no-shared no-tests --static \
|
||||
--with-zlib-include="${PREFIX}"/include \
|
||||
--with-zlib-lib="${PREFIX}"/lib \
|
||||
--prefix="${PREFIX}" \
|
||||
--openssldir="${PREFIX}" \
|
||||
-D__ANDROID_API__=$API
|
||||
|
||||
Reference in New Issue
Block a user