Use moshi implementation for json parsing (#1234)

There's a dependency on OKIO & 8 classes copied from Moshi. Need to figure out best path forward. Ideally we don't depend on all of Moshi but still get the gains of the new JsonReader & Options api. This should fix the random Android 8 crashes.

Performance
I ran the snapshot tests with ~1800 animations and summed up just the parsing time. The old parsing code took 13,145ms and 13,645ms on each test run (avg 13,395ms). The new code took 12,858ms each time. There aren't enough trials to deduce statistical differences but if these numbers hold, the new code parses ~5% faster.
It does reduce memory allocations during parsing which may contribute to the performance improvement.

I'm leaning on merging this to hopefully fix #667
50 files changed
tree: 8c9ac3ff52182e07030c7e02937a52eeaf586bb2
  1. .github/
  2. .idea/
  3. After Effects Samples/
  4. gifs/
  5. gradle/
  6. lottie/
  7. LottieSample/
  8. .gitignore
  9. .travis.yml
  10. build.gradle
  11. CHANGELOG.md
  12. credentials.tar.gz
  13. decrypt.sh
  14. DESIGNER_NOTES.md
  15. gcloud_run.sh
  16. gcloud_setup.sh
  17. gradle.properties
  18. gradlew
  19. gradlew.bat
  20. LICENSE
  21. post_pr_comment.js
  22. README.md
  23. secrets.tar.enc
  24. settings.gradle
  25. sign.sh
  26. version.sh
README.md

Lottie for Android, iOS, React Native, Web, and Windows

Build Status

Lottie is a mobile library for Android and iOS that parses Adobe After Effects animations exported as json with Bodymovin and renders them natively on mobile!

For the first time, designers can create and ship beautiful animations without an engineer painstakingly recreating it by hand. They say a picture is worth 1,000 words so here are 13,000:

View documentation, FAQ, help, examples, and more at airbnb.io/lottie

Example1

Example2

Example3

Community

Example4

Download

Gradle is the only supported build configuration, so just add the dependency to your project build.gradle file:

dependencies {
  implementation 'com.airbnb.android:lottie:$lottieVersion'
}

The latest Lottie version is: lottieVersion

Lottie 2.8.0 and above only supports projects that have been migrated to androidx. For more information, read Google's migration guide.