diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a1b2575..24ebb4d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -49,6 +49,10 @@ jobs: os: ubuntu-latest cross: true binary_path: target/aarch64-unknown-linux-gnu/release/tickrs + - target: aarch64-linux-android + os: ubuntu-latest + cross: true + binary_path: target/aarch64-linux-android/release/tickrs runs-on: ${{ matrix.target.os }} steps: diff --git a/CHANGELOG.md b/CHANGELOG.md index 2258340..96e970b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,10 @@ and `Removed`. ## [Unreleased] +### Packaging + +- Add support and releases for Android (aarch64-linux-android) + ## [0.14.3] - 2021-03-15 ### Changed diff --git a/api/src/client.rs b/api/src/client.rs index 069aeb1..ed9dbfb 100644 --- a/api/src/client.rs +++ b/api/src/client.rs @@ -3,7 +3,7 @@ use std::collections::HashMap; use anyhow::{bail, Context, Result}; use futures::AsyncReadExt; use http::Uri; -use isahc::HttpClient; +use isahc::prelude::*; use serde::de::DeserializeOwned; use crate::model::{Chart, ChartData, Company, CompanyData, Options, OptionsHeader}; @@ -182,7 +182,17 @@ impl Client { impl Default for Client { fn default() -> Client { - let client = HttpClient::new().unwrap(); + #[allow(unused_mut)] + let mut builder = HttpClient::builder(); + + #[cfg(target_os = "android")] + { + use isahc::config::SslOption; + + builder = builder.ssl_options(SslOption::DANGER_ACCEPT_INVALID_CERTS); + } + + let client = builder.build().unwrap(); let base = String::from("https://query1.finance.yahoo.com");