Open Bug 1519180 Opened 6 years ago Updated 2 years ago

Require Java 1.8 to build GeckoView/Firefox for Android

Categories

(Firefox Build System :: Android Studio and Gradle Integration, enhancement, P3)

enhancement

Tracking

(firefox66 wontfix, firefox67 affected)

Tracking Status
firefox66 --- wontfix
firefox67 --- affected

People

(Reporter: nalexander, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [geckoview:p2])

Bug 1477487 makes mach bootstrap check for Java 1.8, which is required for Google's sdkmanager tool. We used to assert that we had javac 1.8, but that was removed with Bug 1498406. This ticket tracks asserting that we have java 1.8, which until Bug 1515248 lands is, in fact, required.

(We really don't require sdkmanager for much, so after Bug 1515248 we can accept anything after Java 1.8, but that's a different ticket.)

Component: General → Build Config & IDE Support
Product: Firefox Build System → Firefox for Android

For people getting the following error:

0:15.71 FAILURE: Build failed with an exception.
0:15.71 * What went wrong:
0:15.71 A problem occurred configuring project ':app'.
0:15.71 java.lang.NullPointerException (no error message)

You're using Java 10, don't forget to set ac_add_options --with-java-bin-path in your mozconfig.

Whiteboard: [geckoview] → [geckoview:p2]

I'd really like to do this, but it's not a priority. Patches welcome! The hard part is rehabilating some old moz.configure test code we had that did this.

Priority: -- → P3
Product: Firefox for Android → Firefox Build System
No longer blocks: 1515248

Do we still need to do this now bug 1515248 has been resolved?

Flags: needinfo?(nalexander)

(In reply to Emily Toop (:fluffyemily) from comment #3)

Do we still need to do this now bug 1515248 has been resolved?

To the best of my knowledge, yes. What happens is that Java 9 and Java 10 can get accidentally installed by mach bootstrap, but then they immediately fail the build 'cuz Google's tooling actually requires Java 8. We can test Java (really, javac) versions at mach configure-time and avoid a broken build in this case... and indeed we did, moons ago.

It might be that the updated versions of Google's tooling do in fact support Java 9+, which would mean this isn't necessary, but I don't think that's the case.

Flags: needinfo?(nalexander)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.