Specify source version 1.7 in generated Eclipse projects, particularly Stumbler and Fennec itself

RESOLVED WONTFIX

Status

()

Firefox for Android
Build Config & IDE Support
RESOLVED WONTFIX
4 years ago
a year ago

People

(Reporter: rnewman, Unassigned)

Tracking

Trunk
All
Android
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

4 years ago
Cannot switch on a value of type String for source level below 1.7. Only convertible int values or enum variables are permitted
	Reporter.java
	/FennecStumbler/java/org/mozilla/mozstumbler/service/stumblerthread
(Reporter)

Updated

4 years ago
Summary: Specify source version 1.7 in generated Eclipse projects, particularly Stumbler → Specify source version 1.7 in generated Eclipse projects, particularly Stumbler and Fennec itself
Is this not already the case?

http://mxr.mozilla.org/mozilla-central/source/python/mozbuild/mozbuild/backend/templates/android_eclipse/.settings/org.eclipse.jdt.core.prefs#4

You could try to correct the settings in Eclipse itself and then work backwards to figure out what template additions are needed.  Or I can investigate sometime in the not-so-distant future.
(Reporter)

Comment 2

4 years ago
I just blew away my fx-team tree, built, built the Eclipse project, opened, and had to fix two things:

* A cascade of errors about not having android-L target. I had to manually change each project to use Google 5.0.

* Errors in a few projects about source level 1.7 features. I had to manually change the compliance level to 1.7.
(In reply to Richard Newman [:rnewman] from comment #2)
> I just blew away my fx-team tree, built, built the Eclipse project, opened,
> and had to fix two things:
> 
> * A cascade of errors about not having android-L target. I had to manually
> change each project to use Google 5.0.

wesj changed this template for reasons I'm not aware.  wesj, this seems wrong: can you give me context?  (Relevant ticket is https://bugzilla.mozilla.org/show_bug.cgi?id=1070086)

> * Errors in a few projects about source level 1.7 features. I had to
> manually change the compliance level to 1.7.

Can you figure out what changed in the objdir-droid/android_eclipse projects, etc, so that we can do the right thing when we rebuild?
Flags: needinfo?(wjohnston)
(Reporter)

Comment 4

4 years ago
Here's the diff *from* a fresh project set *to* my working modified version.

diff -r objdir-droid/android_eclipse/Fennec/.settings/org.eclipse.jdt.core.prefs /tmp/1/android_eclipse/Fennec/.settings/org.eclipse.jdt.core.prefs
3c3
< org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
---
> org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
5c5
< org.eclipse.jdt.core.compiler.compliance=1.6
---
> org.eclipse.jdt.core.compiler.compliance=1.7
11c11
< org.eclipse.jdt.core.compiler.source=1.6
---
> org.eclipse.jdt.core.compiler.source=1.7

diff -r objdir-droid/android_eclipse/Fennec/project.properties /tmp/1/android_eclipse/Fennec/project.properties
2c2
< target=android-L
---
> target=Google Inc.:Google APIs:21
(Reporter)

Comment 5

4 years ago
To confirm, the template is correct.

python/mozbuild/mozbuild/backend/templates/android_eclipse/.settings/org.eclipse.jdt.core.prefs:
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
(In reply to Nick Alexander :nalexander from comment #3)
> wesj changed this template for reasons I'm not aware.  wesj, this seems
> wrong: can you give me context?  (Relevant ticket is
> https://bugzilla.mozilla.org/show_bug.cgi?id=1070086)
I think I just saw some errors here at one point and changed it quickly to keep working. Didn't mean to check in :(
Flags: needinfo?(wjohnston)
The Android Eclipse IDE integration has been totally superceded by the Android Gradle and IntelliJ integration from Bug 1041395 and friends.  Bug 1196367 is removing the Eclipse support entirely.
Status: NEW → RESOLVED
Last Resolved: a year ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.