Граф коммитов

128 Коммитов

Автор SHA1 Сообщение Дата
Nick Alexander ed5a81e570 Bug 1174244 - Part 4: Remove 'thirdparty_adjust_sdk' Gradle project. r=sebastian
--HG--
extra : commitid : G8rCruCzUYN
extra : rebase_source : 95b7c739985ff7f61c32dbd0d8d578220f772da1
2015-10-20 17:52:15 -07:00
Nick Alexander d8b296faa4 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.

--HG--
extra : commitid : 6KuAzJIpq3Y
extra : rebase_source : 0b85181412d86fa49ee52cf7d612dd3c4028dfb6
extra : histedit_source : 6b8d8171810501a0af053df080b336af70c456b6
2015-10-18 16:44:04 -07:00
Nick Alexander 6b0e257278 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.

--HG--
extra : commitid : IHKXiR8SpLr
extra : rebase_source : 0b2e03f0a76ed17782f0bbaba61adbfa547a6ba2
extra : histedit_source : 0c3420152b2c37dfcbb6e11e6ca58e6c03ad7aca
2015-10-19 18:22:32 -07:00
Nick Alexander 8f151be29c 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.

--HG--
extra : commitid : 4Kblf9h0yst
extra : rebase_source : e9e6fa415939f2622a7cfc09f5945e31269338e4
extra : histedit_source : 4cdf1470a0d99b1f805a4fda69d57f425f613421
2015-10-19 18:06:10 -07:00
Nick Alexander 960750c909 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.

--HG--
extra : commitid : 5r00T6BTBRE
extra : rebase_source : ca1411809bb5352617814bc136689d77358fd29c
extra : histedit_source : a435587e3bf16ad3f5457936a0e4efeffa69f9a4
2015-10-19 17:10:53 -07:00
Nick Alexander b47fb2c75a Bug 1213418 - Part 1: Use mozregression to download in |mach artifact|. r=me
DONTBUILD NPOTB

--HG--
extra : commitid : LU7F5VjVj4m
extra : rebase_source : 5c9e36c01c7aa757d41a9994877b6f7d7568f4e3
2015-10-09 17:47:17 -07:00
vivek 9e19a7c3eb Bug 1182193 - Part 1: Add Gradle-based Robolectric JUnit 4 tests r=nalexander
--HG--
extra : commitid : 9Uf6P78K64R
extra : rebase_source : 64f84369ae718625e9c8a60f1507d49fd40bb123
extra : histedit_source : f3277962a15e98553a27401f10f605bced689ae2
2015-08-29 00:26:36 +03:00
Nick Alexander 8d71540829 No bug - Add |mach android| command. r=me
DONTBUILD NPOTB

This adds a pass-thru |mach android| command.  It's just here to make
it easier to add and remove Android SDK packages: since most folks
don't have the Android tools on their PATH, this saves them having to
root through the object directory to find the path to the tool.

--HG--
extra : commitid : HgCtltLK3V4
extra : rebase_source : 6c7db25c10b643c8fe655976e613c29db7cd0bc4
extra : histedit_source : fd95eb809a901fd3873968117c60966f3f82790c
2015-08-26 10:57:49 -07:00
Geoff Brown 2015a6ea72 Bug 1164596 - Add mach android-emulator command; r=ahal 2015-09-01 15:07:53 -06:00
Nick Alexander a099fca045 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.

--HG--
extra : histedit_source : 04767c8e86c7012ed3c46564e5660b17e1355607
extra : rebase_source : 658cedf4a698d603571153cefb128b87a6ad6a2e
extra : commitid : DIwvp3ib9Z9
extra : source : 00e1cd6d04c03a65433b01cea194edf7c9d7c835
extra : amend_source : 244a950264c0d10cf495a3a7d7d5ef52eab2da14
2015-08-07 17:00:51 -07:00
Nick Alexander 0870e687d8 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.

--HG--
extra : commitid : IIuTcQiEJ37
extra : rebase_source : 640e8f2005b71d1c79719dcecc56efb8540341fa
extra : source : f8bc8f04b3c01cf62403f09cc3a4b37826e280bc
extra : histedit_source : 34335f47dd33a07585ef8e8a24bdc7cb43b62239
2015-08-07 16:38:43 -07:00
Nick Alexander 7671929209 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.

--HG--
extra : commitid : KNnKth56I1L
extra : rebase_source : b4fae1033335760dd3d6d9b8b71ffb7bbb1a6906
extra : source : 7b5b6adc5ac69fd733f9937dd846c52bff36af0a
extra : histedit_source : cb05d3690f909db51cd6116cc80b070f62338001
2015-08-18 10:51:10 -07:00
Nick Alexander b429a68a44 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.

--HG--
extra : commitid : As00AcCfYkr
extra : rebase_source : 1d5b79f5e4439306a5a9e7d625e39ef97d37d1eb
extra : source : fcec6d827887e3e64ebd610ef4f893d11dde52ab
extra : histedit_source : 70790f27c201462e5346660f5eb39e39303bdc8d
2015-08-07 14:05:50 -07:00
Nick Alexander 61a6ae674e Bug 1160563 - Part 2: Make ANDROID_ASSETS_DIRS a moz.build variable. r=gps
We have had singular ANDROID_ASSETS_DIR in Makefile.in for a while.
Fennec itself does not use the existing Makefile.in Android code, for
complicated historical reasons.

This makes the existing variable moz.build-only; generalizes the
existing variable to an ordered list; and adds the equivalent use of
the new list to the Fennec build, with a simple example asset.

This patch also updates the packager to include assets packed into the
gecko.ap_.  Without the packager change, the assets/ directory in the
ap_ gets left out of the final apk.  This whole approach is totally
non-standard but is more or less required to support our single-locale
repack scheme.

--HG--
extra : commitid : 4EAh1UNGNWT
extra : rebase_source : 5e5b4c4a120c3b4cc776c9f9380ddd2f9b63587e
extra : source : 0ddce3eb833e6d6180a19928a9b45d5d12f1d7fa
2015-08-12 11:04:03 -07:00
Nick Alexander 3788437b16 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.

--HG--
extra : commitid : 2huDQAbl5NJ
extra : rebase_source : 8171c7e6944722d6d2f772ea9fae710eb2ecaec4
2015-08-04 10:01:26 -07:00
Gregory Szorc 3e949ee8fe Bug 1176642 - Use absolute_import in mach_commands.py files; r=glandium
This removes ambiguity as to which modules are being imported, making
import slightly faster as Python doesn't need to test so many
directories for file presence.

All files should already be using absolute imports because mach command
modules aren't imported to the package they belong to: they instead
belong to the "mach" package. So relative imports shouldn't have been
used.

--HG--
extra : commitid : 6tFME1KKfTD
extra : rebase_source : 78728f82f5487281620e00c2a8004cd5e1968087
2015-06-21 17:39:09 -07:00
Nick Alexander 0a6017a1af Bug 1162191 - Add |mach artifact| for installing downloaded Fennec binaries. r=gps
DONTBUILD ON A CLOSED TREE: Android-only and the build changes are cosmetic.

Very much a first cut, but I'd like to get some Fennec early adopters testing.

This adds:

* |mach artifact install| to fetch and install Fennec binaries;
* |mach artifact last| to print details about what was last installed;
* |mach artifact {print,clear}-caches|, for debugging.

This code is exposed as a new mozbuild.artifacts Python but it's not
particularly general.  My intention was to get things out of the mach command
more than produce a general artifact fetching API.  We can leave that bike
shed to Bug 1124378.

I've been testing this with --disable-compile-environment and it works well
locally, although there's no reason a knowledgeable developer couldn't use
this in conjunction with a fully-built tree.  (I don't know when such a
situation would arise, but I know of no technical impediment.)

--HG--
extra : commitid : 1T28aVfArqF
extra : rebase_source : b8c11244de8be0a14d605853f30cd47312d0a4ba
extra : histedit_source : 78a224501cd3cf0f86707c9c9549b61b4b248ba7
2015-06-24 23:12:00 -07:00
Nick Alexander 41cd99af7b Bug 1168407 - Implement a bidirectional Java addon interface. f=jchen,r=rnewman,r=mfinkle
There are several parts to this ticket:

1) Produce javaaddons-1.0.jar, a standalone JAR defining a (versioned)
Java interface suitable for consumption by third-party Java addon
implementations.

2) Support the new V1 interface in the JavaAddonManager.

3) Add Robocop JavascriptTests testing the JavaScript message passing
interface to and from Java.

This patch can be read as "not in tests/" and "everything in tests/".

--HG--
rename : mobile/android/base/JavaAddonManager.java => mobile/android/base/javaaddons/JavaAddonManager.java
extra : commitid : ApOd0Iz9BrZ
extra : rebase_source : 9808487ec3b233f31524e3694d1e997af78a0c84
extra : histedit_source : c8883a01805d7ed39ffb58e8523103260aa72d0b
2015-06-17 21:47:29 -07:00
Nick Alexander 3f6c59b27c Bug 1171566 - Part 1: Configure Gradle and Spoon. rs=mcomella
There are few things happening here:

* A purely mechanical move of test sources into org.mozilla.test.browser.junit3.
  This is only to make it easy to specify the suite in Spoon.  (But it has the
  advantage of making it possible to move files around in IntelliJ, since the
  symlink points to src instead of org/mozilla/gecko.)

* Specifying the suite (package name) ended up requiring changes to the
  spoon-gradle-plugin anyway.  Hence, I've included this custom
  spoon-gradle-plugin version locally, while I work to upstream the changes.

* Some Gradle trickery to make |mach gradle runBrowserTests| execute Spoon with
  the correct package name.

--HG--
rename : mobile/android/tests/browser/junit3/src/BrowserTestCase.java => mobile/android/tests/browser/junit3/src/org/mozilla/tests/browser/junit3/BrowserTestCase.java
rename : mobile/android/tests/browser/junit3/src/TestDistribution.java => mobile/android/tests/browser/junit3/src/org/mozilla/tests/browser/junit3/TestDistribution.java
rename : mobile/android/tests/browser/junit3/src/TestGeckoBackgroundThread.java => mobile/android/tests/browser/junit3/src/org/mozilla/tests/browser/junit3/TestGeckoBackgroundThread.java
rename : mobile/android/tests/browser/junit3/src/TestGeckoMenu.java => mobile/android/tests/browser/junit3/src/org/mozilla/tests/browser/junit3/TestGeckoMenu.java
rename : mobile/android/tests/browser/junit3/src/TestGeckoProfilesProvider.java => mobile/android/tests/browser/junit3/src/org/mozilla/tests/browser/junit3/TestGeckoProfilesProvider.java
rename : mobile/android/tests/browser/junit3/src/TestGeckoSharedPrefs.java => mobile/android/tests/browser/junit3/src/org/mozilla/tests/browser/junit3/TestGeckoSharedPrefs.java
rename : mobile/android/tests/browser/junit3/src/TestImageDownloader.java => mobile/android/tests/browser/junit3/src/org/mozilla/tests/browser/junit3/TestImageDownloader.java
rename : mobile/android/tests/browser/junit3/src/TestJarReader.java => mobile/android/tests/browser/junit3/src/org/mozilla/tests/browser/junit3/TestJarReader.java
rename : mobile/android/tests/browser/junit3/src/TestRawResource.java => mobile/android/tests/browser/junit3/src/org/mozilla/tests/browser/junit3/TestRawResource.java
rename : mobile/android/tests/browser/junit3/src/TestSuggestedSites.java => mobile/android/tests/browser/junit3/src/org/mozilla/tests/browser/junit3/TestSuggestedSites.java
rename : mobile/android/tests/browser/junit3/src/TestTopSitesCursorWrapper.java => mobile/android/tests/browser/junit3/src/org/mozilla/tests/browser/junit3/TestTopSitesCursorWrapper.java
rename : mobile/android/tests/browser/junit3/src/harness/BrowserInstrumentationTestRunner.java => mobile/android/tests/browser/junit3/src/org/mozilla/tests/browser/junit3/harness/BrowserInstrumentationTestRunner.java
rename : mobile/android/tests/browser/junit3/src/harness/BrowserTestListener.java => mobile/android/tests/browser/junit3/src/org/mozilla/tests/browser/junit3/harness/BrowserTestListener.java
extra : rebase_source : 5eff7e0da0be912838fac0ddad5f6b357800eb45
extra : histedit_source : e76288628e14aeb155d2d3b4033d056c6efdc646
2015-06-04 12:09:23 -07:00
Michael Comella 2f9cdc52ae Bug 1170285 - Add lint.xml config file to base sub-project. r?nalexander
While it might seem like a good idea to disable all of the checks we don't
currently pass, Intellij uses the same lint configuration file as the
command-line invocation and so we'll be more likely to write in new errors by
disabling some checks.

--HG--
extra : commitid : 23gdgWSBmyt
extra : source : 7bd754d48b86b5104bc44067886af81c9315a3b6
2015-06-03 21:12:00 -07:00
Nick Alexander 18a7f571b3 Bug 938659 - Part 2: build system changes. r=mfinkle
--HG--
extra : rebase_source : 75b5b060d9c2733efbd56580a5828b3feac7c417
2015-05-01 17:33:03 -07:00
Nick Alexander 4eb93bd3a9 Bug 1159390 - Set sharedUserId in robocop.apk. r=gbrown
--HG--
extra : rebase_source : cb36a632051f69d01e676a130e2ec1cc78ad3c50
2015-04-28 11:29:18 -07:00
Mark Finkle 6dbb5ad52e Bug 1143888 - Integrate the Adjust install tracking SDK. r=mfinkle
--HG--
extra : rebase_source : d4a41c1193d93aa7774e68b302e9f9b13b5ec28c
2015-04-08 22:49:16 -07:00
Nick Alexander cf61b5d846 No bug - Make Gradle debug test APK look like Robocop. r=me
--HG--
extra : rebase_source : 996cf9f9e2460e19864a7b32bea8d1a1c162b0a1
extra : source : 5ffffd68e04193bc90768667a8f34f5904f531d6
2015-01-26 21:52:43 -08:00
Nick Alexander e171f23efb Bug 1121622 - Insert omnijar and libraries into debug APK only; Proguard release APK. r=me
DONTBUILD NPOTB

Local developers should only be building debug APKs.  I intend
automation to only build release APKs, and automation will insert the
omnijar and native libraries into the release APK during packaging.

This change requires local developers to delete
$OBJDIR/mobile/android/gradle/app/src/main/{assets,jniLibs}.

--HG--
extra : rebase_source : 455a098eae4586a3010576a4acfde250e8b5837b
2015-01-14 11:07:06 -08:00
Nick Alexander 694a293c49 Bug 1115064 - Fix small errors and make Gradle integration work in Android Studio 1.0.2. r=me
The important change here is that we allow the Android-Gradle plugin
to be version 0.14.4 or version 1.0.0, which appears to work in
IntelliJ 14.0.2 and in Android Studio 1.0.2.

Testing feedback came from imjalpreet and garvank.

--HG--
extra : rebase_source : 2b93dd91603666f1c6a1d2fe0fa7721d5741bdda
2014-12-23 11:39:15 -08:00
Nick Alexander 4f3f4284e1 Bug 1098239 - Rewrite mobile/android Gradle integration. r=me
This is a big patch, but it's essentially NPOTB.  The part that is POTB
is ... removing Gradle integration from the build.  I've implemented
|mach gradle-install| as a substitute for the build system stuff; it's
just so much easier to iterate on a mach command than a moz.build and
Makefile.in.

I'm landing this with self-review because this lessens the impact of the
Gradle integration on the build system and because I am the only person
who understands either the old or the new system.

You'll need to run |mach gradle-install| at top level to configure the
new Gradle integration.  But |mach gradle ...| does the right thing
configuration steps too.

This patch rewrites most of the Gradle integration.  The major changes
are:

* all .gradle files move into mobile/android/gradle;
* all the Gradle projects live in the object directory;
* mozconfig exposed to all build.gradle files;
* simplification of Android configuration between build.gradle files;
* support for user-specified version of build tools;
* first steps towards supporting builds from the source directory;
* bumps Gradle to 2.2.1;
* bumps the Android-Gradle plugin to 0.14.4.

This is seemingly a step backwards given that we'd prefer to ship the
.idea directory in the source directory.  But in fact we get closer to
that; it's possible to run ./gradlew in the source directory and get a
reasonable build.  We'll progress with this in time.  The win right now
is that the projects are nested, which makes importing work better on
Linux machines.

Unfortunately IntelliJ 13 and 14 now have conflicting Android-Gradle
plugin version requirements, so we now only support IntelliJ 14.0.2 and
above.

--HG--
rename : mobile/android/base/gradle_AndroidManifest.xml => mobile/android/gradle/base/AndroidManifest.xml
rename : mobile/android/base/gradle_AndroidManifest.xml => mobile/android/gradle/branding/AndroidManifest.xml
rename : mobile/android/gradle/omnijar/gradle_AndroidManifest.xml => mobile/android/gradle/omnijar/AndroidManifest.xml
rename : mobile/android/base/gradle_AndroidManifest.xml => mobile/android/gradle/preprocessed_code/AndroidManifest.xml
rename : mobile/android/base/gradle_AndroidManifest.xml => mobile/android/gradle/preprocessed_resources/AndroidManifest.xml
rename : mobile/android/thirdparty/gradle_AndroidManifest.xml => mobile/android/gradle/thirdparty/AndroidManifest.xml
2014-12-22 19:49:04 -08:00
Nick Alexander ef888e008b Bug 1103121 - Add |mach gradle| command for building Fennec Gradle. r=gps
I went with gradle instead of gradlew because it's more likely to be
what users consider.  And mach helpfully fixes up the uncommon typo.

This is a little hard-coded right now but I don't think it's likely
any other Gradle consumer will arise in the short term.

--HG--
extra : source : 67ce3d7591f944fa458758d97f443651f0e40dac
extra : amend_source : d10846e845deda5d368bdfdbb5b3d68706038992
extra : histedit_source : fb30750f389444a9619778d4c690d7de5e5fcbc1
2014-11-21 12:40:00 -08:00