This patch makes the :geckoview Gradle project only use
o.m.geckoview.BuildConfig, and makes the :app Gradle project use all
of the preprocessed code coming from the moz.build system.
Eventually, we'll reduce that set of preprocessed code to only
o.m.gecko.BuildConfig, which will then be produced by Gradle.
MozReview-Commit-ID: Dnkde7axyZL
--HG--
extra : rebase_source : dc0b7f9fa542cbfd9c665bfac761d45f5957f7b8
Some of these make no sense for GeckoView, but perfect is the enemy of
the good here.
MozReview-Commit-ID: 9MwRkc61v9P
--HG--
extra : rebase_source : 8e7fa8102c615f34dbd76394fb6877188007c3c7
There's already a secret dependency where
mobile/android/base/Makefile.in (and generated AppConstants.java)
depends on $topobjdir/buildid.h, so this shouldn't be much worse than
what we have.
MozReview-Commit-ID: 2hkAGE9uT10
--HG--
extra : rebase_source : 090b7a5f2063a4e0cc20252703e6575e6716448a
We want to use the Palette library for getting a fallback accent colour for lightweight themes, however because of bug 1318667, we might have to continue using our own implementation of getDominantColor on x86 devices.
Therefore we move this into BitmapUtils, so we can have a central location from which to switch between our own and the Palette library implementation.
MozReview-Commit-ID: 52WsfZbW12x
--HG--
extra : rebase_source : b0eb60c25355d1a13418844b5684e4356225e8c3
We want to use the Palette library for getting a fallback accent colour for lightweight themes, however because of bug 1318667, we might have to continue using our own implementation of getDominantColor on x86 devices.
Therefore we move this into BitmapUtils, so we can have a central location from which to switch between our own and the Palette library implementation.
MozReview-Commit-ID: 52WsfZbW12x
--HG--
extra : rebase_source : b7e66c027ef6c4a6aa01fcda6d17b6afb2e854a9
Even when building the "app" module in debug mode, by default Gradle still chooses to build all dependencies in release mode, which means that all of our own source files that reside in such a library (geckoview, respectively thirdparty) will e.g. be missing debug info for local variables.
MozReview-Commit-ID: owZr9yKtYI
--HG--
extra : rebase_source : ae09795ebe70bf4213cd3d145efa355712c702a0
This was only ever used to automatically fetch Android SDK
dependencies in the android-gradle-dependencies job in Task Cluster.
That function is now provided by newer Android-Gradle build plugins.
MozReview-Commit-ID: Adrxm2rAPlZ
--HG--
extra : rebase_source : 6cccb53e2ebc2642ee6c61ef13fcb6d8321b67cf
Include necessary WebRTC files and permissions for GeckoView. For
permissions, we need to add the RECORD_AUDIO permission to GeckoView's
AndroidManifest.xml, but since the file is not preprocessed, we can't
use an `#ifdef MOZ_WEBRTC` block, so I think we'll just have to
unconditionally include the permission.
MozReview-Commit-ID: IUd8FFMsW99
--HG--
extra : rebase_source : b75462d53e6bd05b324e8551c888853c8678ec6b
This patch does two things:
- add a Gradle-only ANDROID_COMPILE_SDK_VERSION substitution;
- uses it while uniformizing all of the Gradle Android SDK version
configurations.
The approach is fairly standard (and we were using it already); see,
for example
https://medium.com/@ali.muzaffar/gradle-configure-variables-for-all-android-project-modules-in-one-place-5a6e56cd384e
This will make bumping the Gradle configuration versions forward
easier.
MozReview-Commit-ID: 1j5siCvR5qt
--HG--
extra : rebase_source : 07afb00de0e4a72af4026eb19ff4f2530c119336
To observe the difference, use `javap -l`. For example, for
automationRelease and automationDebug built with `./mach gradle clean
app:assembleAutomationRelease app:assembleAutomationDebug`, I see
locally:
$ javap -l objdir-droid/gradle/build/mobile/android/app/intermediates/classes/automation/release/org/mozilla/gecko/home/activitystream/menu/ActivityStreamContextMenu\$1.class
Compiled from "ActivityStreamContextMenu.java"
class org.mozilla.gecko.home.activitystream.menu.ActivityStreamContextMenu$1 extends org.mozilla.gecko.util.UIAsyncTask$WithoutParams<java.lang.Boolean> {
final android.view.MenuItem val$bookmarkItem;
final org.mozilla.gecko.home.activitystream.menu.ActivityStreamContextMenu this$0;
org.mozilla.gecko.home.activitystream.menu.ActivityStreamContextMenu$1(org.mozilla.gecko.home.activitystream.menu.ActivityStreamContextMenu, android.os.Handler, android.view.MenuItem);
LineNumberTable:
line 103: 0
<snip>
}
$ javap -l objdir-droid/gradle/build/mobile/android/app/intermediates/classes/automation/debug/org/mozilla/gecko/home/activitystream/menu/ActivityStreamContextMenu\$1.class
Compiled from "ActivityStreamContextMenu.java"
class org.mozilla.gecko.home.activitystream.menu.ActivityStreamContextMenu$1 extends org.mozilla.gecko.util.UIAsyncTask$WithoutParams<java.lang.Boolean> {
final android.view.MenuItem val$bookmarkItem;
final org.mozilla.gecko.home.activitystream.menu.ActivityStreamContextMenu this$0;
org.mozilla.gecko.home.activitystream.menu.ActivityStreamContextMenu$1(org.mozilla.gecko.home.activitystream.menu.ActivityStreamContextMenu, android.os.Handler, android.view.MenuItem);
LineNumberTable:
line 103: 0
LocalVariableTable:
Start Length Slot Name Signature
0 16 0 this Lorg/mozilla/gecko/home/activitystream/menu/ActivityStreamContextMenu$1;
0 16 1 this$0 Lorg/mozilla/gecko/home/activitystream/menu/ActivityStreamContextMenu;
0 16 2 x0 Landroid/os/Handler;
<snip>
}
MozReview-Commit-ID: 3HmiGkHhowQ
--HG--
extra : rebase_source : c84d8d4b8ac813e49db0c61a30c7098ff2eae3f4
There's still work to be done here to unify these two processes, but
that can be follow-up. In any case, geckoview.BuildConfig should
change very infrequently, and we're hoping to transition to Gradle
eventually.
MozReview-Commit-ID: D2c6XTYqubj
--HG--
extra : rebase_source : 107febdd97899f29fa493925c70252738fb666b9
We use a Maven repository and the (misleadingly named!) uploadArchives
task because this is the best way to make Android Studio download and
recognize the Javadoc and sources. With this, it's automatic; with a
single AAR file, it's a nightmare of point-and-click configuration.
This patch does a bunch of Gradle hacking to make -javadoc and
-sources JARs; there's nothing special or particularly likely to break
here.
This patch also adds Proguard declarations to the :geckoview library
project. That involves moving a good part of the Proguard
configuration into mobile/android/geckoview. (I also expand upon the
existing configuration.) This should be only a re-arrangement, and
the resulting file is included in the original, so nothing should be
changed.
MozReview-Commit-ID: BGNW1v92J0k
--HG--
extra : rebase_source : 94633d27e8ae6bafa3d6823996355c22d2e2e6eb
We need to bump the Gradle Deps task, which fetches dependencies, to
include new test dependencies; and use freshly uploaded tooltool
archives (manually uploaded) containing the new test dependencies.
MozReview-Commit-ID: 8bNOVQPHlk6
--HG--
extra : rebase_source : 0c80117fb58e43f9c857027941f0a14f03b97f13