All Projects → JakeWharton → Agp Java Support

JakeWharton / Agp Java Support

Licence: apache-2.0
Tracking your ability to use new Java language features and APIs in an Android app

Programming Languages

java
68154 projects - #9 most used programming language

AGP Java Support

This repository tracks your ability to use new Java language features in an Android app.

AGP / Java 7 8 9 10 11 12 13 14
3.4.2
3.5.3
3.6.1
4.0.0-beta03
4.1.0-alpha03

Depressing! While there's no problem using JDK 14 to compile your app with source/target level 8, once you change the source/target level to 9 or higher the way javac compiles your code changes. Prior to Java 9, Java's APIs were exposed through something called rt.jar which was put on the "bootclasspath" of javac. Android used the same mechanism with its android.jar. When set to 9 or higher, javac uses the new module system which requires an entirely new mechanism of exposing the Android APIs.

So yeah. Not great.

Here's D8/R8's support of Java versions though:

AGP / Java 7 8 9 10 11 12 13 14
3.4.2
3.5.3
3.6.1
4.0.0-beta03
4.1.0-alpha03

Notes:

  • Just because a Java language version is supported does not mean all tools will handle it properly. For example, annotation processors and bytecode transformers may need updated.
  • Lint is not run on the test projects because is consumes an inordinate amount of memory and seems to have JVM metaspace leaks making automated testing difficult. Anecdotally, it seems to work fine on the latest stable, beta, and alpha for the working Java versions.
  • All projects are built with Gradle 6.3 RC4 which is required for running on Java 14. Older Gradle versions can probably be used with lower Java versions but are not tracked here.

Java 7

Java 8

Java 9

❌ AGP usage blocked by https://issuetracker.google.com/issues/139013660.

Java 10

❌ AGP usage blocked by https://issuetracker.google.com/issues/139013660.

Java 11

❌ AGP usage blocked by https://issuetracker.google.com/issues/139013660.

Java 12

❌ AGP usage blocked by https://issuetracker.google.com/issues/139013660.

❌ D8 usage blocked by https://issuetracker.google.com/issues/141587937.

Java 13

❌ AGP usage blocked by https://issuetracker.google.com/issues/139013660.

❌ D8 usage blocked by https://issuetracker.google.com/issues/141587937.

Java 14

❌ AGP usage blocked by https://issuetracker.google.com/issues/139013660.

❌ D8 usage blocked by https://issuetracker.google.com/issues/141587937.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].