Files
firezone/kotlin/android
dependabot[bot] 405cf338d6 build(deps): Bump com.google.code.gson:gson from 2.10.1 to 2.11.0 in /kotlin/android (#5322)
Bumps [com.google.code.gson:gson](https://github.com/google/gson) from
2.10.1 to 2.11.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/google/gson/releases">com.google.code.gson:gson's
releases</a>.</em></p>
<blockquote>
<h2>Gson 2.11.0</h2>
<h1>Most important changes</h1>
<ul>
<li>Added default ProGuard / R8 rules (<a
href="https://github.com/Marcono1234"><code>@​Marcono1234</code></a>, <a
href="https://redirect.github.com/google/gson/issues/2397">#2397</a>, <a
href="https://redirect.github.com/google/gson/issues/2420">#2420</a>; <a
href="https://github.com/sgjesse"><code>@​sgjesse</code></a>, <a
href="https://redirect.github.com/google/gson/issues/2448">#2448</a>; <a
href="https://github.com/sfreilich"><code>@​sfreilich</code></a>)<br />
If you are using ProGuard or R8 (for example for Android projects) you
might not need any special Gson configuration anymore if your classes
have a no-args constructor and use <code>@SerializedName</code> for
their fields.</li>
<li>On Android, Gson now requires API level 21 or newer</li>
<li>Added new <code>Strictness</code> API (<a
href="https://github.com/marten-voorberg"><code>@​marten-voorberg</code></a>
&amp; fellow students, <a
href="https://redirect.github.com/google/gson/issues/2437">#2437</a>)<br
/>
Some of Gson's API is still lenient by default, but you can now use the
newly added methods <code>GsonBuilder#setStrictness</code>,
<code>JsonReader#setStrictness</code> and
<code>JsonWriter#setStrictness</code> with
<code>Strictness.STRICT</code> to override this behavior and to instead
strictly adhere to the JSON specification when parsing.</li>
<li>New <code>FormattingStyle</code> class to allow configuring line
breaks in JSON output (<a
href="https://github.com/mihnita"><code>@​mihnita</code></a>, <a
href="https://redirect.github.com/google/gson/issues/2231">#2231</a>)<br
/>
Can be set using <code>GsonBuilder#setFormattingStyle</code> and
<code>JsonWriter#setFormattingStyle</code>.</li>
<li><code>TypeToken</code> can no longer capture type variables by
default (<a
href="https://github.com/Marcono1234"><code>@​Marcono1234</code></a>, <a
href="https://redirect.github.com/google/gson/issues/2376">#2376</a>)<br
/>
This was previously a common source of issues. The newly thrown
exception refers to a <a
href="https://github.com/google/gson/blob/main/Troubleshooting.md#typetoken-type-variable">Troubleshooting
Guide article</a> which explains this in more detail and provides
suggestions for updating affected code.</li>
<li>Added serialization support for anonymous and local classes with a
custom adapter (<a
href="https://github.com/Marcono1234"><code>@​Marcono1234</code></a>, <a
href="https://redirect.github.com/google/gson/issues/2498">#2498</a>)<br
/>
This affects for example <code>List</code> implementations returned by
libraries such as Guava which are implemented as anonymous class, which
were previously serialized as <code>null</code>. Anonymous and local
classes without custom adapter will still be serialized as
<code>null</code>.</li>
<li>Added dependency on
<code>com.google.errorprone:error_prone_annotations</code><br />
Your project can use Maven or Gradle dependency exclusions to remove the
transitive error_prone_annotations dependency from Gson. Or if you are
manually maintaining dependencies as JARs in your project you can omit
error_prone_annotations. And it should still work correctly.<br />
But Gson itself does declare it as a required dependency, and if you
don't perform any custom configuration, then Maven or Gradle will by
default try to download and use it.</li>
<li>Many exception messages now refer to the <a
href="https://github.com/google/gson/blob/main/Troubleshooting.md">Troubleshooting
Guide</a> (<a
href="https://github.com/Marcono1234"><code>@​Marcono1234</code></a>, <a
href="https://redirect.github.com/google/gson/issues/2357">#2357</a>)<br
/>
Feedback regarding the Troubleshooting Guide is appreciated!</li>
<li>Officially documented that JVM languages other than Java might not
be fully supported, see the <a
href="https://github.com/google/gson/blob/main/README.md">README</a>.</li>
<li>Guarantee that <code>JsonElement#toString</code> produces JSON
output (<a
href="https://github.com/Marcono1234"><code>@​Marcono1234</code></a>, <a
href="https://redirect.github.com/google/gson/issues/2659">#2659</a>)</li>
</ul>
<h1>Other changes</h1>
<h2>Bug fixes</h2>
<ul>
<li>Fixed incorrect <code>JsonPrimitive#equals</code> results for large
<code>BigInteger</code> values (<a
href="https://github.com/MaicolAntali"><code>@​MaicolAntali</code></a>,
<a
href="https://redirect.github.com/google/gson/issues/2311">#2311</a>)</li>
<li>Fixed incorrect <code>JsonPrimitive#equals</code> results for large
<code>BigDecimal</code> values (<a
href="https://github.com/MaicolAntali"><code>@​MaicolAntali</code></a>,
<a
href="https://redirect.github.com/google/gson/issues/2364">#2364</a>)</li>
<li>Fixed <code>JsonReader</code> throwing
<code>NumberFormatException</code> instead of
<code>MalformedJsonException</code> for malformed Unicode escape
sequences (<a
href="https://github.com/MaicolAntali"><code>@​MaicolAntali</code></a>,
<a
href="https://redirect.github.com/google/gson/issues/2337">#2337</a>)</li>
<li>Fixed <code>TypeToken#getParameterized</code> returning bogus
<code>ParameterizedType</code> for non-generic types (<a
href="https://github.com/Marcono1234"><code>@​Marcono1234</code></a>, <a
href="https://redirect.github.com/google/gson/issues/2447">#2447</a>)</li>
<li>Fixed Java Record adapter not working for GraalVM Native Image (<a
href="https://github.com/eamonnmcmanus"><code>@​eamonnmcmanus</code></a>,
<a
href="https://redirect.github.com/google/gson/issues/2465">#2465</a>)</li>
<li>Fixed <code>JsonWriter#name</code> not throwing exception when no
JSON object is currently being written (<a
href="https://github.com/shivam-sehgal"><code>@​shivam-sehgal</code></a>,
<a href="https://redirect.github.com/google/gson/issues/2475">#2475</a>;
<a href="https://github.com/Marcono1234"><code>@​Marcono1234</code></a>,
<a
href="https://redirect.github.com/google/gson/issues/2476">#2476</a>)</li>
<li>Fixed <code>Gson#getDelegateAdapter</code> not working properly for
<code>@JsonAdapter</code> (<a
href="https://github.com/Marcono1234"><code>@​Marcono1234</code></a>, <a
href="https://redirect.github.com/google/gson/issues/2435">#2435</a>)<br
/>
Note that <code>null</code> is now not allowed as <code>skipPast</code>
value anymore, which was previously allowed but undocumented.</li>
<li>Fixed <code>GsonBuilder</code> not rejecting type adapters for
<code>Object</code> and <code>JsonElement</code>, whose default adapters
cannot be overridden (<a
href="https://github.com/sachinp97"><code>@​sachinp97</code></a>; <a
href="https://redirect.github.com/google/gson/issues/2479">#2479</a>)</li>
<li>Fixed no limits being enforced when deserializing
<code>BigDecimal</code> and <code>BigInteger</code> (<a
href="https://github.com/Marcono1234"><code>@​Marcono1234</code></a>, <a
href="https://redirect.github.com/google/gson/issues/2510">#2510</a>)<br
/>
The new limits prevent potential performance problems when user code
uses the deserialized numbers. Gson itself was and is not affected by
these performance problems. The limits should be high enough to not
cause issues for most use cases, but feedback is appreciated.</li>
<li>Fixed <code>GsonBuilder#setDateFormat</code> not rejecting invalid
date formats (<a
href="https://github.com/Carpe-Wang"><code>@​Carpe-Wang</code></a>, <a
href="https://redirect.github.com/google/gson/issues/2538">#2538</a>)</li>
<li>Fixed <code>GsonBuilder#setDateFormat</code> not rejecting invalid
date styles (<a
href="https://github.com/Marcono1234"><code>@​Marcono1234</code></a>, <a
href="https://redirect.github.com/google/gson/issues/2545">#2545</a>)</li>
<li>Fixed <code>GsonBuilder#setDateFormat</code> ignoring partial
DEFAULT style (<a
href="https://github.com/Marcono1234"><code>@​Marcono1234</code></a>, <a
href="https://redirect.github.com/google/gson/issues/2556">#2556</a>)</li>
<li>Fixed <code>TypeToken#isAssignableFrom</code> throwing
<code>AssertionError</code> in some cases (<a
href="https://github.com/Marcono1234"><code>@​Marcono1234</code></a>, <a
href="https://redirect.github.com/google/gson/issues/2544">#2544</a>)</li>
<li>Fixed date adapters not restoring time zone after parsing (<a
href="https://github.com/Carpe-Wang"><code>@​Carpe-Wang</code></a>, <a
href="https://redirect.github.com/google/gson/issues/2549">#2549</a>)</li>
<li>Fixed <code>TypeToken#equals</code> erroneously returning
<code>false</code> for equal generic type parameters in some cases (<a
href="https://github.com/d-william"><code>@​d-william</code></a>, <a
href="https://redirect.github.com/google/gson/issues/2599">#2599</a>)</li>
<li>Fixed incorrect inherited URLs in <code>pom.xml</code> (<a
href="https://github.com/Marcono1234"><code>@​Marcono1234</code></a>, <a
href="https://redirect.github.com/google/gson/issues/2351">#2351</a>)</li>
</ul>
<h2>Performance improvements</h2>
<ul>
<li>Slightly reduce memory usage for reflection-based adapter (<a
href="https://github.com/sembseth"><code>@​sembseth</code></a>, <a
href="https://redirect.github.com/google/gson/issues/2325">#2325</a>; <a
href="https://github.com/Marcono1234"><code>@​Marcono1234</code></a>, <a
href="https://redirect.github.com/google/gson/issues/2440">#2440</a>)</li>
<li>Improved parsing speed of <code>ToNumberPolicy#LONG_OR_DOUBLE</code>
(<a href="https://github.com/ctasada"><code>@​ctasada</code></a>, <a
href="https://redirect.github.com/google/gson/issues/2674">#2674</a>)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="828a97be0f"><code>828a97b</code></a>
[maven-release-plugin] prepare release gson-parent-2.11.0</li>
<li><a
href="93bc0f23a1"><code>93bc0f2</code></a>
Skip signing graal-native-test module. (<a
href="https://redirect.github.com/google/gson/issues/2675">#2675</a>)</li>
<li><a
href="b153ca18bf"><code>b153ca1</code></a>
[maven-release-plugin] rollback the release of gson-parent-2.11.0</li>
<li><a
href="0e3d2aab62"><code>0e3d2aa</code></a>
[maven-release-plugin] prepare for next development iteration</li>
<li><a
href="545b802d63"><code>545b802</code></a>
[maven-release-plugin] prepare release gson-parent-2.11.0</li>
<li><a
href="8bfdbb4e14"><code>8bfdbb4</code></a>
Guarantee that <code>JsonElement.toString()</code> produces JSON (<a
href="https://redirect.github.com/google/gson/issues/2659">#2659</a>)</li>
<li><a
href="9008b093ac"><code>9008b09</code></a>
Extend Troubleshooting Guide with some ProGuard / R8 information (<a
href="https://redirect.github.com/google/gson/issues/2656">#2656</a>)</li>
<li><a
href="05652c3b7d"><code>05652c3</code></a>
Document that other JVM languages are not fully supported (<a
href="https://redirect.github.com/google/gson/issues/2666">#2666</a>)</li>
<li><a
href="454a49127f"><code>454a491</code></a>
Improved Long-Double Number Policy (<a
href="https://redirect.github.com/google/gson/issues/2674">#2674</a>)</li>
<li><a
href="570d91194e"><code>570d911</code></a>
Bump the github-actions group with 4 updates (<a
href="https://redirect.github.com/google/gson/issues/2671">#2671</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/google/gson/compare/gson-parent-2.10.1...gson-parent-2.11.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=com.google.code.gson:gson&package-manager=gradle&previous-version=2.10.1&new-version=2.11.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-11 18:41:34 +00:00
..
2024-03-08 01:55:27 +00:00
2024-02-20 15:01:17 -06:00

Firezone Android client

This README contains instructions for building and testing the Android client locally.

Dev Setup

  1. Install Rust

  2. Install Android Studio

  3. Install your JDK 17 of choice. We recommend just updating your CLI environment to use the JDK bundled in Android Studio to ensure you're using the same JDK on the CLI as Android Studio.

  4. Install the Android SDK through Android Studio.

    • Open Android studio, go to Android Studio > Preferences
    • Search for sdk
    • Find the Android SDK nav item under System Settings and select
    • Click the Edit button next to the Android SDK Location field
    • Follow the steps presented to install Android SDK
  5. Install NDK using Android Studio

    To see which version is installed, make sure to select the Show Package Details checkbox in the Android SDK settings page in Android Studio

    Android SDK Tools

    Make sure the correct NDK version is installed by looking at: ../../rust/connlib/clients/android/connlib/build.gradle.kts

  6. Set the following ENV variables in the start up config for your shell:

    JAVA_HOME=/Applications/Android\ Studio.app/Contents/jbr/Contents/Home
    ANDROID_HOME=/Users/<username>/Library/Android/sdk
    NDK_HOME=$ANDROID_HOME/ndk-bundle
    PATH=$PATH:$ANDROID_HOME/platform-tools:$ANDROID_HOME/tools:$ANDROID_HOME/tools/bin
    
  7. Make sure the following Rust targets are installed into the correct toolchain.

    aarch64-linux-android
    arm-linux-androideabi
    armv7-linux-androideabi
    i686-linux-android
    x86_64-linux-android
    

    Ensure you've activated the correct toolchain version for your local environment with rustup default <toolchain> (find this from the root /rust/rust-toolchain.toml file), then run:

    rustup target add aarch64-linux-android arm-linux-androideabi armv7-linux-androideabi i686-linux-android x86_64-linux-android
    
  8. Perform a test build: ./gradlew assembleDebug.

Release Setup

We release from GitHub CI, so this shouldn't be necessary. But if you're looking to test the release variant locally:

  1. Download the keystore from 1Pass and save to app/.signing/keystore.jks dir.
  2. Download firebase credentials from 1Pass and save to app/.signing/firebase.json
  3. Now you can execute the *Release tasks with:
export KEYSTORE_PATH="$(pwd)/app/.signing/keystore.jks"
export FIREBASE_CREDENTIALS_PATH="$(pwd)/app/.signing/firebase.json"
HISTCONTROL=ignorespace # prevents saving the next line in shell history
 KEYSTORE_PASSWORD='keystore_password' KEYSTORE_KEY_PASSWORD='keystore_key_password' ./gradlew assembleRelease