The curl-ssl sample shows how to import native dependencies from Maven. This sample uses curl, OpenSSL, and JsonCpp to display a list of the most recent 10 reviews submitted to AOSP's code review system.
- Android Gradle Plugin 4.0+
- The Android NDK.
The C++ code in this sample can be built with either CMake (the default for this
project) or ndk-build. To use ndk-build set the
ndkBuild project property
either in your
local.properties file or on the command line by passing the
-PndkBuild flag when building.
To build with Android Studio:
- Open this project in Android Studio.
- Click *Run/Run 'app'.
To build from the command line:
- Navigate to this directory in your terminal.
gradlew.bat installDebugon Windows).
As explained by this Stack Overflow post, the root certificates presented by Android since ICS are not in the format OpenSSL expects, so we need to provide our own certificate file. We do this by downloading curl's cacert.pem and storing that in our assets directory, as described in this Stack Overflow post.
If you've found an error in these samples, please file an issue.
Patches are encouraged, and may be submitted by submitting a pull request through GitHub. Please see CONTRIBUTING.md for more details.