Closed Bug 1813671 Opened 1 year ago Closed 1 year ago

Target JVM 11 bytecode in gradle android projects

Categories

(Fenix :: General, task, P2)

All
Android

Tracking

(firefox110 wontfix, firefox111 wontfix, firefox112 fixed)

RESOLVED FIXED
112 Branch
Tracking Status
firefox110 --- wontfix
firefox111 --- wontfix
firefox112 --- fixed

People

(Reporter: jonalmeida, Assigned: mcarare)

References

Details

(Whiteboard: [geckoview:m112])

Attachments

(1 file)

https://developer.android.com/studio/releases/gradle-plugin#jvm-11-bytecode

Android Gradle plugin targets JVM 11 bytecode

Starting with Android Gradle plugin 7.4.0-alpha04, AGP ships wth JVM 11 bytecode. This means that if you compile against AGP, or write custom Lint checks, you need to start targeting JVM 11 bytecode. One of the ways to do this is to include the following in your module-level build.gradle file:

sourceCompatibility = "11"
targetCompatibility = "11"

We should start targeting JVM 11 bytecode by updating our projects as recommended so we have an easier time upgrading to the next AGP version.

We can try to update these places and see what happens to our build: https://github.com/search?q=org%3Amozilla-mobile+sourceCompatibility+JavaVersion.VERSION_1_8&type=code

Does not affect GeckoView. The project already targets JVM 11.

Priority: -- → P3
Whiteboard: [geckoview:m112?]
Assignee: nobody → mcarare

I plan to take on this, after the mono-repo migration is complete, to avoid complicating that process or adding extra hindrance in identifying possible problems in the migration process.

Blocks: 1802817
Priority: P3 → P2
Whiteboard: [geckoview:m112]
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 112 Branch

No need to uplift to 111

Blocks: Java17
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: