include openssl

This commit is contained in:
Lukas Lihotzki 2021-04-19 20:35:05 +02:00
parent b864ec96b9
commit f871e6a81c
4 changed files with 24 additions and 0 deletions

5
android/CMakeLists.txt Normal file
View file

@ -0,0 +1,5 @@
cmake_minimum_required(VERSION 3.6)
project(flutter_openssl_crypto)
find_package(openssl REQUIRED CONFIG)
add_library(${PROJECT_NAME} SHARED empty.c)
target_link_libraries(${PROJECT_NAME} PRIVATE openssl::crypto)

View file

@ -32,9 +32,26 @@ android {
}
defaultConfig {
minSdkVersion 16
externalNativeBuild {
cmake {
arguments "-DANDROID_STL=c++_shared"
}
}
}
externalNativeBuild {
cmake {
path "CMakeLists.txt"
}
}
buildFeatures {
prefab true
}
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "com.android.ndk.thirdparty:openssl:1.1.1g-alpha-1"
}

0
android/empty.c Normal file
View file

View file

@ -20,4 +20,6 @@ A new flutter plugin project.
# Flutter.framework does not contain a i386 slice.
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' }
s.swift_version = '5.0'
s.dependency 'OpenSSL-Universal'
end