Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ogolberg authored Aug 26, 2020
1 parent 721f22f commit 56a3ac6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@ Let's look at [Integer.hashCode(int)](https://developer.android.com/reference/ja

When the APK is assembled, D8 (the Android Dexer) transforms java bytecode into Android (Dalvik/Art) bytecode. As part of that transformation, it rewrites (or _desugars_) some instructions and API calls. For example, lambdas are desuraged into anonymous classes, `try-with-resources` is desugared into a Dalvik-compatible set of instructions that matches the semantics of _regular_ Java's `try-with-resources`, and `Integer.hashCode(int)` is rewritten into a call to a synthetic class which is then added to the APK by D8.

[This article](https://jakewharton.com/d8-library-desugaring/) explains desugaring in detail.

### Gummy Bears

The set of desugared methods is defined by the version of D8, which itself is defined by the android gradle plugin, as well as the minimum SDK level.

This project provides a safe and more accurate set of signatures for Android 4.4-10 + Android Gradle 3.x. The additional _sugary_ signatures are generated from hand-written stubs. The reference point for the stubs is the [D8 source code](https://r8.googlesource.com/r8/+/master/src/main/java/com/android/tools/r8/ir/desugar/BackportedMethodRewriter.java). In the future, it will provide an expanded set of signatures for Android Gradle 4.x including `java.time`, `ConcurrentHashMap`, etc.
This project provides a safe and more accurate set of signatures for Android 4.4-10 + Android Gradle 3.x. The additional _sugary_ signatures are generated from hand-written stubs. The reference point for the stubs is the [D8 source code](https://r8.googlesource.com/r8/+/master/src/main/java/com/android/tools/r8/ir/desugar/BackportedMethodRewriter.java). In the future, it will provide an expanded set of signatures for Android Gradle 4's _core library desugaring_, including `java.time`, `ConcurrentHashMap`, etc.

## How to use

Expand Down

0 comments on commit 56a3ac6

Please sign in to comment.