Commit Graph
73 Commits
Author SHA1 Message Date
Jing-wei Wu 9cc93edd60 Bug 1375351 - Part 1: Remove Australis flavor. r=maliu,nalexander,sebastian
We should now only maintain Photon flavor. Remove all Australis related configuration in build scripts.

MozReview-Commit-ID: H4LE8LAso42
2017-08-10 10:19:33 +08:00
Nick Alexander 5ad0a8dcfa Bug 1361545 - Add "skin" flavorDimension for Photon mobile work. r=sebastian,bustage-fix
This is pretty straight-forward.

Sadly, this will require local developers to add a "skin" product
flavor to their invocations, like:

./mach gradle app:assembleLocalAustralisDebug

In addition, this shows how many different variants of the Gradle
product flavor are embedded into our automation configurations.  I
can't solve that at this time.

Since I was here, I took the time to rename "automation" to
"official", which makes "localAustralis" the default in Android
Studio, avoiding a common issue with new builders producing an APK
that doesn't include omni.ja in the IDE.

MozReview-Commit-ID: CtU7zFpNCob
2017-05-03 19:20:58 +02:00
Sebastian Hengst cf59f706b3 Backed out changeset 289c6a3f7886 (bug 1361545) for busting Android gradle builds. r=backout 2017-05-03 19:19:52 +02:00
Nick Alexander a1cde6300f Bug 1361545 - Add "skin" flavorDimension for Photon mobile work. r=sebastian
This is pretty straight-forward.

Sadly, this will require local developers to add a "skin" product
flavor to their invocations, like:

./mach gradle app:assembleLocalAustralisDebug

In addition, this shows how many different variants of the Gradle
product flavor are embedded into our automation configurations.  I
can't solve that at this time.

Since I was here, I took the time to rename "automation" to
"official", which makes "localAustralis" the default in Android
Studio, avoiding a common issue with new builders producing an APK
that doesn't include omni.ja in the IDE.

MozReview-Commit-ID: CtU7zFpNCob
2017-05-02 15:27:37 -07:00
Jim Chen 3fd42a2b15 Bug 1351000 - 1. Generate separate omni.ja for GeckoView; r=glandium
Generate a separate omni.ja for GeckoView during the packaging step,
under dist/geckoview. Define a MOZ_GECKOVIEW_JAR flag to optionally
include/exclude files in the package manifest.
2017-04-05 14:23:43 -04:00
Nick Alexander d98dbfec90 Bug 1353055 - Strip 'vars' debugging information when building Fennec --with-gradle. r=ahunt
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
2017-04-03 13:41:11 -07:00
Jim Chen 584f1edc5a Bug 1343562 - Look for omni.ja from multiple sources; r=nalexander
Look for omni.ja to copy from in dist/fennec and in dist/fennec/assets,
but throw an error if we find multiple copies of omni.ja that are
potentially conflicting.
2017-03-10 16:29:41 -05:00
Nick Alexander 872d085d9b Bug 1291363 - Add geckoview and geckoview_example Gradle projects. r=jchen,sebastian
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
2016-10-05 20:23:38 -07:00
Michael Comella c11bbea33b Bug 1258769 - Backed out changeset fe11700b6cdf.
MozReview-Commit-ID: Jxz5RK8o4n4
2016-03-25 13:53:58 -07:00
Michael Comella c6fb907a78 Bug 1258769 - Use soter to add checkstyle gradle task with simple checks. r=nalexander
Run checkstyle via:
 ./mach gradle app:checkstyle

This is intended to be added to automation in bug 1258787.

Concerns with this patch:
  1) I don't have a maven-metadata-local.xml. However, I didn't take the
snapshotted version and [1] seems to indicate it's unnecessary for my
particular build.

For the addition of future checks, it's worth noting Google's config is
available:
  https://github.com/checkstyle/checkstyle/blob/3e4367941c3e9680703e8ea8400abbd5dc78e1d9/src/main/resources/google_checks.xml

And this version contains links with descriptions of each of the tasks:
  http://checkstyle.sourceforge.net/google_style.html

[1]: https://maven.apache.org/ref/3.3.3/maven-repository-metadata/

MozReview-Commit-ID: ID3X9ZA27b0
2016-03-25 09:52:15 -07:00
Nick Alexander 9ac94823aa Bug 1252928 - Part 1: Use Jake Wharton's sdk-manager-plugin in Fennec's Gradle configuration. r=sebastian
This is a version produced locally from
https://github.com/JakeWharton/sdk-manager-plugin/commit/1d07987217120fffdc0ce1291d73e974310d7d92.
I used |./gradlew install| and then copied the pieces out of ~/.m2/repository.

Local builders should never download using this plugin, since |mach configure|
ensures that all the relevant pieces can already be found.  It's just useful in
automation; and as an eventual replacement for chunks of |mach bootstrap|.

MozReview-Commit-ID: 9JiFe0xLr99
2016-03-01 20:12:04 -08:00
Nick Alexander 73d9bc37f1 Bug 1248005 - Use com.stanfy.spoon:spoon-gradle-plugin:1.0.4. r=me
MozReview-Commit-ID: 8hSOCq8XpZ7
2016-02-11 12:44:53 -08:00
Nick Alexander a822fd579b Bug 1230848 - Remove Gradle configuration rooted in the object directory. r=gps
DONTBUILD NPOTB

The top source directory configuration requires
mobile/android/gradle/m2repo/**, so it stays.  There's no value
changing the location; it contains an Android-specific Gradle plugin.

We note the removal of |mach gradle-install| and point to the new
documentation.
2015-12-06 15:02:11 -08:00
Nick Alexander ed711701d2 Bug 1229438 - Part 3: Update build. r=rnewman 2015-12-01 10:56:09 -08:00
Nick Alexander c30538bfc5 Bug 1222120 - Part 1: Add custom Robolectric test runner. r=vivek
This exports the buildDir to Robolectric via an Android-Gradle
buildConfigField, and then lightly massages the existing test runner
to use the exported value.
2015-11-06 10:58:18 -08:00
Nick Alexander 296b5271de Bug 1219058 - Part 2: Normalize Robocop test harness source layout. r=gbrown
Pretty straight-forward.  The win here is that the directory is now
sensible, so we don't need the robocop_harness symlink for the Gradle
build configuration.
2015-10-27 17:16:09 -07:00
Nick Alexander 67c8886684 Backed out changesets fb5765dffe01 and 0447429a5627 (Bug 1219058). r=me
I realize I wanted to shorten these paths in response to review
comments.  I'll reland shortly.
2015-10-28 14:47:14 -07:00
Nick Alexander c7f2f1d4b3 Bug 1219058 - Part 2: Normalize Robocop test harness source layout. r=gbrown
Pretty straight-forward.  The win here is that the directory is now
sensible, so we don't need the robocop_harness symlink for the Gradle
build configuration.
2015-10-27 17:16:09 -07:00
Nick Alexander e5bf0ea112 Bug 1207708 - Part 2: Build against play-services-{basement,base,gcm} if MOZ_ANDROID_GCM. r=sebastian
Since MOZ_NATIVE_DEVICES builds against play-services-{basement,base,cast},
some ad-hoc de-duplication is necessary.
2015-10-27 17:41:49 -07:00
Nick Alexander 300e8296b9 Bug 1218935 - Normalize background JUnit3 source layout. r=me,rnewman 2015-10-27 11:56:06 -07:00
Sebastian Kaspari 4a3c065e8d Bug 1189306 - Add Android Design Support library to gradle and mach builds. r=nalexander 2015-10-15 13:01:32 +02:00
Nick Alexander 5c0b4be3f7 Bug 1174244 - Part 4: Remove 'thirdparty_adjust_sdk' Gradle project. r=sebastian 2015-10-20 17:52:15 -07:00
Nick Alexander 6f9f6edcf8 Bug 1123416 - Part 1: Make topsrcdir a valid Gradle project root. r=sebastian
The sub-project definitions are still in the object directory (and
still installed by |mach gradle-install); over time, we'll migrate
them out.

The Gradle wrapper and {settings,build}.gradle in topsrcdir are
identical to those in mobile/android/gradle.  I don't like the
duplication, but I also don't want the burden of keeping the two
configurations identical.  We'll move away from the configuration
using mobile/android/gradle as quickly as we can.
2015-10-21 15:07:55 -07:00
Manav Batra a426cf7fec Bug 1214626 - Updated mediarouter dependency in gradle build. r=sebastian 2015-10-20 12:19:00 -04:00
Nick Alexander c1d00c89e6 Bug 1216434 - Don't symlink to objdir in |mach gradle-install|. r=sebastian
DONTBUILD NPOTB

This has always been possible with Gradle -- Gradle doesn't care where
in the file tree resources are found.  (Gradle is perfectly happy to
take resources from outside of the root project directory.)  IntelliJ,
however, displays resources outside of known "content roots" in
special and frankly unhelpful ways.  Here, we avoid that on a
technicality: IntelliJ doesn't acknowledge (or even register a content
root!) for the non-standard AndroidManifest.xml locations set in
build.gradle.  This means we don't see odd content roots in unexpected
places in IntelliJ.

With this change, the formerly failing command

mach clobber && mach configure && mach gradle-install

completes successfully.  That gets us one step closer to being able to
open Fennec in IntelliJ without running additional commands.
2015-10-18 16:44:04 -07:00
Nick Alexander cd39c2cfe3 Bug 1216430 - Use Gradle version 2.7. r=sebastian
DONTBUILD NPOTB
2015-10-18 17:05:29 -07:00
Nick Alexander 12b4044004 Bug 1208793 - Part 4: Remove 'preprocessed_code' Gradle project. r=sebastian
DONTBUILD NPOTB

This needed the same dependency changes that the previous part did.
There's a nice simplification here because some of the code is now
being compiled in the containing project (base) and not the (now
removed) sibling project.
2015-10-19 18:22:32 -07:00
Nick Alexander a9d65e1a17 Bug 1208793 - Part 3: Remove 'preprocessed_resources' Gradle project. r=sebastian
While testing, I found some issues with the existing dependencies.  To
address them, I've made all project preBuild tasks depend on the
(single) root generateCodeAndResources; this should ensure that the
Make integration happens as early as possible.  In addition, I fixed
the dependencies syncing the generated resources into the build
directory, which weren't quite right.  This works well locally now.
2015-10-19 18:06:10 -07:00
Nick Alexander 9bff6b69f8 Bug 1208793 - Part 2: Remove 'branding' Gradle project. r=sebastian
Technically, branding should be part of the App and not GeckoView, but
we don't have separated resources yet, so in it goes.
2015-10-19 17:10:53 -07:00
Sebastian Kaspari f0d28ace6f Bug 1193206 - Build with Android support library 23.0.1. r=nalexander 2015-10-07 09:13:34 +02:00
Sebastian Kaspari 8bf2e24463 Bug 1210755 - Gradle build: Compile with SDK version 23 and use build tools 23.0.1. r=nalexander 2015-10-05 15:00:21 +02:00
Sebastian Kaspari a883509e43 Bug 1197147 - Gradle build: Use version 8.1 of Google Play Services. r=nalexander 2015-10-05 11:59:01 +02:00
Sebastian Kaspari 9ebf861679 Bug 1208576 - Build with appcompat-v7 regardless of MOZ_NATIVE_DEVICES flag. r=nalexander 2015-09-28 12:10:42 +02:00
vivek e8f75c3ec0 Bug 1204565 - Selectively enable unit test based on build variant r=nalexander
DONTBUILD NPOTB

Project specific test filtering is automagically handled by gradle task graph
2015-09-15 00:55:49 +03:00
vivek 1661295e0a Bug 1182193 - Part 4: Disable unit test for regular gradle build tasks r=nalexander 2015-09-12 01:08:18 +03:00
vivek dfca9013c8 Bug 1182193 - Part 3: Added runwith annotations for unittest with gradle r=nalexander 2015-09-04 00:50:42 +03:00
vivek d13983c269 Bug 1182193 - Part 1: Add Gradle-based Robolectric JUnit 4 tests r=nalexander 2015-08-29 00:26:36 +03:00
Nick Alexander ffe7aa7c06 No bug - Make project-wide default language level be Java 1.7 in IntelliJ. r=me
DONTBUILD NPOTB

Straight from http://stackoverflow.com/a/24751182 and the linked
IntelliJ tickets.
2015-08-21 16:16:16 -07:00
Nick Alexander 4259986e3c Bug 1196970 - Part 6: Copy preprocessed resources from objdir to build directory during Gradle build. r=sebastian
DONTBUILD NPOTB

This means we don't require the directory in the object directory at
gradle-install time.  We're not concerned if the resource files are
missing, since we have code to ensure they're fresh already; and if
they are missing, we'll quickly fail as we try to process the resource
set.
2015-08-07 17:00:51 -07:00
Nick Alexander e84f63d41c Bug 1196970 - Part 5: Copy preprocessed code from objdir to build directory during Gradle build. r=sebastian
This means we don't require the directory in the object directory at
gradle-install time.  We're not concerned if the source files are
missing, since we have code to ensure they're fresh already; and if
they are missing, we'll quickly fail as we try to compile with missing
sources.
2015-08-07 16:38:43 -07:00
Nick Alexander 5561c00474 Bug 1196970 - Part 4: Copy omni.ja, native libraries, and asset libraries from dist/fennec manually. r=sebastian
This allows us to not require dist/fennec/* to exist in the object
directory at gradle-install time.  It gets us one small step closer to
being able to sit down to a fresh source tree and open a Fennec
project in IntelliJ.
2015-08-18 10:51:10 -07:00
Nick Alexander 6f6069839f Bug 1196970 - Part 3: Keep all preprocessed_code references in the objdir. r=sebastian
This was just an oversight.  The Gradle configuration referenced
topsrcdir rather than having a symlink via the objdir.  This didn't
impact the Gradle build, but it did make the preprocessed_code Gradle
project appear outside of the root Gradle project in IntelliJ.
2015-08-07 14:05:50 -07:00
Nick Alexander 36cc33092b Bug 1196970 - Part 2: Make all Android Gradle projects generateCodeAndResoures. r=me
It's convenient to know that the object directory is up-to-date (after
|make gradle-targets|) before any Gradle project builds.
2015-08-20 15:10:06 -07:00
Nick Alexander 0ff89e920a No bug - Bump Google Play versions in Android Gradle versions. r=me
DONTBUILD NPOTB

We're seeing build failures since 6.5.+ doesn't match 6.5.87.  This
shouldn't be fuzzy, and it shouldn't be an ancient version of Google
Play Services either.  (In moz.build local builds , we're using a much
more recent version.  In automation, I'm not certain what we're
using.)
2015-08-17 11:26:29 -07:00
Nick Alexander 5b85fd5f41 Bug 1190940 - Handle MOZ_NATIVE_DEVICES and MOZ_WEBRTC in Gradle build. r=sebastian
This is an information sharing review request.  This patch
demonstrates two ways to handle static build flags in the Java source
base.

For MOZ_NATIVE_DEVICES, we /exclude/ certain Java source files.  This
is unwieldy but works fine.

For MOZ_WEBRTC, we selectively /include/ certain Javas source
directories.  We symlink the directories into the objdir so that the
IntelliJ configuration remains entirely under the project directory --
IJ really doesn't like it when sources are outside of the project
content root.  Since two source directories declare the same package
(org.webrtc.videoengine) we can't symlink deep in the package
hierarchy.  Therefore, we add top-level source directories sibling to
src/main.
2015-08-04 10:01:26 -07:00
Ryan VanderMeulen f33cbc4e91 Backed out changeset 7c44c0343564 (bug 1181020) for causing intermittent testAboutPage failures. 2015-07-16 15:11:20 -04:00
Jonathan Almeida f4a5222251 Bug 1181020 - Update Robocop to latest version to support RecyclerView. r=mcomella
- Removed old robotium jar in replace for the newer one.
 - Newer robotium has packaging changes which were updated in all tests.
 - Updated in build.gradle and makefile.
2015-07-07 14:18:56 -07:00
Sebastian Kaspari 777a843b27 Bug 1180605 - spoon-gradle-plugin: Set spoon runner dependency to 1.1.10. r=mhaigh 2015-07-06 11:29:06 +02:00
Nick Alexander f49ace1f2c No bug - Reference topobjdir less in Gradle configuration. r=me
DONTBUILD NPOTB
2015-06-29 14:41:05 -07:00
Michael Comella b58249bb35 Bug 1170884 - Disable IconColors lint warning. r=mhaigh 2015-06-24 11:55:18 -07:00