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
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
DONTBUILD NPOTB
Project specific test filtering is automagically handled by gradle task graph
--HG--
extra : commitid : 2vx7QzGNVUI
extra : rebase_source : 63254386dca7f0aa5c6a5894f7915b2ed50dd65e
DONTBUILD NPOTB
Straight from http://stackoverflow.com/a/24751182 and the linked
IntelliJ tickets.
--HG--
extra : commitid : AcbSF0042KW
extra : rebase_source : f67e9eecfdf3f452e4fd55901f8eb42b0f3ed22c
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
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
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
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
It's convenient to know that the object directory is up-to-date (after
|make gradle-targets|) before any Gradle project builds.
--HG--
extra : commitid : 2WaqMEqw3mx
extra : rebase_source : 2dea8249b329d82d9c89b5defa7e13d4aff60566
extra : source : eb170abcc91b4714874e97b58b371e242aee9699
extra : histedit_source : 92a62bd75dfa289f3ede4592d4a224ad135d3b6b
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.)
--HG--
extra : commitid : 6EjfXxM9FJy
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
- 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.
--HG--
extra : transplant_source : %949%F2%F6%10v%9A%CA%8B%FD%EE%05%28%D8%1E%0D%09_%BE%D3
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
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
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
DONTBUILD NPOTB
Unfortunately, Gradle just can't handle incremental dexing in our
multi-project and parallel configuration. I see the dreaded
"com.android.dex.DexException: Multiple dex files define ..." error
frequently.
I'm using a downloaded Robotium package instead of the in-tree JAR
file as well, 'cuz it seems to be related.
--HG--
extra : rebase_source : d95c0844082a6deb48966496cb90824f70f6c49d
extra : histedit_source : 2f3d231d9b7139880a924089ab0d523e5e31e6b6
This is just a clean-up: rather than having each subproject have a
generateCodeAndResources build action, we have a single action
(attached to the root project) which all subprojects depend on.
Gradle orders the task DAG accordingly, saving process invocations and
speeding up the build.
--HG--
extra : source : b44dc79fbddb1acc02da12e9926852e67d606584
extra : amend_source : b89249d8af2b7986ab1174f89c150ef8115c71cf
This is a sad, but necessary, loss of generality that will cause the
Gradle configuration to lag behind the rest of the build system over
time. The existing Gradle build worked fine, but IDEA based IDEs can
not yet read build.gradle files containing arbitrary Groovy code. I
can find no alternative to including the values in the build.gradle
file directly. We will just try to keep them up to date.
The versions chosen (compileSdkVersion 21 and buildTools "21.1.1")
correspond to the current versions used on the buildbots. Changing
compileSdkVersion to an integer absolutely requires Gradle-Android
plugin version 1.0.0 or higher, which in turn mandates IntelliJ
version 14.0.3 EAP or higher.
I took the opportunity to update some settings and bump dependency
versions from v19 to v21 as well.
--HG--
extra : rebase_source : 7ada8da4dec7bd56ca3d276d833788d895e12e25
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
DONTBUILD NPOTB
There are significant problems with the combination of Android-Gradle
0.14.4, Gradle 2.2.1, and IntelliJ 14.0.2. The problems include
imports that have no recognized source directories and a quasi-working
debugger that fails to stop on breakpoints.
Rather than claim some support for this configuration, we'll move the
Android-Gradle plugin version forward. This should support both
IntelliJ 14.0.3 (sadly still Early Access Preview only) and Android
Studio 1.0.0.
--HG--
extra : rebase_source : f2394bd65549cef3a2dafb1f83c8d405f0d00124
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
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
This ticket splits a new omnijar project off of base. The new
project's omnijar task knows the inputs (well, those under
mobile/android) and the omni.ja output and only re-packages the
omnijar when the task's output is out of date.
With this modification, local building and most importantly the
Android JUnit test cycle is much improved, because the APK is not
re-deployed when only test code is modified.
In addition, the new project lists the omnijar inputs as "Java" source
directories. Previously, they were listed as "Java resource" source
directories, which meant that the omnijar inputs were packaged into
the final APK. This wasted time and space.
--HG--
extra : rebase_source : 12c94fdfbee9b7c319d5cfb4d7faad254e90abfc