include openssl
This commit is contained in:
parent
b864ec96b9
commit
f871e6a81c
4 changed files with 24 additions and 0 deletions
5
android/CMakeLists.txt
Normal file
5
android/CMakeLists.txt
Normal 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)
|
|
@ -32,9 +32,26 @@ android {
|
||||||
}
|
}
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion 16
|
minSdkVersion 16
|
||||||
|
|
||||||
|
externalNativeBuild {
|
||||||
|
cmake {
|
||||||
|
arguments "-DANDROID_STL=c++_shared"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
externalNativeBuild {
|
||||||
|
cmake {
|
||||||
|
path "CMakeLists.txt"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
buildFeatures {
|
||||||
|
prefab true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
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
0
android/empty.c
Normal file
|
@ -20,4 +20,6 @@ A new flutter plugin project.
|
||||||
# Flutter.framework does not contain a i386 slice.
|
# Flutter.framework does not contain a i386 slice.
|
||||||
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' }
|
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' }
|
||||||
s.swift_version = '5.0'
|
s.swift_version = '5.0'
|
||||||
|
|
||||||
|
s.dependency 'OpenSSL-Universal'
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue