Skip to content

Commit

Permalink
Fix broken link to incremental dexing post (#107)
Browse files Browse the repository at this point in the history
  • Loading branch information
jin authored and tualeron committed Aug 6, 2018
1 parent e44e1d0 commit 16d784d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ authors:

__tl;dr:__ With Bazel, you can use Java 8 language features and APIs such as lambdas, default and static interface methods, sequential streams, optionals, and java.time in your Android apps!

Android apps built with Bazel can use Java 8 language features and still support legacy Android devices! That’s remarkable because devices running Android versions prior to Nougat don’t come with any support for Java 8, and lambda expressions don’t have runtime support even on the latest devices. Bazel uses what we call __desugaring__ to allow apps to use Java 8 language features and select Java 8 language APIs anyway. A [previous post](2018-02-28-incremental-dexing.md) shows how desugaring fits into the larger picture of Android builds with minimal build performance impact; in this post we go into detail on how it works and how to use it.
Android apps built with Bazel can use Java 8 language features and still support legacy Android devices! That’s remarkable because devices running Android versions prior to Nougat don’t come with any support for Java 8, and lambda expressions don’t have runtime support even on the latest devices. Bazel uses what we call __desugaring__ to allow apps to use Java 8 language features and select Java 8 language APIs anyway. A [previous post](/2018/02/28/incremental-dexing.html) shows how desugaring fits into the larger picture of Android builds with minimal build performance impact; in this post we go into detail on how it works and how to use it.

Desugaring, in a nutshell, converts Java 8 bytecode into equivalent (modulo reflection, more on that later) bytecode that can be executed on any Android devices. As a result, the desugared language features are usable in source code but encoded with equivalent, older constructs in the resulting app’s binary code. Here’s a summary of how desugaring of different Java 8 language features looks like (we’ll discuss Java 8 language APIs afterwards):

Expand Down

0 comments on commit 16d784d

Please sign in to comment.