Closed Bug 1195388 Opened 4 years ago Closed 4 years ago

Add Android extra packages to moz.build variables

Categories

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

defect
Not set

Tracking

(firefox43 fixed)

RESOLVED FIXED
mozilla43
Tracking Status
firefox43 --- fixed

People

(Reporter: nalexander, Assigned: nalexander)

References

Details

Attachments

(8 files, 3 obsolete files)

40 bytes, text/x-review-board-request
Details
40 bytes, text/x-review-board-request
Details
40 bytes, text/x-review-board-request
Details
40 bytes, text/x-review-board-request
Details
40 bytes, text/x-review-board-request
Details
40 bytes, text/x-review-board-request
Details
51.66 KB, patch
Details | Diff | Splinter Review
1.09 KB, patch
Details | Diff | Splinter Review
This ticket tracks exposing Android "extra packages" to moz.build.  Extra packages are part of the Android library packaging apparatus.  Right now, extra packages are only used by Fennec in mobile/android/base/Makefile.in.  b2gdroid wants this functionality, since b2gdroid wants to consume GeckoView, and therefore needs to generate R.java for the "extra" org.mozilla.gecko package.
Bug 1195388 - Pre: Clean GARBAGE and dependencies. r?gps

GARBAGE is set automatically by PP_TARGETS.

The fragment does not need to be preprocessed at all, since it is
itself included in a preprocessed file.  Including the fragment in
all_resources is therefore not needed, since it is just itself
included in a file.
Attachment #8648845 - Flags: review?(gps)
Bug 1195388 - Pre: Remove Eclipse definitions. r?gps

This is just cruft; I didn't want to think about it when working on
the other parts.
Attachment #8648846 - Flags: review?(gps)
Bug 1195388 - Part 1: Make ANDROID_APK_{NAME,PACKAGE} moz.build variables. r?gps

This paves the way for defining additional Android packages in
moz.build, which is a step toward moving the special
mobile/android/base/Makefile.in aapt invocations into the generic
java-build.mk framework.

The new variables are both passthru variables for now: in the future,
we'll roll them into some aggregate Android APK definition.

It's worth noting that references to the variables in Makefile.in
files are only defined after including rules.mk (and thereby
backend.mk).  This only required a few changes in the tree but it
confused me for some time.
Attachment #8648847 - Flags: review?(gps)
Bug 1195388 - Part 2: Add ANDROID_EXTRA_{PACKAGES,RES_DIRS} moz.build variables. r?gps

This moves a little bit more of mobile/android/base/Makefile.in into
moz.build, and gets closer to moving that aapt invocation into
java-build.mk.

There are no other extra package consumers in the tree.  (There should
be a new one shortly: b2gdroid.)
Attachment #8648848 - Flags: review?(gps)
Bug 1181209 - Make changes to Gecko needed for b2gdroid to boot. r?blassey
Attachment #8648851 - Flags: review?(blassey.bugs)
Bug 1180461 - Part 1: Build gaia during b2gdroid build. r?glandium

This is copy-pasted from existing b2g code.
Attachment #8648852 - Flags: review?(mh+mozilla)
Bug 1180461 - Part 2: Package gaia into b2gdroid APK. r?glandium

This whole approach is rough.  Right now, I'm not concerned about
localizing b2gdroid (in particular, APK repacks) but I want to stay
close to Fennec.  Future work should unify much of this APK
re-packaging and highlight the differences between Fennec and
b2gdroid.
Attachment #8648853 - Flags: review?(mh+mozilla)
All folks: these reviews ended up on this ticket; I expected mozreview to split them apart but it did not.

fabrice: this produces an APK that doesn't quite work for me.  The b2gdroid loading spinner sits forever and Gecko exits.  AFAICT the APK is fine; I'm going to leave it to you and your team to investigate changes to Gecko and the connections.

blassey: I've flagged you for one of the Gecko reviews since I can't comment on those parts of the code.
Flags: needinfo?(fabrice)
Comment on attachment 8648851 [details]
MozReview Request: Bug 1181209 - Make changes to Gecko needed for b2gdroid to boot. r?blassey

Bug 1181209 - Make changes to Gecko needed for b2gdroid to boot. r?blassey
Comment on attachment 8648852 [details]
MozReview Request: Bug 1180461 - Part 1: Build gaia during b2gdroid build. r?glandium

Bug 1180461 - Part 1: Build gaia during b2gdroid build. r?glandium

This is copy-pasted from existing b2g code.
Comment on attachment 8648853 [details]
MozReview Request: Bug 1180461 - Part 2: Package gaia into b2gdroid APK. r?glandium

Bug 1180461 - Part 2: Package gaia into b2gdroid APK. r?glandium

This whole approach is rough.  Right now, I'm not concerned about
localizing b2gdroid (in particular, APK repacks) but I want to stay
close to Fennec.  Future work should unify much of this APK
re-packaging and highlight the differences between Fennec and
b2gdroid.
Nick, what do you use in your mozconfig? Building with the full set of patches failed for me:

home/fabrice/dev/cypress/mobile/android/tests/browser/robocop/testStumblerSetting.java:8: error: package org.mozilla.mozstumbler.service does not exist
import org.mozilla.mozstumbler.service.AppGlobals;
                                      ^
/home/fabrice/dev/cypress/mobile/android/tests/browser/robocop/testStumblerSetting.java:48: error: cannot find symbol
                if (intent.getAction().equals(AppGlobals.ACTION_TEST_SETTING_ENABLED)) {
                                              ^
  symbol: variable AppGlobals
/home/fabrice/dev/cypress/mobile/android/tests/browser/robocop/testStumblerSetting.java:57: error: cannot find symbol
        IntentFilter intentFilter = new IntentFilter(AppGlobals.ACTION_TEST_SETTING_ENABLED);
                                                     ^
  symbol:   variable AppGlobals
  location: class testStumblerSetting
/home/fabrice/dev/cypress/mobile/android/tests/browser/robocop/testStumblerSetting.java:58: error: cannot find symbol
        intentFilter.addAction(AppGlobals.ACTION_TEST_SETTING_DISABLED);
                               ^
  symbol:   variable AppGlobals
  location: class testStumblerSetting
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /home/fabrice/dev/cypress/mobile/android/tests/browser/robocop/SessionTest.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
4 errors
Flags: needinfo?(fabrice)
(In reply to [:fabrice] Fabrice Desré from comment #14)
> Nick, what do you use in your mozconfig? Building with the full set of
> patches failed for me:
> 
> home/fabrice/dev/cypress/mobile/android/tests/browser/robocop/
> testStumblerSetting.java:8: error: package org.mozilla.mozstumbler.service
> does not exist
> import org.mozilla.mozstumbler.service.AppGlobals;
>                                       ^
> /home/fabrice/dev/cypress/mobile/android/tests/browser/robocop/
> testStumblerSetting.java:48: error: cannot find symbol
>                 if
> (intent.getAction().equals(AppGlobals.ACTION_TEST_SETTING_ENABLED)) {
>                                               ^
>   symbol: variable AppGlobals
> /home/fabrice/dev/cypress/mobile/android/tests/browser/robocop/
> testStumblerSetting.java:57: error: cannot find symbol
>         IntentFilter intentFilter = new
> IntentFilter(AppGlobals.ACTION_TEST_SETTING_ENABLED);
>                                                      ^
>   symbol:   variable AppGlobals
>   location: class testStumblerSetting
> /home/fabrice/dev/cypress/mobile/android/tests/browser/robocop/
> testStumblerSetting.java:58: error: cannot find symbol
>         intentFilter.addAction(AppGlobals.ACTION_TEST_SETTING_DISABLED);
>                                ^
>   symbol:   variable AppGlobals
>   location: class testStumblerSetting
> Note: Some input files use or override a deprecated API.
> Note: Recompile with -Xlint:deprecation for details.
> Note:
> /home/fabrice/dev/cypress/mobile/android/tests/browser/robocop/SessionTest.
> java uses unchecked or unsafe operations.
> Note: Recompile with -Xlint:unchecked for details.
> 4 errors

https://gist.github.com/0f5d29601f2d1cff7b90

We shouldn't be enabling mozstumbler in b2gdroid; there's nothing Gecko-level happening there.
Same failure with your mozconfig :(

MOZ_ANDROID_MLS_STUMBLER is not set so we don't build the stumbler service, but it seems like we still try to build some robocop tests.
Comment on attachment 8648850 [details]
MozReview Request: Bug 1180358 - Part 2: Build the b2gdroid APK. r?glandium

https://reviewboard.mozilla.org/r/16293/#review14579

::: mobile/android/b2gdroid/app/Makefile.in:14
(Diff revision 1)
> +ANDROID_EXTRA_JARS := $(filter-out %gecko-R.jar,$(wildcard $(jars_dir)/*.jar))

There doesn't seem to be anything in place that will guarantee there will be $(jars_dir)/*.jar files at the time we traversing here. Also, this seems dubious. You do know the directory and the file name, so it feels like you're trying to work around the lack of guarantee that gecko-R.jar will be built before this directory.

::: mobile/android/b2gdroid/moz.build:25
(Diff revision 1)
> +    '../../../b2g/components',

/b2g/components

::: mobile/android/b2gdroid/moz.build:26
(Diff revision 1)
> +    '../../../b2g/chrome',

/b2g/chrome
Attachment #8648850 - Flags: review?(mh+mozilla)
Comment on attachment 8648852 [details]
MozReview Request: Bug 1180461 - Part 1: Build gaia during b2gdroid build. r?glandium

https://reviewboard.mozilla.org/r/16297/#review14623

::: configure.in:7552
(Diff revision 2)
> +fi

Why are you essentially replicating the logic from 10 lines below?

::: mobile/android/b2gdroid/gaia/Makefile.in:16
(Diff revision 2)
> +	(cd $(GAIADIR)/profile && tar $(TAR_CREATE_FLAGS) - .) | (cd $(abspath $(DIST))/bin/$(GAIA_PATH) && tar -xf -)

I think I'd rather have this shared with /b2g/gaia. That is, split what is currently in /b2g/gaia so that the run-b2g thing is separated out, and recurse the gaia thing from the same m-c directory for both b2g and b2gdroid.
Attachment #8648852 - Flags: review?(mh+mozilla)
Attachment #8648853 - Flags: review?(mh+mozilla)
Comment on attachment 8648853 [details]
MozReview Request: Bug 1180461 - Part 2: Package gaia into b2gdroid APK. r?glandium

https://reviewboard.mozilla.org/r/16299/#review14625

::: toolkit/mozapps/installer/upload-files.mk:505
(Diff revision 2)
> +    $(ZIP) -0 $(_ABS_DIST)/gecko.ap_ $(OMNIJAR_DIR)$(OMNIJAR_NAME)) && \

That's a large amount of copy/paste. Why not split INNER_MAKE_PACKAGE in smaller pieces and aggregate those smaller pieces depending on whether it's b2gdroid or not?

::: toolkit/mozapps/installer/upload-files.mk:510
(Diff revision 2)
> +    $(ZIP) -r9D $(_ABS_DIST)/gecko.apk assets ) && \

This here feels so wrong. Essentially, you're forcing bin/gaia to always be rebuilt, notwithstanding the fact that you now have assets in dist/bin/assets and dist/bin/gaia/assets that end up in the same assets directory in the apk.
Comment on attachment 8648845 [details]
MozReview Request: Bug 1195388 - Include services-* resource:// registrations in b2gdroid. r?fabrice

https://reviewboard.mozilla.org/r/16283/#review14635

Ship It!
Attachment #8648845 - Flags: review?(gps) → review+
Attachment #8648846 - Flags: review?(gps) → review+
Comment on attachment 8648846 [details]
MozReview Request: Bug 1195388 - Pre: Remove Eclipse definitions. r?gps

https://reviewboard.mozilla.org/r/16285/#review14637

I'll rubber stamp this, but only because I trust you know what you are doing.

Won't this break Eclipse project generation? Aren't people still using Eclipse for Fennec development?

Also, after this change mobile/android/stumbler/moz.build is the only file using the moz.build Eclipse directives. File a follow-up to kill the feature?
Comment on attachment 8648847 [details]
MozReview Request: Bug 1195388 - Part 1: Make ANDROID_APK_{NAME,PACKAGE} moz.build variables. r?gps

https://reviewboard.mozilla.org/r/16287/#review14639

r+ with Makefile.in include changes.

::: mobile/android/tests/background/junit3/Makefile.in:33
(Diff revision 1)
> +tools:: $(ANDROID_APK_NAME).apk

It is safe to `include $(topsrcdir)/config/config.mk` at the top of Makefile.in files. config.mk includes backend.mk, so it will pick up your moz.build variables.

Also, you can delete the rules.mk include line: Makefile.in processing always adds an include of config/recurse.mk, which includes rules.mk.

::: mobile/android/tests/javaaddons/Makefile.in:14
(Diff revision 1)
> +tools libs:: $(ANDROID_APK_NAME).apk

Ditto.
Attachment #8648847 - Flags: review?(gps) → review+
Attachment #8648848 - Flags: review?(gps) → review+
Comment on attachment 8648848 [details]
MozReview Request: Bug 1195388 - Part 2: Add ANDROID_EXTRA_{PACKAGES,RES_DIRS} moz.build variables. r?gps

https://reviewboard.mozilla.org/r/16289/#review14645

I wish we were using rich context managers for declaring Android primitives like we now do for binaries. But meh.
Attached patch start.patchSplinter Review
Nick, this is the patch on top of your set that let me build and start properly.
url:        https://hg.mozilla.org/integration/fx-team/rev/3e09f5f7e0667c78ba7e5ce670ab49d6caf351cb
changeset:  3e09f5f7e0667c78ba7e5ce670ab49d6caf351cb
user:       Nick Alexander <nalexander@mozilla.com>
date:       Mon Aug 10 14:25:07 2015 -0700
description:
Bug 1195388 - Pre: Clean GARBAGE and dependencies. r=gps

GARBAGE is set automatically by PP_TARGETS.

The fragment does not need to be preprocessed at all, since it is
itself included in a preprocessed file.  Including the fragment in
all_resources is therefore not needed, since it is just itself
included in a file.

url:        https://hg.mozilla.org/integration/fx-team/rev/6480a988c996db6de0ed9b1eb648fc54829ae947
changeset:  6480a988c996db6de0ed9b1eb648fc54829ae947
user:       Nick Alexander <nalexander@mozilla.com>
date:       Mon Aug 10 16:33:27 2015 -0700
description:
Bug 1195388 - Pre: Remove Eclipse definitions. r=gps

This is just cruft; I didn't want to think about it when working on
the other parts.  Bug 1196367 tracks removing the AndroidEclipse build
backend that consumed these definitions entirely.

url:        https://hg.mozilla.org/integration/fx-team/rev/ddbe8b7acc4d3b48f286b1b144bf761e60e19559
changeset:  ddbe8b7acc4d3b48f286b1b144bf761e60e19559
user:       Nick Alexander <nalexander@mozilla.com>
date:       Wed Aug 19 12:34:58 2015 -0700
description:
Bug 1195388 - Part 1: Make ANDROID_APK_{NAME,PACKAGE} moz.build variables. r=gps

This paves the way for defining additional Android packages in
moz.build, which is a step toward moving the special
mobile/android/base/Makefile.in aapt invocations into the generic
java-build.mk framework.

The new variables are both passthru variables for now: in the future,
we'll roll them into some aggregate Android APK definition.

It's worth noting that references to the variables in Makefile.in
files are only defined after including rules.mk (and thereby
backend.mk).  This only required a few changes in the tree but it
confused me for some time.

url:        https://hg.mozilla.org/integration/fx-team/rev/b7db8a48e0c27bb41cd45eb7ffe5a1262deb9bf1
changeset:  b7db8a48e0c27bb41cd45eb7ffe5a1262deb9bf1
user:       Nick Alexander <nalexander@mozilla.com>
date:       Fri Aug 14 18:13:11 2015 -0700
description:
Bug 1195388 - Part 2: Add ANDROID_EXTRA_{PACKAGES,RES_DIRS} moz.build variables. r=gps

This moves a little bit more of mobile/android/base/Makefile.in into
moz.build, and gets closer to moving that aapt invocation into
java-build.mk.

There are no other extra package consumers in the tree.  (There should
be a new one shortly: b2gdroid.)
url:        https://hg.mozilla.org/integration/fx-team/rev/9fe939522a1b5abb8f2c0d4db96e1e94336bbed1
changeset:  9fe939522a1b5abb8f2c0d4db96e1e94336bbed1
user:       Nick Alexander <nalexander@mozilla.com>
date:       Wed Aug 19 15:13:49 2015 -0700
description:
Bug 1195388 - Follow-up: touch CLOBBER. a=bustage
url:        https://hg.mozilla.org/integration/fx-team/rev/4e04908c15a38a5d3bb05af0fff0574f31a1fa3d
changeset:  4e04908c15a38a5d3bb05af0fff0574f31a1fa3d
user:       Nick Alexander <nalexander@mozilla.com>
date:       Wed Aug 19 16:48:55 2015 -0700
description:
Bug 1195388 - Follow-up: Make Android-specific CONFIG accesses conditional. a=bustage
On a CLOSED TREE.

This works around AbsolutePath-related failures in config/tests/test_mozbuild_reading.py.
Comment on attachment 8648849 [details]
MozReview Request: Bug 1180358 - Part 1: Add the b2gdroid sub-product. r=fabrice

https://reviewboard.mozilla.org/r/16291/#review14847

Ship It!
Attachment #8648849 - Flags: review?(fabrice) → review+
(In reply to Mike Hommey [:glandium] from comment #17)
> Comment on attachment 8648850 [details]
> MozReview Request: Bug 1180358 - Part 2: Build the b2gdroid APK. r?glandium
> 
> https://reviewboard.mozilla.org/r/16293/#review14579
> 
> ::: mobile/android/b2gdroid/app/Makefile.in:14
> (Diff revision 1)
> > +ANDROID_EXTRA_JARS := $(filter-out %gecko-R.jar,$(wildcard $(jars_dir)/*.jar))
> 
> There doesn't seem to be anything in place that will guarantee there will be
> $(jars_dir)/*.jar files at the time we traversing here. Also, this seems
> dubious. You do know the directory and the file name, so it feels like
> you're trying to work around the lack of guarantee that gecko-R.jar will be
> built before this directory.

I addressed this with a comment in the code.  The ordering is important and guaranteed by DIRS; the filter is important and already well commented (just above).

> ::: mobile/android/b2gdroid/moz.build:25
> (Diff revision 1)
> > +    '../../../b2g/components',
> 
> /b2g/components
> 
> ::: mobile/android/b2gdroid/moz.build:26
> (Diff revision 1)
> > +    '../../../b2g/chrome',
> 
> /b2g/chrome

Fixed throughout.
(In reply to Mike Hommey [:glandium] from comment #18)
> Comment on attachment 8648852 [details]
> MozReview Request: Bug 1180461 - Part 1: Build gaia during b2gdroid build.
> r?glandium
> 
> https://reviewboard.mozilla.org/r/16297/#review14623
> 
> ::: configure.in:7552
> (Diff revision 2)
> > +fi
> 
> Why are you essentially replicating the logic from 10 lines below?

Heh, I re-pushed some code from fabrice.  Updated.

> ::: mobile/android/b2gdroid/gaia/Makefile.in:16
> (Diff revision 2)
> > +	(cd $(GAIADIR)/profile && tar $(TAR_CREATE_FLAGS) - .) | (cd $(abspath $(DIST))/bin/$(GAIA_PATH) && tar -xf -)
> 
> I think I'd rather have this shared with /b2g/gaia. That is, split what is
> currently in /b2g/gaia so that the run-b2g thing is separated out, and
> recurse the gaia thing from the same m-c directory for both b2g and b2gdroid.

Good thought.
Attachment #8648845 - Attachment description: MozReview Request: Bug 1195388 - Pre: Clean GARBAGE and dependencies. r?gps → MozReview Request: Bug 1195388 - Include services-* resource:// registrations in b2gdroid. r?fabrice
Attachment #8648845 - Flags: review?(fabrice)
Comment on attachment 8648845 [details]
MozReview Request: Bug 1195388 - Include services-* resource:// registrations in b2gdroid. r?fabrice

Bug 1195388 - Include services-* resource:// registrations in b2gdroid. r?fabrice
Attachment #8648849 - Attachment description: MozReview Request: Bug 1180358 - Part 1: Add the b2gdroid sub-product. r?fabrice → MozReview Request: Bug 1180358 - Part 1: Add the b2gdroid sub-product. r=fabrice
Comment on attachment 8648849 [details]
MozReview Request: Bug 1180358 - Part 1: Add the b2gdroid sub-product. r=fabrice

Bug 1180358 - Part 1: Add the b2gdroid sub-product. r=fabrice
Comment on attachment 8648850 [details]
MozReview Request: Bug 1180358 - Part 2: Build the b2gdroid APK. r?glandium

Bug 1180358 - Part 2: Build the b2gdroid APK. r?glandium
Comment on attachment 8648851 [details]
MozReview Request: Bug 1181209 - Make changes to Gecko needed for b2gdroid to boot. r?blassey

Bug 1181209 - Make changes to Gecko needed for b2gdroid to boot. r?blassey
Comment on attachment 8648852 [details]
MozReview Request: Bug 1180461 - Part 1: Build gaia during b2gdroid build. r?glandium

Bug 1180461 - Part 1: Build gaia during b2gdroid build. r?glandium
Attachment #8648852 - Flags: review?(mh+mozilla)
Comment on attachment 8648853 [details]
MozReview Request: Bug 1180461 - Part 2: Package gaia into b2gdroid APK. r?glandium

Bug 1180461 - Part 2: Package gaia into b2gdroid APK. r?glandium

This whole approach is rough.  Right now, I'm not concerned about
localizing b2gdroid (in particular, APK repacks) but I want to stay
close to Fennec.  Future work should unify much of this APK
re-packaging and highlight the differences between Fennec and
b2gdroid.
Attachment #8648853 - Flags: review?(mh+mozilla)
Hey folks, I'm keeping the reviews in this ticket even though it's marked as RESO FIXED just so context remains in one place.  I'll push with appropriate bug numbers.
Comment on attachment 8648851 [details]
MozReview Request: Bug 1181209 - Make changes to Gecko needed for b2gdroid to boot. r?blassey

Bug 1181209 - Make changes to Gecko needed for b2gdroid to boot. r?blassey
Comment on attachment 8648852 [details]
MozReview Request: Bug 1180461 - Part 1: Build gaia during b2gdroid build. r?glandium

Bug 1180461 - Part 1: Build gaia during b2gdroid build. r?glandium
Comment on attachment 8648853 [details]
MozReview Request: Bug 1180461 - Part 2: Package gaia into b2gdroid APK. r?glandium

Bug 1180461 - Part 2: Package gaia into b2gdroid APK. r?glandium

This whole approach is rough.  Right now, I'm not concerned about
localizing b2gdroid (in particular, APK repacks) but I want to stay
close to Fennec.  Future work should unify much of this APK
re-packaging and highlight the differences between Fennec and
b2gdroid.
Comment on attachment 8648845 [details]
MozReview Request: Bug 1195388 - Include services-* resource:// registrations in b2gdroid. r?fabrice

https://reviewboard.mozilla.org/r/16283/#review15319

Ship It!
Attachment #8648845 - Flags: review?(fabrice) → review+
Nick, can you fold in this patch? That sets some configuration flag for gaia to create a more reasonable profile. In the future I think we'll go with what we call a "distribution directory" for b2gdroid in gaia, but we don't have that yet.
Comment on attachment 8648850 [details]
MozReview Request: Bug 1180358 - Part 2: Build the b2gdroid APK. r?glandium

https://reviewboard.mozilla.org/r/16293/#review15321

::: mobile/android/b2gdroid/app/Makefile.in:13
(Diff revision 2)
> +# consumed here.  This is guaranteed because base/ is traversed before
> +# b2gdroid/app.  Second, there is a correctness issue: the GeckoView JAR

This is not actually why it is "guaranteed". The reason it is is because the jars in base/ are built because GeneratedJNIWrappers.cpp depends on them, and GeneratedJNIWrappers.cpp is built during `libs` which happens before `tools`. I guess it's okay-ish to rely on that, but that really needs to be documented properly.

Did someone review the non-build parts of this?
Attachment #8648850 - Flags: review?(mh+mozilla) → review+
Comment on attachment 8648852 [details]
MozReview Request: Bug 1180461 - Part 1: Build gaia during b2gdroid build. r?glandium

https://reviewboard.mozilla.org/r/16297/#review15323

Ship It!
Attachment #8648852 - Flags: review?(mh+mozilla) → review+
Comment on attachment 8648853 [details]
MozReview Request: Bug 1180461 - Part 2: Package gaia into b2gdroid APK. r?glandium

https://reviewboard.mozilla.org/r/16299/#review15325

Ship It!

::: mobile/android/b2gdroid/moz.build:27
(Diff revision 4)
> +# We must build app after building /b2g/gaia, since the gaia directory
> +# is packed into the APK as an assets/ directory.

Please mention that the `libs` target from b2g/gaia needs to happen before the `libs` target from app, thus relying on the non-parallel nature of the `libs` recursion.

::: mobile/android/b2gdroid/moz.build:29
(Diff revision 4)
> +DIRS += [

This doesn't need to be a separate assignment. You can add the comment and the the 'app' in the list above.

::: mobile/android/b2gdroid/moz.build:30
(Diff revision 4)
> +    'app', 

trailing whitespace
Attachment #8648853 - Flags: review?(mh+mozilla) → review+
https://reviewboard.mozilla.org/r/16295/#review15397

::: b2g/components/moz.build:43
(Diff revision 4)
> +    'RecoveryService.js',

We don't want RecoveryService.js for non-gonk targets.

::: mobile/android/b2gdroid/components/B2GDroidSetup.js:3
(Diff revision 4)
> + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

I would rename this file to just "Setup.js" since it's now under m/a/b2gdroid/components

::: mobile/android/b2gdroid/components/b2gdroid.manifest:2
(Diff revision 4)
> +component {8bc88ef2-3aab-4e94-a40c-e2c80added2c} B2GDroidSetup.js

And update here

::: mobile/android/b2gdroid/components/moz.build:7
(Diff revision 4)
> +    'B2GDroidSetup.js',

And here

::: mobile/android/b2gdroid/installer/package-manifest.in:667
(Diff revision 4)
> +@BINPATH@/components/B2GDroidSetup.js

and here...

::: toolkit/modules/FileUtils.jsm:63
(Diff revision 4)
> -    var dir = gDirService.get(key, Ci.nsIFile);
> +    var dir;

undo these changes, this is just debugging
Comment on attachment 8648851 [details]
MozReview Request: Bug 1181209 - Make changes to Gecko needed for b2gdroid to boot. r?blassey

https://reviewboard.mozilla.org/r/16295/#review15399

Ship It!
Attachment #8648851 - Flags: review+
Comment on attachment 8648851 [details]
MozReview Request: Bug 1181209 - Make changes to Gecko needed for b2gdroid to boot. r?blassey

r=me with nits addressed
Attachment #8648851 - Flags: review?(blassey.bugs)
https://reviewboard.mozilla.org/r/16293/#review15321

> This is not actually why it is "guaranteed". The reason it is is because the jars in base/ are built because GeneratedJNIWrappers.cpp depends on them, and GeneratedJNIWrappers.cpp is built during `libs` which happens before `tools`. I guess it's okay-ish to rely on that, but that really needs to be documented properly.

In fact there are a huge number of targets in m/a/b/libs that depend on the jars, but classes.dex is the top-level one that counts. I will update this comment to reflect that it depends on the processing of libs and the specific targets.

I'll add an r=fabrice -- he looked them over and tested.  I expect this to change a lot as fabrice's team pushes on it.
Product: Firefox for Android → Firefox Build System
Target Milestone: Firefox 43 → mozilla43
You need to log in before you can comment on or make changes to this bug.